diff --git a/go.mod b/go.mod
index 45f60781f9..af006e4b2b 100644
--- a/go.mod
+++ b/go.mod
@@ -34,7 +34,7 @@ require (
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb v1.0.445
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cloudaudit v1.0.199
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls v1.0.412
- github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.494
+ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.500
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.445
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb v1.0.488
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dayu v1.0.335
@@ -61,7 +61,7 @@ require (
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcr v1.0.267
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tdmq v1.0.268
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tem v1.0.472
- github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.0.486
+ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.0.500
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.489
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vod v1.0.199
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.479
diff --git a/go.sum b/go.sum
index 298b299d35..31e0708fe2 100644
--- a/go.sum
+++ b/go.sum
@@ -481,12 +481,18 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.472/go.mod
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.479/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.480/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.486/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
+github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.487 h1:6PCOaohR7z/5lbK1PDJRg0TY9tYK7zvjmDxY1yXWsQE=
+github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.487/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
+github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.488 h1:rFQ+2+p2sFMdSGE99zc5oqN3TvYVK9Vxbp+wZJjTrHw=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.488/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
+github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.489 h1:707A5KMvEapIjH+QWUGHn+Re57VpGz8RzFEoxMAs6FI=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.489/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
+github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.490 h1:mmz27tVi2r70JYnm5y0Zk8w0Qzsx+vfUw3oqSyrEfP8=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.490/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.493/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
-github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.494 h1:IC3vvhWYomlthgXvBAQbP/M/YW+OpcodyYz4gU3JCiQ=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.494/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
+github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.500 h1:xuc9CRLhkpww61x5/k2cZ1tx8zGTEzE1+pv/1bSWlPI=
+github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.500/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.445 h1:Bh7XD0ypNMHYyBOM8hhKsSu+y0VVKUnJVS+YKKhfpGg=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.445/go.mod h1:jMDD351efCFpT1+KVFbcpu6SbmP4TYmp4qkoCfr63nQ=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb v1.0.488 h1:A1seXWtMf2atBjSNYvcwxyDoFzCMgqyVnsxnWzhqJEA=
@@ -542,6 +548,10 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tem v1.0.472 h1:9Jzrgx7
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tem v1.0.472/go.mod h1:ayIL2FNqk7HH5fPQrkWtYjgU4jL7if63f7x+yRwb4a0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.0.486 h1:JRtQYtJB9sErV9tXY6xbrC3RmXNepBKd7aV3inxkUPs=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.0.486/go.mod h1:wtPJIKxQUR3KoL2KWAt/Qi8KMR4ayKHiOeVJ6sTSC4U=
+github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.0.500 h1:8pOrQK3GLskFEHGYR3s6is0YLAgSe7vYs7wdC+brA30=
+github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.0.500/go.mod h1:eQfp4Z6W1vg5vBVkR6i/ZdgKeXWoMECCvQKGTvU5dP0=
+github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.480 h1:oZptW2Fo1pW8fKz/dv+RJLr2q8UC1qkqDqWs3rDgvQ8=
+github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.480/go.mod h1:rs+BUoY53xfiE5sRsVk2RpsjgzODtq52xiBTc6WTWWM=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.489 h1:61QTzF5vjDthscsPh2WGL1bLlmOjIJ6PB2+pIihzeTI=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.489/go.mod h1:ECfO9sL5b6ZDhQWx2k85JtrCWOC3kH1KFw00TGlBL6Y=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vod v1.0.199 h1:6Yt74l4pA5QtzhwMNIEUt0spXdSBKH744DDqTHJOCP0=
diff --git a/tencentcloud/common.go b/tencentcloud/common.go
index 37ecce0342..d49196d6a0 100644
--- a/tencentcloud/common.go
+++ b/tencentcloud/common.go
@@ -77,6 +77,8 @@ var retryableErrorCode = []string{
"ResourceUnavailable",
// cbs
"ResourceBusy",
+ // teo
+ "InvalidParameter.ActionInProgress",
}
func init() {
diff --git a/tencentcloud/connectivity/client.go b/tencentcloud/connectivity/client.go
index ba9ea80d91..409ee350f4 100644
--- a/tencentcloud/connectivity/client.go
+++ b/tencentcloud/connectivity/client.go
@@ -56,7 +56,7 @@ import (
tcr "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcr/v20190924"
tdmq "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tdmq/v20200217"
tem "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tem/v20210701"
- teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220106"
+ teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901"
tke "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525"
vod "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vod/v20180717"
vpc "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312"
diff --git a/tencentcloud/data_source_tc_teo_bot_managed_rules.go b/tencentcloud/data_source_tc_teo_bot_managed_rules.go
new file mode 100644
index 0000000000..20c9bea423
--- /dev/null
+++ b/tencentcloud/data_source_tc_teo_bot_managed_rules.go
@@ -0,0 +1,145 @@
+/*
+Use this data source to query detailed information of teo botManagedRules
+
+Example Usage
+
+```hcl
+data "tencentcloud_teo_bot_managed_rules" "botManagedRules" {
+ zone_id = ""
+ entity = ""
+}
+```
+*/
+package tencentcloud
+
+import (
+ "context"
+ "log"
+
+ "github.com/hashicorp/terraform-plugin-sdk/helper/resource"
+ "github.com/hashicorp/terraform-plugin-sdk/helper/schema"
+ teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901"
+)
+
+func dataSourceTencentCloudTeoBotManagedRules() *schema.Resource {
+ return &schema.Resource{
+ Read: dataSourceTencentCloudTeoBotManagedRulesRead,
+ Schema: map[string]*schema.Schema{
+ "zone_id": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Site ID.",
+ },
+
+ "entity": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Subdomain or application name.",
+ },
+
+ "rules": {
+ Type: schema.TypeList,
+ Computed: true,
+ Description: "Managed rules list.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "rule_id": {
+ Type: schema.TypeInt,
+ Computed: true,
+ Description: "Rule ID.",
+ },
+ "description": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Description of the rule.",
+ },
+ "rule_type_name": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Type of the rule.",
+ },
+ "status": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Status of the rule.",
+ },
+ },
+ },
+ },
+
+ "result_output_file": {
+ Type: schema.TypeString,
+ Optional: true,
+ Description: "Used to save results.",
+ },
+ },
+ }
+}
+
+func dataSourceTencentCloudTeoBotManagedRulesRead(d *schema.ResourceData, meta interface{}) error {
+ defer logElapsed("data_source.tencentcloud_teo_bot_managed_rules.read")()
+ defer inconsistentCheck(d, meta)()
+
+ logId := getLogId(contextNil)
+ ctx := context.WithValue(context.TODO(), logIdKey, logId)
+ var zoneId string
+ var entity string
+
+ paramMap := make(map[string]interface{})
+ if v, ok := d.GetOk("zone_id"); ok {
+ zoneId = v.(string)
+ paramMap["zone_id"] = v
+ }
+
+ if v, ok := d.GetOk("entity"); ok {
+ paramMap["entity"] = v
+ }
+
+ teoService := TeoService{client: meta.(*TencentCloudClient).apiV3Conn}
+
+ var rules []*teo.BotManagedRuleDetail
+ err := resource.Retry(readRetryTimeout, func() *resource.RetryError {
+ results, e := teoService.DescribeTeoBotManagedRulesByFilter(ctx, paramMap)
+ if e != nil {
+ return retryError(e)
+ }
+ rules = results
+ return nil
+ })
+ if err != nil {
+ log.Printf("[CRITAL]%s read Teo rules failed, reason:%+v", logId, err)
+ return err
+ }
+
+ ruleList := []interface{}{}
+ if rules != nil {
+ for _, rule := range rules {
+ ruleMap := map[string]interface{}{}
+ if rule.RuleId != nil {
+ ruleMap["rule_id"] = rule.RuleId
+ }
+ if rule.Description != nil {
+ ruleMap["description"] = rule.Description
+ }
+ if rule.RuleTypeName != nil {
+ ruleMap["rule_type_name"] = rule.RuleTypeName
+ }
+ if rule.Status != nil {
+ ruleMap["status"] = rule.Status
+ }
+
+ ruleList = append(ruleList, ruleMap)
+ }
+ _ = d.Set("rules", ruleList)
+ }
+
+ d.SetId(zoneId + FILED_SP + entity)
+
+ output, ok := d.GetOk("result_output_file")
+ if ok && output.(string) != "" {
+ if e := writeToFile(output.(string), ruleList); e != nil {
+ return e
+ }
+ }
+ return nil
+}
diff --git a/tencentcloud/data_source_tc_teo_bot_managed_rules_test.go b/tencentcloud/data_source_tc_teo_bot_managed_rules_test.go
new file mode 100644
index 0000000000..8bc450dee4
--- /dev/null
+++ b/tencentcloud/data_source_tc_teo_bot_managed_rules_test.go
@@ -0,0 +1,33 @@
+package tencentcloud
+
+import (
+ "testing"
+
+ "github.com/hashicorp/terraform-plugin-sdk/helper/resource"
+)
+
+func TestAccTencentCloudTeoBotManagedRulesDataSource(t *testing.T) {
+ t.Parallel()
+
+ resource.Test(t, resource.TestCase{
+ PreCheck: func() { testAccPreCheck(t) },
+ Providers: testAccProviders,
+ Steps: []resource.TestStep{
+ {
+ Config: testAccDataSourceTeoBotManagedRules,
+ Check: resource.ComposeTestCheckFunc(
+ testAccCheckTencentCloudDataSourceID("data.tencentcloud_teo_bot_managed_rules.bot_managed_rules"),
+ ),
+ },
+ },
+ })
+}
+
+const testAccDataSourceTeoBotManagedRules = `
+
+data "tencentcloud_teo_bot_managed_rules" "bot_managed_rules" {
+ zone_id = ""
+ entity = ""
+ }
+
+`
diff --git a/tencentcloud/data_source_tc_teo_bot_portrait_rules.go b/tencentcloud/data_source_tc_teo_bot_portrait_rules.go
new file mode 100644
index 0000000000..9ad5c73936
--- /dev/null
+++ b/tencentcloud/data_source_tc_teo_bot_portrait_rules.go
@@ -0,0 +1,154 @@
+/*
+Use this data source to query detailed information of teo botPortraitRules
+
+Example Usage
+
+```hcl
+data "tencentcloud_teo_bot_portrait_rules" "botPortraitRules" {
+ zone_id = ""
+ entity = ""
+}
+```
+*/
+package tencentcloud
+
+import (
+ "context"
+ "log"
+
+ "github.com/hashicorp/terraform-plugin-sdk/helper/resource"
+ "github.com/hashicorp/terraform-plugin-sdk/helper/schema"
+ teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901"
+)
+
+func dataSourceTencentCloudTeoBotPortraitRules() *schema.Resource {
+ return &schema.Resource{
+ Read: dataSourceTencentCloudTeoBotPortraitRulesRead,
+ Schema: map[string]*schema.Schema{
+ "zone_id": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Site ID.",
+ },
+
+ "entity": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Subdomain or application name.",
+ },
+
+ "rules": {
+ Type: schema.TypeList,
+ Computed: true,
+ Description: "Portrait rules list.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "rule_id": {
+ Type: schema.TypeInt,
+ Computed: true,
+ Description: "Rule ID.",
+ },
+ "description": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Description of the rule. Note: This field may return null, indicating that no valid value can be obtained.",
+ },
+ "rule_type_name": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Type of the rule. Note: This field may return null, indicating that no valid value can be obtained.",
+ },
+ "classification_id": {
+ Type: schema.TypeInt,
+ Computed: true,
+ Description: "Classification of the rule. Note: This field may return null, indicating that no valid value can be obtained.",
+ },
+ "status": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Status of the rule. Note: This field may return null, indicating that no valid value can be obtained.",
+ },
+ },
+ },
+ },
+
+ "result_output_file": {
+ Type: schema.TypeString,
+ Optional: true,
+ Description: "Used to save results.",
+ },
+ },
+ }
+}
+
+func dataSourceTencentCloudTeoBotPortraitRulesRead(d *schema.ResourceData, meta interface{}) error {
+ defer logElapsed("data_source.tencentcloud_teo_bot_portrait_rules.read")()
+ defer inconsistentCheck(d, meta)()
+
+ logId := getLogId(contextNil)
+ ctx := context.WithValue(context.TODO(), logIdKey, logId)
+ var zoneId string
+ var entity string
+
+ paramMap := make(map[string]interface{})
+ if v, ok := d.GetOk("zone_id"); ok {
+ zoneId = v.(string)
+ paramMap["zone_id"] = v
+ }
+
+ if v, ok := d.GetOk("entity"); ok {
+ entity = v.(string)
+ paramMap["entity"] = v
+ }
+
+ teoService := TeoService{client: meta.(*TencentCloudClient).apiV3Conn}
+
+ var rules []*teo.PortraitManagedRuleDetail
+ err := resource.Retry(readRetryTimeout, func() *resource.RetryError {
+ results, e := teoService.DescribeTeoBotPortraitRulesByFilter(ctx, paramMap)
+ if e != nil {
+ return retryError(e)
+ }
+ rules = results
+ return nil
+ })
+ if err != nil {
+ log.Printf("[CRITAL]%s read Teo rules failed, reason:%+v", logId, err)
+ return err
+ }
+
+ ruleList := []interface{}{}
+ if rules != nil {
+ for _, rule := range rules {
+ ruleMap := map[string]interface{}{}
+ if rule.RuleId != nil {
+ ruleMap["rule_id"] = rule.RuleId
+ }
+ if rule.Description != nil {
+ ruleMap["description"] = rule.Description
+ }
+ if rule.RuleTypeName != nil {
+ ruleMap["rule_type_name"] = rule.RuleTypeName
+ }
+ if rule.ClassificationId != nil {
+ ruleMap["classification_id"] = rule.ClassificationId
+ }
+ if rule.Status != nil {
+ ruleMap["status"] = rule.Status
+ }
+
+ ruleList = append(ruleList, ruleMap)
+ }
+ _ = d.Set("rules", ruleList)
+ }
+
+ d.SetId(zoneId + FILED_SP + entity)
+
+ output, ok := d.GetOk("result_output_file")
+ if ok && output.(string) != "" {
+ if e := writeToFile(output.(string), ruleList); e != nil {
+ return e
+ }
+ }
+ return nil
+}
diff --git a/tencentcloud/data_source_tc_teo_bot_portrait_rules_test.go b/tencentcloud/data_source_tc_teo_bot_portrait_rules_test.go
new file mode 100644
index 0000000000..60d4fea84d
--- /dev/null
+++ b/tencentcloud/data_source_tc_teo_bot_portrait_rules_test.go
@@ -0,0 +1,33 @@
+package tencentcloud
+
+import (
+ "testing"
+
+ "github.com/hashicorp/terraform-plugin-sdk/helper/resource"
+)
+
+func TestAccTencentCloudTeoBotPortraitRulesDataSource(t *testing.T) {
+ t.Parallel()
+
+ resource.Test(t, resource.TestCase{
+ PreCheck: func() { testAccPreCheck(t) },
+ Providers: testAccProviders,
+ Steps: []resource.TestStep{
+ {
+ Config: testAccDataSourceTeoBotPortraitRules,
+ Check: resource.ComposeTestCheckFunc(
+ testAccCheckTencentCloudDataSourceID("data.tencentcloud_teo_bot_portrait_rules.bot_portrait_rules"),
+ ),
+ },
+ },
+ })
+}
+
+const testAccDataSourceTeoBotPortraitRules = `
+
+data "tencentcloud_teo_bot_portrait_rules" "bot_portrait_rules" {
+ zone_id = ""
+ entity = ""
+ }
+
+`
diff --git a/tencentcloud/data_source_tc_teo_rule_engine_settings.go b/tencentcloud/data_source_tc_teo_rule_engine_settings.go
new file mode 100644
index 0000000000..e20a4f1c69
--- /dev/null
+++ b/tencentcloud/data_source_tc_teo_rule_engine_settings.go
@@ -0,0 +1,333 @@
+/*
+Use this data source to query detailed information of teo ruleEngineSettings
+
+Example Usage
+
+```hcl
+data "tencentcloud_teo_rule_engine_settings" "ruleEngineSettings" {
+}
+```
+*/
+package tencentcloud
+
+import (
+ "context"
+ "log"
+
+ "github.com/hashicorp/terraform-plugin-sdk/helper/resource"
+ "github.com/hashicorp/terraform-plugin-sdk/helper/schema"
+ teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901"
+)
+
+func dataSourceTencentCloudTeoRuleEngineSettings() *schema.Resource {
+ return &schema.Resource{
+ Read: dataSourceTencentCloudTeoRuleEngineSettingsRead,
+ Schema: map[string]*schema.Schema{
+ "actions": {
+ Type: schema.TypeList,
+ Computed: true,
+ Description: "Detail info of actions which can be used in rule engine.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "action": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Action name.",
+ },
+ "properties": {
+ Type: schema.TypeList,
+ Computed: true,
+ Description: "Action properties.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "name": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Property name.",
+ },
+ "type": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Property value type. Valid values:- `CHOICE`: enum type, must select one of the value in `ChoicesValue`.- `TOGGLE`: switch type, must select one of the value in `ChoicesValue`.- `OBJECT`: object type, the `ChoiceProperties` list all properties of the object.- `CUSTOM_NUM`: integer type.- `CUSTOM_STRING`: string type.",
+ },
+ "choices_value": {
+ Type: schema.TypeSet,
+ Elem: &schema.Schema{
+ Type: schema.TypeString,
+ },
+ Computed: true,
+ Description: "The choices which can be used. This list may be empty.",
+ },
+ "min": {
+ Type: schema.TypeInt,
+ Computed: true,
+ Description: "Min integer value can bse used when property type is `CUSTOM_NUM`. When `Min` and `Max` both are 0, this field is meaningless.",
+ },
+ "max": {
+ Type: schema.TypeInt,
+ Computed: true,
+ Description: "Max integer value can bse used when property type is `CUSTOM_NUM`. When `Min` and `Max` both are 0, this field is meaningless.",
+ },
+ "is_multiple": {
+ Type: schema.TypeBool,
+ Computed: true,
+ Description: "Whether this property is allowed to set multiple values.",
+ },
+ "is_allow_empty": {
+ Type: schema.TypeBool,
+ Computed: true,
+ Description: "Whether this property is allowed to set empty.",
+ },
+ "choice_properties": {
+ Type: schema.TypeList,
+ Computed: true,
+ Description: "Associative properties of this property, they are all required. Note: This field may return null, indicating that no valid value can be obtained.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "name": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Property name.",
+ },
+ "type": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Property value type. Valid values:- `CHOICE`: enum type, must select one of the value in `ChoicesValue`.- `TOGGLE`: switch type, must select one of the value in `ChoicesValue`.- `CUSTOM_NUM`: integer type.- `CUSTOM_STRING`: string type.",
+ },
+ "choices_value": {
+ Type: schema.TypeSet,
+ Elem: &schema.Schema{
+ Type: schema.TypeString,
+ },
+ Computed: true,
+ Description: "The choices which can bse used. This list may be empty.",
+ },
+ "min": {
+ Type: schema.TypeInt,
+ Computed: true,
+ Description: "Min integer value can bse used when property type is `CUSTOM_NUM`. When `Min` and `Max` both are 0, this field is meaningless.",
+ },
+ "max": {
+ Type: schema.TypeInt,
+ Computed: true,
+ Description: "Max integer value can bse used when property type is `CUSTOM_NUM`. When `Min` and `Max` both are 0, this field is meaningless.",
+ },
+ "is_multiple": {
+ Type: schema.TypeBool,
+ Computed: true,
+ Description: "Whether this property is allowed to set multiple values.",
+ },
+ "is_allow_empty": {
+ Type: schema.TypeBool,
+ Computed: true,
+ Description: "Whether this property is allowed to set empty.",
+ },
+ "extra_parameter": {
+ Type: schema.TypeList,
+ MaxItems: 1,
+ Computed: true,
+ Description: "Special parameter. Note: This field may return null, indicating that no valid value can be obtained.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "id": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Parameter name. Valid values:- `Action`: this extra parameter is required when modify HTTP header, this action should be a `RewriteAction`.- `StatusCode`: this extra parameter is required when modify HTTP status code, this action should be a `CodeAction`.- `NULL`: this action should be a `NormalAction`.",
+ },
+ "type": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Parameter value type. Valid values:- `CHOICE`: select one value from `Choices`.- `CUSTOM_NUM`: integer value.- `CUSTOM_STRING`: string value.",
+ },
+ "choices": {
+ Type: schema.TypeSet,
+ Elem: &schema.Schema{
+ Type: schema.TypeString,
+ },
+ Computed: true,
+ Description: "A list of choices which can be used when `Type` is `CHOICE`.",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ "extra_parameter": {
+ Type: schema.TypeList,
+ MaxItems: 1,
+ Computed: true,
+ Description: "Special parameter. Note: This field may return null, indicating that no valid value can be obtained.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "id": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Parameter name. Valid values:- `Action`: this extra parameter is required when modify HTTP header, this action should be a `RewriteAction`.- `StatusCode`: this extra parameter is required when modify HTTP status code, this action should be a `CodeAction`.- `NULL`: this action should be a `NormalAction`.",
+ },
+ "type": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Parameter value type. Valid values:- `CHOICE`: select one value from `Choices`.- `CUSTOM_NUM`: integer value.- `CUSTOM_STRING`: string value.",
+ },
+ "choices": {
+ Type: schema.TypeSet,
+ Elem: &schema.Schema{
+ Type: schema.TypeString,
+ },
+ Computed: true,
+ Description: "A list of choices which can be used when `Type` is `CHOICE`.",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+
+ "result_output_file": {
+ Type: schema.TypeString,
+ Optional: true,
+ Description: "Used to save results.",
+ },
+ },
+ }
+}
+
+func dataSourceTencentCloudTeoRuleEngineSettingsRead(d *schema.ResourceData, meta interface{}) error {
+ defer logElapsed("data_source.tencentcloud_teo_rule_engine_settings.read")()
+ defer inconsistentCheck(d, meta)()
+
+ logId := getLogId(contextNil)
+ ctx := context.WithValue(context.TODO(), logIdKey, logId)
+
+ teoService := TeoService{client: meta.(*TencentCloudClient).apiV3Conn}
+
+ var rules []*teo.RulesSettingAction
+ err := resource.Retry(readRetryTimeout, func() *resource.RetryError {
+ results, e := teoService.DescribeTeoRuleEngineSettingsByFilter(ctx)
+ if e != nil {
+ return retryError(e)
+ }
+ rules = results
+ return nil
+ })
+ if err != nil {
+ log.Printf("[CRITAL]%s read Teo rules failed, reason:%+v", logId, err)
+ return err
+ }
+
+ ruleList := []interface{}{}
+ if rules != nil {
+ for _, rule := range rules {
+ ruleMap := map[string]interface{}{}
+ if rule.Action != nil {
+ ruleMap["action"] = rule.Action
+ }
+ if rule.Properties != nil {
+ propertiesList := []interface{}{}
+ for _, properties := range rule.Properties {
+ propertiesMap := map[string]interface{}{}
+ if properties.Name != nil {
+ propertiesMap["name"] = properties.Name
+ }
+ if properties.Type != nil {
+ propertiesMap["type"] = properties.Type
+ }
+ if properties.ChoicesValue != nil {
+ propertiesMap["choices_value"] = properties.ChoicesValue
+ }
+ if properties.Min != nil {
+ propertiesMap["min"] = properties.Min
+ }
+ if properties.Max != nil {
+ propertiesMap["max"] = properties.Max
+ }
+ if properties.IsMultiple != nil {
+ propertiesMap["is_multiple"] = properties.IsMultiple
+ }
+ if properties.IsAllowEmpty != nil {
+ propertiesMap["is_allow_empty"] = properties.IsAllowEmpty
+ }
+ if properties.ChoiceProperties != nil {
+ choicePropertiesList := []interface{}{}
+ for _, choiceProperties := range properties.ChoiceProperties {
+ choicePropertiesMap := map[string]interface{}{}
+ if choiceProperties.Name != nil {
+ choicePropertiesMap["name"] = choiceProperties.Name
+ }
+ if choiceProperties.Type != nil {
+ choicePropertiesMap["type"] = choiceProperties.Type
+ }
+ if choiceProperties.ChoicesValue != nil {
+ choicePropertiesMap["choices_value"] = choiceProperties.ChoicesValue
+ }
+ if choiceProperties.Min != nil {
+ choicePropertiesMap["min"] = choiceProperties.Min
+ }
+ if choiceProperties.Max != nil {
+ choicePropertiesMap["max"] = choiceProperties.Max
+ }
+ if choiceProperties.IsMultiple != nil {
+ choicePropertiesMap["is_multiple"] = choiceProperties.IsMultiple
+ }
+ if choiceProperties.IsAllowEmpty != nil {
+ choicePropertiesMap["is_allow_empty"] = choiceProperties.IsAllowEmpty
+ }
+ if choiceProperties.ExtraParameter != nil {
+ extraParameterMap := map[string]interface{}{}
+ if choiceProperties.ExtraParameter.Id != nil {
+ extraParameterMap["id"] = choiceProperties.ExtraParameter.Id
+ }
+ if choiceProperties.ExtraParameter.Type != nil {
+ extraParameterMap["type"] = choiceProperties.ExtraParameter.Type
+ }
+ if choiceProperties.ExtraParameter.Choices != nil {
+ extraParameterMap["choices"] = choiceProperties.ExtraParameter.Choices
+ }
+
+ choicePropertiesMap["extra_parameter"] = []interface{}{extraParameterMap}
+ }
+
+ choicePropertiesList = append(choicePropertiesList, choicePropertiesMap)
+ }
+ propertiesMap["choice_properties"] = choicePropertiesList
+ }
+ if properties.ExtraParameter != nil {
+ extraParameterMap := map[string]interface{}{}
+ if properties.ExtraParameter.Id != nil {
+ extraParameterMap["id"] = properties.ExtraParameter.Id
+ }
+ if properties.ExtraParameter.Type != nil {
+ extraParameterMap["type"] = properties.ExtraParameter.Type
+ }
+ if properties.ExtraParameter.Choices != nil {
+ extraParameterMap["choices"] = properties.ExtraParameter.Choices
+ }
+
+ propertiesMap["extra_parameter"] = []interface{}{extraParameterMap}
+ }
+
+ propertiesList = append(propertiesList, propertiesMap)
+ }
+ ruleMap["properties"] = propertiesList
+ }
+
+ ruleList = append(ruleList, ruleMap)
+ }
+ _ = d.Set("actions", ruleList)
+ }
+
+ d.SetId("rule_engine_settings")
+
+ output, ok := d.GetOk("result_output_file")
+ if ok && output.(string) != "" {
+ if e := writeToFile(output.(string), ruleList); e != nil {
+ return e
+ }
+ }
+ return nil
+}
diff --git a/tencentcloud/data_source_tc_teo_rule_engine_settings_test.go b/tencentcloud/data_source_tc_teo_rule_engine_settings_test.go
new file mode 100644
index 0000000000..d8a637cc47
--- /dev/null
+++ b/tencentcloud/data_source_tc_teo_rule_engine_settings_test.go
@@ -0,0 +1,31 @@
+package tencentcloud
+
+import (
+ "testing"
+
+ "github.com/hashicorp/terraform-plugin-sdk/helper/resource"
+)
+
+func TestAccTencentCloudTeoRuleEngineSettingsDataSource(t *testing.T) {
+ t.Parallel()
+
+ resource.Test(t, resource.TestCase{
+ PreCheck: func() { testAccPreCheck(t) },
+ Providers: testAccProviders,
+ Steps: []resource.TestStep{
+ {
+ Config: testAccDataSourceTeoRuleEngineSettings,
+ Check: resource.ComposeTestCheckFunc(
+ testAccCheckTencentCloudDataSourceID("data.tencentcloud_teo_rule_engine_settings.rule_engine_settings"),
+ ),
+ },
+ },
+ })
+}
+
+const testAccDataSourceTeoRuleEngineSettings = `
+
+data "tencentcloud_teo_rule_engine_settings" "rule_engine_settings" {
+ }
+
+`
diff --git a/tencentcloud/data_source_tc_teo_security_policy_regions.go b/tencentcloud/data_source_tc_teo_security_policy_regions.go
new file mode 100644
index 0000000000..46242ee1ee
--- /dev/null
+++ b/tencentcloud/data_source_tc_teo_security_policy_regions.go
@@ -0,0 +1,119 @@
+/*
+Use this data source to query detailed information of teo securityPolicyRegions
+
+Example Usage
+
+```hcl
+data "tencentcloud_teo_security_policy_regions" "securityPolicyRegions" {
+}
+```
+*/
+package tencentcloud
+
+import (
+ "context"
+ "log"
+
+ "github.com/hashicorp/terraform-plugin-sdk/helper/resource"
+ "github.com/hashicorp/terraform-plugin-sdk/helper/schema"
+ teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901"
+)
+
+func dataSourceTencentCloudTeoSecurityPolicyRegions() *schema.Resource {
+ return &schema.Resource{
+ Read: dataSourceTencentCloudTeoSecurityPolicyRegionsRead,
+ Schema: map[string]*schema.Schema{
+ "geo_ip": {
+ Type: schema.TypeList,
+ Computed: true,
+ Description: "Region info.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "region_id": {
+ Type: schema.TypeInt,
+ Computed: true,
+ Description: "Region ID.",
+ },
+ "country": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Name of the country.",
+ },
+ "continent": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Name of the continent.",
+ },
+ "province": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Province of the region. Note: This field may return null, indicating that no valid value can be obtained.",
+ },
+ },
+ },
+ },
+
+ "result_output_file": {
+ Type: schema.TypeString,
+ Optional: true,
+ Description: "Used to save results.",
+ },
+ },
+ }
+}
+
+func dataSourceTencentCloudTeoSecurityPolicyRegionsRead(d *schema.ResourceData, meta interface{}) error {
+ defer logElapsed("data_source.tencentcloud_teo_security_policy_regions.read")()
+ defer inconsistentCheck(d, meta)()
+
+ logId := getLogId(contextNil)
+ ctx := context.WithValue(context.TODO(), logIdKey, logId)
+
+ teoService := TeoService{client: meta.(*TencentCloudClient).apiV3Conn}
+
+ var geoIps []*teo.GeoIp
+ err := resource.Retry(readRetryTimeout, func() *resource.RetryError {
+ results, e := teoService.DescribeTeoSecurityPolicyRegionsByFilter(ctx)
+ if e != nil {
+ return retryError(e)
+ }
+ geoIps = results
+ return nil
+ })
+ if err != nil {
+ log.Printf("[CRITAL]%s read Teo rules failed, reason:%+v", logId, err)
+ return err
+ }
+
+ ruleList := []interface{}{}
+ if geoIps != nil {
+ for _, geoIp := range geoIps {
+ ruleMap := map[string]interface{}{}
+ if geoIp.RegionId != nil {
+ ruleMap["region_id"] = geoIp.RegionId
+ }
+ if geoIp.Country != nil {
+ ruleMap["country"] = geoIp.Country
+ }
+ if geoIp.Continent != nil {
+ ruleMap["continent"] = geoIp.Continent
+ }
+ if geoIp.Province != nil {
+ ruleMap["province"] = geoIp.Province
+ }
+
+ ruleList = append(ruleList, ruleMap)
+ }
+ _ = d.Set("geo_ip", ruleList)
+ }
+
+ d.SetId("security_policy_regions")
+
+ output, ok := d.GetOk("result_output_file")
+ if ok && output.(string) != "" {
+ if e := writeToFile(output.(string), ruleList); e != nil {
+ return e
+ }
+ }
+ return nil
+}
diff --git a/tencentcloud/data_source_tc_teo_security_policy_regions_test.go b/tencentcloud/data_source_tc_teo_security_policy_regions_test.go
new file mode 100644
index 0000000000..a7ff4b4b80
--- /dev/null
+++ b/tencentcloud/data_source_tc_teo_security_policy_regions_test.go
@@ -0,0 +1,31 @@
+package tencentcloud
+
+import (
+ "testing"
+
+ "github.com/hashicorp/terraform-plugin-sdk/helper/resource"
+)
+
+func TestAccTencentCloudTeoSecurityPolicyRegionsDataSource(t *testing.T) {
+ t.Parallel()
+
+ resource.Test(t, resource.TestCase{
+ PreCheck: func() { testAccPreCheck(t) },
+ Providers: testAccProviders,
+ Steps: []resource.TestStep{
+ {
+ Config: testAccDataSourceTeoSecurityPolicyRegions,
+ Check: resource.ComposeTestCheckFunc(
+ testAccCheckTencentCloudDataSourceID("data.tencentcloud_teo_security_policy_regions.security_policy_regions"),
+ ),
+ },
+ },
+ })
+}
+
+const testAccDataSourceTeoSecurityPolicyRegions = `
+
+data "tencentcloud_teo_security_policy_regions" "security_policy_regions" {
+ }
+
+`
diff --git a/tencentcloud/data_source_tc_teo_waf_rule_groups.go b/tencentcloud/data_source_tc_teo_waf_rule_groups.go
new file mode 100644
index 0000000000..9c1c3f7ec8
--- /dev/null
+++ b/tencentcloud/data_source_tc_teo_waf_rule_groups.go
@@ -0,0 +1,193 @@
+/*
+Use this data source to query detailed information of teo wafRuleGroups
+
+Example Usage
+
+```hcl
+data "tencentcloud_teo_waf_rule_groups" "wafRuleGroups" {
+ zone_id = ""
+ entity = ""
+}
+```
+*/
+package tencentcloud
+
+import (
+ "context"
+ "log"
+
+ "github.com/hashicorp/terraform-plugin-sdk/helper/resource"
+ "github.com/hashicorp/terraform-plugin-sdk/helper/schema"
+ teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901"
+)
+
+func dataSourceTencentCloudTeoWafRuleGroups() *schema.Resource {
+ return &schema.Resource{
+ Read: dataSourceTencentCloudTeoWafRuleGroupsRead,
+ Schema: map[string]*schema.Schema{
+ "zone_id": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Site ID.",
+ },
+
+ "entity": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Subdomain or application name.",
+ },
+
+ "waf_rule_groups": {
+ Type: schema.TypeList,
+ Computed: true,
+ Description: "List of WAF rule groups.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "rule_type_id": {
+ Type: schema.TypeInt,
+ Computed: true,
+ Description: "Type id of rules in this group.",
+ },
+ "rule_type_name": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Type name of rules in this group.",
+ },
+ "rule_type_desc": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Description of rule type in this group.",
+ },
+ "rules": {
+ Type: schema.TypeList,
+ Computed: true,
+ Description: "Rules detail.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "rule_id": {
+ Type: schema.TypeInt,
+ Computed: true,
+ Description: "WAF managed rule id.",
+ },
+ "description": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Description of the rule.",
+ },
+ "rule_level_desc": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "System default level of the rule.",
+ },
+ "rule_tags": {
+ Type: schema.TypeSet,
+ Elem: &schema.Schema{
+ Type: schema.TypeString,
+ },
+ Computed: true,
+ Description: "Tags of the rule. Note: This field may return null, indicating that no valid value can be obtained.",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+
+ "result_output_file": {
+ Type: schema.TypeString,
+ Optional: true,
+ Description: "Used to save results.",
+ },
+ },
+ }
+}
+
+func dataSourceTencentCloudTeoWafRuleGroupsRead(d *schema.ResourceData, meta interface{}) error {
+ defer logElapsed("data_source.tencentcloud_teo_waf_rule_groups.read")()
+ defer inconsistentCheck(d, meta)()
+
+ var (
+ logId = getLogId(contextNil)
+ ctx = context.WithValue(context.TODO(), logIdKey, logId)
+ zoneId string
+ entity string
+ )
+
+ paramMap := make(map[string]interface{})
+ if v, ok := d.GetOk("zone_id"); ok {
+ zoneId = v.(string)
+ paramMap["zone_id"] = v
+ }
+
+ if v, ok := d.GetOk("entity"); ok {
+ entity = v.(string)
+ paramMap["entity"] = v
+ }
+
+ teoService := TeoService{client: meta.(*TencentCloudClient).apiV3Conn}
+
+ var wafGroupDetails []*teo.WafGroupDetail
+ err := resource.Retry(readRetryTimeout, func() *resource.RetryError {
+ results, e := teoService.DescribeTeoWafRuleGroupsByFilter(ctx, paramMap)
+ if e != nil {
+ return retryError(e)
+ }
+ wafGroupDetails = results
+ return nil
+ })
+ if err != nil {
+ log.Printf("[CRITAL]%s read Teo wafGroupInfo failed, reason:%+v", logId, err)
+ return err
+ }
+
+ wafGroupInfoList := []interface{}{}
+ if wafGroupDetails != nil {
+ for _, wafGroupDetail := range wafGroupDetails {
+ wafGroupInfoMap := map[string]interface{}{}
+ if wafGroupDetail.RuleTypeId != nil {
+ wafGroupInfoMap["rule_type_id"] = wafGroupDetail.RuleTypeId
+ }
+ if wafGroupDetail.RuleTypeName != nil {
+ wafGroupInfoMap["rule_type_name"] = wafGroupDetail.RuleTypeName
+ }
+ if wafGroupDetail.RuleTypeDesc != nil {
+ wafGroupInfoMap["rule_type_desc"] = wafGroupDetail.RuleTypeDesc
+ }
+ if wafGroupDetail.WafGroupRules != nil {
+ rulesList := []interface{}{}
+ for _, rules := range wafGroupDetail.WafGroupRules {
+ rulesMap := map[string]interface{}{}
+ if rules.RuleId != nil {
+ rulesMap["rule_id"] = rules.RuleId
+ }
+ if rules.Description != nil {
+ rulesMap["description"] = rules.Description
+ }
+ if rules.RuleLevelDesc != nil {
+ rulesMap["rule_level_desc"] = rules.RuleLevelDesc
+ }
+ if rules.RuleTags != nil {
+ rulesMap["rule_tags"] = rules.RuleTags
+ }
+
+ rulesList = append(rulesList, rulesMap)
+ }
+ wafGroupInfoMap["rules"] = rulesList
+ }
+
+ wafGroupInfoList = append(wafGroupInfoList, wafGroupInfoMap)
+ }
+ _ = d.Set("waf_rule_groups", wafGroupInfoList)
+ }
+
+ d.SetId(zoneId + FILED_SP + entity)
+
+ output, ok := d.GetOk("result_output_file")
+ if ok && output.(string) != "" {
+ if e := writeToFile(output.(string), wafGroupInfoList); e != nil {
+ return e
+ }
+ }
+ return nil
+}
diff --git a/tencentcloud/data_source_tc_teo_waf_rule_groups_test.go b/tencentcloud/data_source_tc_teo_waf_rule_groups_test.go
new file mode 100644
index 0000000000..4f4abffe5e
--- /dev/null
+++ b/tencentcloud/data_source_tc_teo_waf_rule_groups_test.go
@@ -0,0 +1,31 @@
+package tencentcloud
+
+import (
+ "testing"
+
+ "github.com/hashicorp/terraform-plugin-sdk/helper/resource"
+)
+
+func TestAccTencentCloudTeoWafRuleGroupsDataSource(t *testing.T) {
+ t.Parallel()
+
+ resource.Test(t, resource.TestCase{
+ PreCheck: func() { testAccPreCheck(t) },
+ Providers: testAccProviders,
+ Steps: []resource.TestStep{
+ {
+ Config: testAccDataSourceTeoWafRuleGroups,
+ Check: resource.ComposeTestCheckFunc(
+ testAccCheckTencentCloudDataSourceID("data.tencentcloud_teo_waf_rule_groups.waf_rule_groups"),
+ ),
+ },
+ },
+ })
+}
+
+const testAccDataSourceTeoWafRuleGroups = `
+
+data "tencentcloud_teo_waf_rule_groups" "waf_rule_groups" {
+ }
+
+`
diff --git a/tencentcloud/data_source_tc_teo_zone_available_plans.go b/tencentcloud/data_source_tc_teo_zone_available_plans.go
index f92156e0e1..60b90d27a7 100644
--- a/tencentcloud/data_source_tc_teo_zone_available_plans.go
+++ b/tencentcloud/data_source_tc_teo_zone_available_plans.go
@@ -1,10 +1,11 @@
/*
-Use this data source to query zone available plans.
+Use this data source to query detailed information of teo zoneAvailablePlans
Example Usage
```hcl
-data "tencentcloud_teo_zone_available_plans" "available_plans" {}
+data "tencentcloud_teo_zone_available_plans" "zoneAvailablePlans" {
+}
```
*/
package tencentcloud
@@ -15,7 +16,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
- teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220106"
+ teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901"
)
func dataSourceTencentCloudTeoZoneAvailablePlans() *schema.Resource {
@@ -26,7 +27,7 @@ func dataSourceTencentCloudTeoZoneAvailablePlans() *schema.Resource {
"plan_info_list": {
Type: schema.TypeList,
Computed: true,
- Description: "Available plans for a zone.",
+ Description: "Zone plans which current account can use.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"plan_type": {
@@ -37,7 +38,7 @@ func dataSourceTencentCloudTeoZoneAvailablePlans() *schema.Resource {
"currency": {
Type: schema.TypeString,
Computed: true,
- Description: "Currency type. Valid values: `CNY`, `USD`.",
+ Description: "Settlement Currency Type. Valid values: `CNY`, `USD`.",
},
"flux": {
Type: schema.TypeInt,
@@ -47,7 +48,7 @@ func dataSourceTencentCloudTeoZoneAvailablePlans() *schema.Resource {
"frequency": {
Type: schema.TypeString,
Computed: true,
- Description: "Billing cycle. Valid values: `y`: Billed by the year; `m`: Billed by the month; `h`: Billed by the hour; `M`: Billed by the minute; `s`: Billed by the second.",
+ Description: "Billing cycle. Valid values:- `y`: Billed by the year.- `m`: Billed by the month.- `h`: Billed by the hour.- `M`: Billed by the minute.- `s`: Billed by the second.",
},
"price": {
Type: schema.TypeInt,
@@ -64,13 +65,19 @@ func dataSourceTencentCloudTeoZoneAvailablePlans() *schema.Resource {
Computed: true,
Description: "The number of zones this zone plan can bind.",
},
+ "area": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Acceleration area of the plan. Valid value: `mainland`, `overseas`.",
+ },
},
},
},
+
"result_output_file": {
Type: schema.TypeString,
Optional: true,
- Description: "Used for save results.",
+ Description: "Used to save results.",
},
},
}
@@ -78,46 +85,61 @@ func dataSourceTencentCloudTeoZoneAvailablePlans() *schema.Resource {
func dataSourceTencentCloudTeoZoneAvailablePlansRead(d *schema.ResourceData, meta interface{}) error {
defer logElapsed("data_source.tencentcloud_teo_zone_available_plans.read")()
+ defer inconsistentCheck(d, meta)()
- var (
- logId = getLogId(contextNil)
- ctx = context.WithValue(context.TODO(), logIdKey, logId)
- service = TeoService{client: meta.(*TencentCloudClient).apiV3Conn}
- availablePlans *teo.DescribeAvailablePlansResponseParams
- err error
- )
-
- var outErr, inErr error
- availablePlans, outErr = service.DescribeAvailablePlans(ctx)
- if outErr != nil {
- outErr = resource.Retry(readRetryTimeout, func() *resource.RetryError {
- availablePlans, inErr = service.DescribeAvailablePlans(ctx)
- if inErr != nil {
- return retryError(inErr)
- }
- return nil
- })
- }
+ logId := getLogId(contextNil)
+ ctx := context.WithValue(context.TODO(), logIdKey, logId)
+
+ teoService := TeoService{client: meta.(*TencentCloudClient).apiV3Conn}
- planInfos := availablePlans.PlanInfoList
- planInfoList := make([]map[string]interface{}, 0, len(planInfos))
- for _, v := range planInfos {
- planInfo := map[string]interface{}{
- "plan_type": v.PlanType,
- "currency": v.Currency,
- "flux": v.Flux,
- "frequency": v.Frequency,
- "price": v.Price,
- "request": v.Request,
- "site_number": v.SiteNumber,
+ var planInfos []*teo.PlanInfo
+ err := resource.Retry(readRetryTimeout, func() *resource.RetryError {
+ results, e := teoService.DescribeTeoZoneAvailablePlansByFilter(ctx)
+ if e != nil {
+ return retryError(e)
}
- planInfoList = append(planInfoList, planInfo)
- }
- if err = d.Set("plan_info_list", planInfoList); err != nil {
- log.Printf("[CRITAL]%s provider set list fail, reason:%s", logId, err.Error())
+ planInfos = results
+ return nil
+ })
+ if err != nil {
+ log.Printf("[CRITAL]%s read Teo planInfo failed, reason:%+v", logId, err)
return err
}
+ planInfoList := []interface{}{}
+ if planInfos != nil {
+ for _, planInfo := range planInfos {
+ planInfoMap := map[string]interface{}{}
+ if planInfo.PlanType != nil {
+ planInfoMap["plan_type"] = planInfo.PlanType
+ }
+ if planInfo.Currency != nil {
+ planInfoMap["currency"] = planInfo.Currency
+ }
+ if planInfo.Flux != nil {
+ planInfoMap["flux"] = planInfo.Flux
+ }
+ if planInfo.Frequency != nil {
+ planInfoMap["frequency"] = planInfo.Frequency
+ }
+ if planInfo.Price != nil {
+ planInfoMap["price"] = planInfo.Price
+ }
+ if planInfo.Request != nil {
+ planInfoMap["request"] = planInfo.Request
+ }
+ if planInfo.SiteNumber != nil {
+ planInfoMap["site_number"] = planInfo.SiteNumber
+ }
+ if planInfo.Area != nil {
+ planInfoMap["area"] = planInfo.Area
+ }
+
+ planInfoList = append(planInfoList, planInfoMap)
+ }
+ _ = d.Set("plan_info_list", planInfoList)
+ }
+
d.SetId("zone_available_plans")
output, ok := d.GetOk("result_output_file")
@@ -126,5 +148,6 @@ func dataSourceTencentCloudTeoZoneAvailablePlansRead(d *schema.ResourceData, met
return e
}
}
+
return nil
}
diff --git a/tencentcloud/data_source_tc_teo_zone_available_plans_test.go b/tencentcloud/data_source_tc_teo_zone_available_plans_test.go
new file mode 100644
index 0000000000..744ea9d03a
--- /dev/null
+++ b/tencentcloud/data_source_tc_teo_zone_available_plans_test.go
@@ -0,0 +1,31 @@
+package tencentcloud
+
+import (
+ "testing"
+
+ "github.com/hashicorp/terraform-plugin-sdk/helper/resource"
+)
+
+func TestAccTencentCloudTeoZoneAvailablePlansDataSource(t *testing.T) {
+ t.Parallel()
+
+ resource.Test(t, resource.TestCase{
+ PreCheck: func() { testAccPreCheck(t) },
+ Providers: testAccProviders,
+ Steps: []resource.TestStep{
+ {
+ Config: testAccDataSourceTeoZoneAvailablePlans,
+ Check: resource.ComposeTestCheckFunc(
+ testAccCheckTencentCloudDataSourceID("data.tencentcloud_teo_zone_available_plans.zone_available_plans"),
+ ),
+ },
+ },
+ })
+}
+
+const testAccDataSourceTeoZoneAvailablePlans = `
+
+data "tencentcloud_teo_zone_available_plans" "zone_available_plans" {
+ }
+
+`
diff --git a/tencentcloud/data_source_tc_teo_zone_ddos_policy.go b/tencentcloud/data_source_tc_teo_zone_ddos_policy.go
index 2444e27ad2..bd2bb89247 100644
--- a/tencentcloud/data_source_tc_teo_zone_ddos_policy.go
+++ b/tencentcloud/data_source_tc_teo_zone_ddos_policy.go
@@ -1,10 +1,10 @@
/*
-Use this data source to query zone ddos policy.
+Use this data source to query detailed information of teo zoneDDoSPolicy
Example Usage
```hcl
-data "tencentcloud_teo_zone_ddos_policy" "example" {
+data "tencentcloud_teo_zone_ddos_policy" "zoneDDoSPolicy" {
zone_id = ""
}
```
@@ -14,32 +14,32 @@ package tencentcloud
import (
"context"
"log"
- "strconv"
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
- teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220106"
+ teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901"
)
-func dataSourceTencentCloudTeoZoneDdosPolicy() *schema.Resource {
+func dataSourceTencentCloudTeoZoneDDoSPolicy() *schema.Resource {
return &schema.Resource{
- Read: dataSourceTencentCloudTeoZoneDdosPolicyRead,
-
+ Read: dataSourceTencentCloudTeoZoneDDoSPolicyRead,
Schema: map[string]*schema.Schema{
"zone_id": {
Type: schema.TypeString,
- Optional: true,
+ Required: true,
Description: "Site ID.",
},
- "app_id": {
- Type: schema.TypeString,
- Computed: true,
- Description: "App ID.",
- },
+
+ //"app_id": {
+ // Type: schema.TypeInt,
+ // Computed: true,
+ // Description: "AppID of the account.",
+ //},
+
"shield_areas": {
Type: schema.TypeList,
Computed: true,
- Description: "Shield areas of the zone.",
+ Description: "Shielded areas of the zone.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"zone_id": {
@@ -77,15 +77,10 @@ func dataSourceTencentCloudTeoZoneDdosPolicy() *schema.Resource {
Computed: true,
Description: "UDP forwarding rule number of layer 4 application.",
},
- "share": {
- Type: schema.TypeBool,
- Computed: true,
- Description: "Whether the resource is shared.",
- },
"application": {
Type: schema.TypeList,
Computed: true,
- Description: "Layer 7 Domain Name Parameters.",
+ Description: "DDoS layer 7 application.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"host": {
@@ -96,17 +91,17 @@ func dataSourceTencentCloudTeoZoneDdosPolicy() *schema.Resource {
"status": {
Type: schema.TypeString,
Computed: true,
- Description: "Status of the subdomain. Note: This field may return null, indicating that no valid value can be obtained, init: waiting to config NS; offline: waiting to enable site accelerating; process: config deployment processing; online: normal status.",
+ Description: "Status of the subdomain. Valid values:- `init`: waiting to config NS.- `offline`: need to enable site accelerating.- `process`: processing the config deployment.- `online`: normal status. Note: This field may return null, indicating that no valid value can be obtained.",
},
"accelerate_type": {
Type: schema.TypeString,
Computed: true,
- Description: "on: Enable; off: Disable.",
+ Description: "Acceleration function switch. Valid values:- `on`: Enable.- `off`: Disable.",
},
"security_type": {
Type: schema.TypeString,
Computed: true,
- Description: "on: Enable; off: Disable.",
+ Description: "Security function switch. Valid values:- `on`: Enable.- `off`: Disable.",
},
},
},
@@ -114,6 +109,7 @@ func dataSourceTencentCloudTeoZoneDdosPolicy() *schema.Resource {
},
},
},
+
"domains": {
Type: schema.TypeList,
Computed: true,
@@ -128,116 +124,146 @@ func dataSourceTencentCloudTeoZoneDdosPolicy() *schema.Resource {
"status": {
Type: schema.TypeString,
Computed: true,
- Description: "Status of the subdomain. Note: This field may return null, indicating that no valid value can be obtained, init: waiting to config NS; offline: waiting to enable site accelerating; process: config deployment processing; online: normal status.",
+ Description: "Status of the subdomain. Valid values:- `init`: waiting to config NS.- `offline`: need to enable site accelerating.- `process`: processing the config deployment.- `online`: normal status. Note: This field may return null, indicating that no valid value can be obtained.",
},
"accelerate_type": {
Type: schema.TypeString,
Computed: true,
- Description: "on: Enable; off: Disable.",
+ Description: "Acceleration function switch. Valid values:- `on`: Enable.- `off`: Disable.",
},
"security_type": {
Type: schema.TypeString,
Computed: true,
- Description: "on: Enable; off: Disable.",
+ Description: "Security function switch. Valid values:- `on`: Enable.- `off`: Disable.",
},
},
},
},
+
"result_output_file": {
Type: schema.TypeString,
Optional: true,
- Description: "Used for save results.",
+ Description: "Used to save results.",
},
},
}
}
-func dataSourceTencentCloudTeoZoneDdosPolicyRead(d *schema.ResourceData, meta interface{}) error {
+func dataSourceTencentCloudTeoZoneDDoSPolicyRead(d *schema.ResourceData, meta interface{}) error {
defer logElapsed("data_source.tencentcloud_teo_zone_ddos_policy.read")()
+ defer inconsistentCheck(d, meta)()
+
+ logId := getLogId(contextNil)
+ ctx := context.WithValue(context.TODO(), logIdKey, logId)
+ var zoneId string
+
+ paramMap := make(map[string]interface{})
+ if v, ok := d.GetOk("zone_id"); ok {
+ zoneId = v.(string)
+ paramMap["zone_id"] = v
+ }
+
+ teoService := TeoService{client: meta.(*TencentCloudClient).apiV3Conn}
- var (
- logId = getLogId(contextNil)
- ctx = context.WithValue(context.TODO(), logIdKey, logId)
- service = TeoService{client: meta.(*TencentCloudClient).apiV3Conn}
- zoneId = d.Get("zone_id").(string)
- ddosPolicy *teo.DescribeZoneDDoSPolicyResponseParams
- err error
- )
-
- if err = resource.Retry(readRetryTimeout, func() *resource.RetryError {
- ddosPolicy, err = service.DescribeZoneDDoSPolicy(ctx, zoneId)
- if err != nil {
- return retryError(err, InternalError)
+ var ddosPolicy *teo.DescribeZoneDDoSPolicyResponseParams
+ err := resource.Retry(readRetryTimeout, func() *resource.RetryError {
+ results, e := teoService.DescribeTeoZoneDDoSPolicyByFilter(ctx, paramMap)
+ if e != nil {
+ return retryError(e)
}
+ ddosPolicy = results
return nil
- }); err != nil {
+ })
+ if err != nil {
+ log.Printf("[CRITAL]%s read Teo planInfo failed, reason:%+v", logId, err)
return err
}
- appId := strconv.FormatInt(*ddosPolicy.AppId, 10)
-
- shieldAreasList := make([]map[string]interface{}, 0, len(ddosPolicy.ShieldAreas))
- shieldAreas := ddosPolicy.ShieldAreas
- for _, v := range shieldAreas {
- applications := make([]map[string]interface{}, 0, len(v.Application))
- for _, vv := range v.Application {
- application := map[string]interface{}{
- "host": vv.Host,
- "status": vv.Status,
- "accelerate_type": vv.AccelerateType,
- "security_type": vv.SecurityType,
+ shieldAreasList := []interface{}{}
+ if ddosPolicy != nil {
+ for _, shieldAreas := range ddosPolicy.ShieldAreas {
+ shieldAreasMap := map[string]interface{}{}
+ if shieldAreas.ZoneId != nil {
+ shieldAreasMap["zone_id"] = shieldAreas.ZoneId
}
- applications = append(applications, application)
- }
- shieldArea := map[string]interface{}{
- "zone_id": v.ZoneId,
- "policy_id": v.PolicyId,
- "type": v.Type,
- "entity_name": v.EntityName,
- "application": applications,
- "tcp_num": v.TcpNum,
- "udp_num": v.UdpNum,
- "entity": v.Entity,
- "share": v.Share,
- }
- shieldAreasList = append(shieldAreasList, shieldArea)
- }
- if err = d.Set("shield_areas", shieldAreasList); err != nil {
- log.Printf("[CRITAL]%s provider set list fail, reason:%s", logId, err.Error())
- return err
- }
+ if shieldAreas.PolicyId != nil {
+ shieldAreasMap["policy_id"] = shieldAreas.PolicyId
+ }
+ if shieldAreas.Type != nil {
+ shieldAreasMap["type"] = shieldAreas.Type
+ }
+ if shieldAreas.Entity != nil {
+ shieldAreasMap["entity"] = shieldAreas.Entity
+ }
+ if shieldAreas.EntityName != nil {
+ shieldAreasMap["entity_name"] = shieldAreas.EntityName
+ }
+ if shieldAreas.TcpNum != nil {
+ shieldAreasMap["tcp_num"] = shieldAreas.TcpNum
+ }
+ if shieldAreas.UdpNum != nil {
+ shieldAreasMap["udp_num"] = shieldAreas.UdpNum
+ }
+ if shieldAreas.DDoSHosts != nil {
+ applicationList := []interface{}{}
+ for _, ddosHost := range shieldAreas.DDoSHosts {
+ applicationMap := map[string]interface{}{}
+ if ddosHost.Host != nil {
+ applicationMap["host"] = ddosHost.Host
+ }
+ if ddosHost.Status != nil {
+ applicationMap["status"] = ddosHost.Status
+ }
+ if ddosHost.AccelerateType != nil {
+ applicationMap["accelerate_type"] = ddosHost.AccelerateType
+ }
+ if ddosHost.SecurityType != nil {
+ applicationMap["security_type"] = ddosHost.SecurityType
+ }
- domainsList := make([]map[string]interface{}, 0, len(ddosPolicy.Domains))
- for _, v := range ddosPolicy.Domains {
- application := map[string]interface{}{
- "host": v.Host,
- "status": v.Status,
- "accelerate_type": v.AccelerateType,
- "security_type": v.SecurityType,
+ applicationList = append(applicationList, applicationMap)
+ }
+ shieldAreasMap["application"] = applicationList
+ }
+
+ shieldAreasList = append(shieldAreasList, shieldAreasMap)
}
- domainsList = append(domainsList, application)
- }
- if err = d.Set("domains", domainsList); err != nil {
- log.Printf("[CRITAL]%s provider set list fail, reason:%s", logId, err.Error())
- return err
+ _ = d.Set("shield_areas", shieldAreasList)
}
- if err = d.Set("app_id", appId); err != nil {
- log.Printf("[CRITAL]%s provider set list fail, reason:%s", logId, err.Error())
- return err
+ ddosHostList := []interface{}{}
+ if ddosPolicy != nil {
+ for _, planInfo := range ddosPolicy.DDoSHosts {
+ ddosHostMap := map[string]interface{}{}
+ if planInfo.Host != nil {
+ ddosHostMap["host"] = planInfo.Host
+ }
+ if planInfo.Status != nil {
+ ddosHostMap["status"] = planInfo.Status
+ }
+ if planInfo.AccelerateType != nil {
+ ddosHostMap["accelerate_type"] = planInfo.AccelerateType
+ }
+ if planInfo.SecurityType != nil {
+ ddosHostMap["security_type"] = planInfo.SecurityType
+ }
+
+ ddosHostList = append(ddosHostList, ddosHostMap)
+ }
+ _ = d.Set("domains", ddosHostList)
}
- d.SetId(appId)
+ d.SetId(zoneId)
output, ok := d.GetOk("result_output_file")
if ok && output.(string) != "" {
if e := writeToFile(output.(string), map[string]interface{}{
- "app_id": appId,
"Shield_areas": shieldAreasList,
- "domains": domainsList,
+ "domains": ddosHostList,
}); e != nil {
return e
}
}
+
return nil
}
diff --git a/tencentcloud/data_source_tc_teo_zone_ddos_policy_test.go b/tencentcloud/data_source_tc_teo_zone_ddos_policy_test.go
new file mode 100644
index 0000000000..de1120c996
--- /dev/null
+++ b/tencentcloud/data_source_tc_teo_zone_ddos_policy_test.go
@@ -0,0 +1,32 @@
+package tencentcloud
+
+import (
+ "testing"
+
+ "github.com/hashicorp/terraform-plugin-sdk/helper/resource"
+)
+
+func TestAccTencentCloudTeoZoneDDoSPolicyDataSource(t *testing.T) {
+ t.Parallel()
+
+ resource.Test(t, resource.TestCase{
+ PreCheck: func() { testAccPreCheck(t) },
+ Providers: testAccProviders,
+ Steps: []resource.TestStep{
+ {
+ Config: testAccDataSourceTeoZoneDDoSPolicy,
+ Check: resource.ComposeTestCheckFunc(
+ testAccCheckTencentCloudDataSourceID("data.tencentcloud_teo_zone_ddos_policy.zone_ddos_policy"),
+ ),
+ },
+ },
+ })
+}
+
+const testAccDataSourceTeoZoneDDoSPolicy = `
+
+data "tencentcloud_teo_zone_ddos_policy" "zone_ddos_policy" {
+ zone_id = ""
+}
+
+`
diff --git a/tencentcloud/internal/helper/error.go b/tencentcloud/internal/helper/error.go
index 0ef6a1073d..94cfa8dc0c 100644
--- a/tencentcloud/internal/helper/error.go
+++ b/tencentcloud/internal/helper/error.go
@@ -1,6 +1,7 @@
package helper
import (
+ "errors"
"fmt"
"os"
"runtime"
@@ -141,3 +142,11 @@ func WrapError(cause error, id, requestId string) error {
frame: frame,
}
}
+
+func UnwarpSDKError(err error) *sdkErrors.TencentCloudSDKError {
+ var result *sdkErrors.TencentCloudSDKError
+ if errors.As(err, &result) {
+ return result
+ }
+ return nil
+}
diff --git a/tencentcloud/provider.go b/tencentcloud/provider.go
index cc024b75ff..c5dff158ea 100644
--- a/tencentcloud/provider.go
+++ b/tencentcloud/provider.go
@@ -672,6 +672,12 @@ TencentCloud Elastic Microservice(TEM)
TencentCloud EdgeOne(TEO)
Data Source
tencentcloud_teo_zone_available_plans
+ tencentcloud_teo_bot_managed_rules
+ tencentcloud_teo_bot_portrait_rules
+ tencentcloud_teo_rule_engine_settings
+ tencentcloud_teo_security_policy_regions
+ tencentcloud_teo_waf_rule_groups
+ tencentcloud_teo_zone_ddos_policy
Resource
tencentcloud_teo_zone
@@ -681,10 +687,12 @@ TencentCloud EdgeOne(TEO)
tencentcloud_teo_load_balancing
tencentcloud_teo_origin_group
tencentcloud_teo_rule_engine
+ tencentcloud_teo_rule_engine_priority
tencentcloud_teo_application_proxy
tencentcloud_teo_application_proxy_rule
- tencentcloud_teo_host_certificate
- tencentcloud_teo_default_certificate
+ tencentcloud_teo_ddos_policy
+ tencentcloud_teo_security_policy
+ tencentcloud_teo_custom_error_page
*/
package tencentcloud
@@ -974,6 +982,12 @@ func Provider() terraform.ResourceProvider {
"tencentcloud_cdh_instances": dataSourceTencentCloudCdhInstances(),
"tencentcloud_dayu_eip": dataSourceTencentCloudDayuEip(),
"tencentcloud_teo_zone_available_plans": dataSourceTencentCloudTeoZoneAvailablePlans(),
+ "tencentcloud_teo_bot_managed_rules": dataSourceTencentCloudTeoBotManagedRules(),
+ "tencentcloud_teo_bot_portrait_rules": dataSourceTencentCloudTeoBotPortraitRules(),
+ "tencentcloud_teo_rule_engine_settings": dataSourceTencentCloudTeoRuleEngineSettings(),
+ "tencentcloud_teo_security_policy_regions": dataSourceTencentCloudTeoSecurityPolicyRegions(),
+ "tencentcloud_teo_waf_rule_groups": dataSourceTencentCloudTeoWafRuleGroups(),
+ "tencentcloud_teo_zone_ddos_policy": dataSourceTencentCloudTeoZoneDDoSPolicy(),
},
ResourcesMap: map[string]*schema.Resource{
@@ -1224,11 +1238,14 @@ func Provider() terraform.ResourceProvider {
"tencentcloud_teo_load_balancing": resourceTencentCloudTeoLoadBalancing(),
"tencentcloud_teo_origin_group": resourceTencentCloudTeoOriginGroup(),
"tencentcloud_teo_rule_engine": resourceTencentCloudTeoRuleEngine(),
+ "tencentcloud_teo_rule_engine_priority": resourceTencentCloudTeoRuleEnginePriority(),
"tencentcloud_teo_application_proxy": resourceTencentCloudTeoApplicationProxy(),
"tencentcloud_teo_application_proxy_rule": resourceTencentCloudTeoApplicationProxyRule(),
- "tencentcloud_teo_host_certificate": resourceTencentCloudTeoHostCertificate(),
- "tencentcloud_teo_default_certificate": resourceTencentCloudTeoDefaultCertificate(),
"tencentcloud_teo_ddos_policy": resourceTencentCloudTeoDdosPolicy(),
+ "tencentcloud_teo_security_policy": resourceTencentCloudTeoSecurityPolicy(),
+ "tencentcloud_teo_custom_error_page": resourceTencentCloudTeoCustomErrorPage(),
+ // "tencentcloud_teo_host_certificate": resourceTencentCloudTeoHostCertificate(),
+ // "tencentcloud_teo_default_certificate": resourceTencentCloudTeoDefaultCertificate(),
},
ConfigureFunc: providerConfigure,
diff --git a/tencentcloud/resource_tc_teo_application_proxy.go b/tencentcloud/resource_tc_teo_application_proxy.go
index 69454162e9..1c0d67212c 100644
--- a/tencentcloud/resource_tc_teo_application_proxy.go
+++ b/tencentcloud/resource_tc_teo_application_proxy.go
@@ -5,23 +5,27 @@ Example Usage
```hcl
resource "tencentcloud_teo_application_proxy" "application_proxy" {
- zone_id = tencentcloud_teo_zone.zone.id
- zone_name = "sfurnace.work"
-
accelerate_type = 1
- security_type = 1
plat_type = "domain"
- proxy_name = "www.sfurnace.work"
- proxy_type = "hostname"
+ proxy_name = "applicationProxies-test-1"
+ proxy_type = "instance"
+ security_type = 1
session_persist_time = 2400
+ status = "online"
+ tags = {}
+ zone_id = "zone-2983wizgxqvm"
+
+ ipv6 {
+ switch = "off"
+ }
}
```
Import
-teo application_proxy can be imported using the id, e.g.
+teo application_proxy can be imported using the zoneId#proxyId, e.g.
```
-$ terraform import tencentcloud_teo_application_proxy.application_proxy zoneId#proxyId
+$ terraform import tencentcloud_teo_application_proxy.application_proxy zone-2983wizgxqvm#proxy-6972528a-373a-11ed-afca-52540044a456
```
*/
package tencentcloud
@@ -34,7 +38,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
- teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220106"
+ teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901"
"github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"
)
@@ -54,54 +58,67 @@ func resourceTencentCloudTeoApplicationProxy() *schema.Resource {
Description: "Site ID.",
},
- "zone_name": {
+ "proxy_id": {
Type: schema.TypeString,
- Required: true,
- Description: "Site name.",
+ Computed: true,
+ Description: "Proxy ID.",
},
"proxy_name": {
Type: schema.TypeString,
Required: true,
- Description: "Layer-4 proxy name.",
+ Description: "When `ProxyType` is hostname, `ProxyName` is the domain or subdomain name.When `ProxyType` is instance, `ProxyName` is the name of proxy application.",
+ },
+
+ "proxy_type": {
+ Type: schema.TypeString,
+ Optional: true,
+ Computed: true,
+ Description: "Layer 4 proxy mode. Valid values:- `hostname`: subdomain mode.- `instance`: instance mode.",
},
"plat_type": {
Type: schema.TypeString,
Required: true,
- Description: "Scheduling mode.- ip: Anycast IP.- domain: CNAME.",
+ Description: "Scheduling mode.- `ip`: Anycast IP.- `domain`: CNAME.",
+ },
+
+ "area": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Acceleration area. Valid values: `mainland`, `overseas`.",
},
"security_type": {
Type: schema.TypeInt,
Required: true,
- Description: "- 0: Disable security protection.- 1: Enable security protection.",
+ Description: "- `0`: Disable security protection.- `1`: Enable security protection.",
},
"accelerate_type": {
Type: schema.TypeInt,
Required: true,
- Description: "- 0: Disable acceleration.- 1: Enable acceleration.",
+ Description: "- `0`: Disable acceleration.- `1`: Enable acceleration.",
},
"session_persist_time": {
Type: schema.TypeInt,
Optional: true,
Computed: true,
- Description: "Session persistence duration. Value range: 30-3600 (in seconds).",
+ Description: "Session persistence duration. Value range: 30-3600 (in seconds), default value is 600.",
},
- "proxy_type": {
+ "status": {
Type: schema.TypeString,
Optional: true,
Computed: true,
- Description: "Specifies how a layer-4 proxy is created.- hostname: Subdomain name.- instance: Instance.",
+ Description: "Status of this application proxy. Valid values to set is `online` and `offline`.- `online`: Enable.- `offline`: Disable.- `progress`: Deploying.- `stopping`: Deactivating.- `fail`: Deploy or deactivate failed.",
},
- "proxy_id": {
+ "ban_status": {
Type: schema.TypeString,
Computed: true,
- Description: "Proxy ID.",
+ Description: "Application proxy block status. Valid values: `banned`, `banning`, `recover`, `recovering`.",
},
"schedule_value": {
@@ -113,16 +130,33 @@ func resourceTencentCloudTeoApplicationProxy() *schema.Resource {
Description: "Scheduling information.",
},
- "update_time": {
+ "host_id": {
Type: schema.TypeString,
Computed: true,
- Description: "Last modification date.",
+ Description: "When `ProxyType` is hostname, this field is the ID of the subdomain.",
},
- "host_id": {
+ "ipv6": {
+ Type: schema.TypeList,
+ MaxItems: 1,
+ Optional: true,
+ Computed: true,
+ Description: "IPv6 access configuration.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "switch": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "- `on`: Enable.- `off`: Disable.",
+ },
+ },
+ },
+ },
+
+ "update_time": {
Type: schema.TypeString,
Computed: true,
- Description: "ID of the layer-7 domain name.",
+ Description: "Last modification date.",
},
},
}
@@ -141,31 +175,28 @@ func resourceTencentCloudTeoApplicationProxyCreate(d *schema.ResourceData, meta
proxyId string
)
- request.ForwardClientIp = helper.String("")
- request.SessionPersist = helper.Bool(true)
-
if v, ok := d.GetOk("zone_id"); ok {
zoneId = v.(string)
request.ZoneId = helper.String(v.(string))
}
- if v, ok := d.GetOk("zone_name"); ok {
- request.ZoneName = helper.String(v.(string))
- }
-
if v, ok := d.GetOk("proxy_name"); ok {
request.ProxyName = helper.String(v.(string))
}
+ if v, ok := d.GetOk("proxy_type"); ok {
+ request.ProxyType = helper.String(v.(string))
+ }
+
if v, ok := d.GetOk("plat_type"); ok {
request.PlatType = helper.String(v.(string))
}
- if v, ok := d.GetOk("security_type"); ok {
+ if v := d.Get("security_type"); v != nil {
request.SecurityType = helper.IntInt64(v.(int))
}
- if v, ok := d.GetOk("accelerate_type"); ok {
+ if v := d.Get("accelerate_type"); v != nil {
request.AccelerateType = helper.IntInt64(v.(int))
}
@@ -173,11 +204,24 @@ func resourceTencentCloudTeoApplicationProxyCreate(d *schema.ResourceData, meta
request.SessionPersistTime = helper.IntUint64(v.(int))
}
- if v, ok := d.GetOk("proxy_type"); ok {
- request.ProxyType = helper.String(v.(string))
+ if dMap, ok := helper.InterfacesHeadMap(d, "ipv6"); ok {
+ ipv6Access := teo.Ipv6{}
+ if v, ok := dMap["switch"]; ok {
+ ipv6Access.Switch = helper.String(v.(string))
+ }
+ request.Ipv6 = &ipv6Access
}
- err := resource.Retry(writeRetryTimeout, func() *resource.RetryError {
+ service := TeoService{client: meta.(*TencentCloudClient).apiV3Conn}
+ ctx := context.WithValue(context.TODO(), logIdKey, logId)
+
+ err := service.CheckZoneComplete(ctx, zoneId)
+ if err != nil {
+ log.Printf("[CRITAL]%s create teo dnsRecord failed, reason:%+v", logId, err)
+ return err
+ }
+
+ err = resource.Retry(writeRetryTimeout, func() *resource.RetryError {
result, e := meta.(*TencentCloudClient).apiV3Conn.UseTeoClient().CreateApplicationProxy(request)
if e != nil {
return retryError(e)
@@ -196,6 +240,24 @@ func resourceTencentCloudTeoApplicationProxyCreate(d *schema.ResourceData, meta
proxyId = *response.Response.ProxyId
+ err = resource.Retry(6*readRetryTimeout, func() *resource.RetryError {
+ instance, errRet := service.DescribeTeoApplicationProxy(ctx, zoneId, proxyId)
+ if errRet != nil {
+ return retryError(errRet, InternalError)
+ }
+ if *instance.Status == "online" {
+ return nil
+ }
+ if *instance.Status == "fail" {
+ return resource.NonRetryableError(fmt.Errorf("applicationProxy status is %v, operate failed.",
+ *instance.Status))
+ }
+ return resource.RetryableError(fmt.Errorf("applicationProxy status is %v, retry...", *instance.Status))
+ })
+ if err != nil {
+ return err
+ }
+
d.SetId(zoneId + FILED_SP + proxyId)
return resourceTencentCloudTeoApplicationProxyRead(d, meta)
}
@@ -231,18 +293,26 @@ func resourceTencentCloudTeoApplicationProxyRead(d *schema.ResourceData, meta in
_ = d.Set("zone_id", applicationProxy.ZoneId)
}
- if applicationProxy.ZoneName != nil {
- _ = d.Set("zone_name", applicationProxy.ZoneName)
+ if applicationProxy.ProxyId != nil {
+ _ = d.Set("proxy_id", applicationProxy.ProxyId)
}
if applicationProxy.ProxyName != nil {
_ = d.Set("proxy_name", applicationProxy.ProxyName)
}
+ if applicationProxy.ProxyType != nil {
+ _ = d.Set("proxy_type", applicationProxy.ProxyType)
+ }
+
if applicationProxy.PlatType != nil {
_ = d.Set("plat_type", applicationProxy.PlatType)
}
+ if applicationProxy.Area != nil {
+ _ = d.Set("area", applicationProxy.Area)
+ }
+
if applicationProxy.SecurityType != nil {
_ = d.Set("security_type", applicationProxy.SecurityType)
}
@@ -255,26 +325,35 @@ func resourceTencentCloudTeoApplicationProxyRead(d *schema.ResourceData, meta in
_ = d.Set("session_persist_time", applicationProxy.SessionPersistTime)
}
- if applicationProxy.ProxyType != nil {
- _ = d.Set("proxy_type", applicationProxy.ProxyType)
+ if applicationProxy.Status != nil {
+ _ = d.Set("status", applicationProxy.Status)
}
- if applicationProxy.ProxyId != nil {
- _ = d.Set("proxy_id", applicationProxy.ProxyId)
+ if applicationProxy.BanStatus != nil {
+ _ = d.Set("ban_status", applicationProxy.BanStatus)
}
if applicationProxy.ScheduleValue != nil {
_ = d.Set("schedule_value", applicationProxy.ScheduleValue)
}
- if applicationProxy.UpdateTime != nil {
- _ = d.Set("update_time", applicationProxy.UpdateTime)
- }
-
if applicationProxy.HostId != nil {
_ = d.Set("host_id", applicationProxy.HostId)
}
+ if applicationProxy.Ipv6 != nil {
+ iPv6Map := map[string]interface{}{}
+ if applicationProxy.Ipv6.Switch != nil {
+ iPv6Map["switch"] = applicationProxy.Ipv6.Switch
+ }
+
+ _ = d.Set("ipv6", []interface{}{iPv6Map})
+ }
+
+ if applicationProxy.UpdateTime != nil {
+ _ = d.Set("update_time", applicationProxy.UpdateTime)
+ }
+
return nil
}
@@ -283,7 +362,6 @@ func resourceTencentCloudTeoApplicationProxyUpdate(d *schema.ResourceData, meta
defer inconsistentCheck(d, meta)()
logId := getLogId(contextNil)
-
request := teo.NewModifyApplicationProxyRequest()
idSplit := strings.Split(d.Id(), FILED_SP)
@@ -295,19 +373,19 @@ func resourceTencentCloudTeoApplicationProxyUpdate(d *schema.ResourceData, meta
request.ZoneId = &zoneId
request.ProxyId = &proxyId
- request.ForwardClientIp = helper.String("")
- request.SessionPersist = helper.Bool(true)
-
- if v, ok := d.GetOk("proxy_name"); ok {
- request.ProxyName = helper.String(v.(string))
- }
if d.HasChange("zone_id") {
return fmt.Errorf("`zone_id` do not support change now.")
}
- if d.HasChange("zone_name") {
- return fmt.Errorf("`zone_name` do not support change now.")
+ if v, ok := d.GetOk("proxy_name"); ok {
+ request.ProxyName = helper.String(v.(string))
+ }
+
+ if d.HasChange("proxy_type") {
+ if v, ok := d.GetOk("proxy_type"); ok {
+ request.ProxyType = helper.String(v.(string))
+ }
}
if d.HasChange("plat_type") {
@@ -328,9 +406,14 @@ func resourceTencentCloudTeoApplicationProxyUpdate(d *schema.ResourceData, meta
}
}
- if d.HasChange("proxy_type") {
- if v, ok := d.GetOk("proxy_type"); ok {
- request.ProxyType = helper.String(v.(string))
+ if d.HasChange("ipv6") {
+ if dMap, ok := helper.InterfacesHeadMap(d, "ipv6"); ok {
+ ipv6Access := teo.Ipv6{}
+ if v, ok := dMap["switch"]; ok {
+ ipv6Access.Switch = helper.String(v.(string))
+ }
+
+ request.Ipv6 = &ipv6Access
}
}
@@ -346,9 +429,37 @@ func resourceTencentCloudTeoApplicationProxyUpdate(d *schema.ResourceData, meta
})
if err != nil {
+ log.Printf("[CRITAL]%s create teo applicationProxy failed, reason:%+v", logId, err)
return err
}
+ if d.HasChange("status") {
+ if v, ok := d.GetOk("status"); ok {
+ statusRequest := teo.NewModifyApplicationProxyStatusRequest()
+
+ statusRequest.ZoneId = &zoneId
+ statusRequest.ProxyId = &proxyId
+ statusRequest.Status = helper.String(v.(string))
+
+ statusErr := resource.Retry(writeRetryTimeout, func() *resource.RetryError {
+ statusResult, e := meta.(*TencentCloudClient).apiV3Conn.UseTeoClient().ModifyApplicationProxyStatus(statusRequest)
+ if e != nil {
+ return retryError(e)
+ } else {
+ log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
+ logId, request.GetAction(), request.ToJsonString(), statusResult.ToJsonString())
+ }
+ return nil
+ })
+
+ if statusErr != nil {
+ log.Printf("[CRITAL]%s create teo applicationProxy failed, reason:%+v", logId, statusErr)
+ return statusErr
+ }
+ _ = d.Set("status", v.(string))
+ }
+ }
+
return resourceTencentCloudTeoApplicationProxyRead(d, meta)
}
@@ -358,7 +469,6 @@ func resourceTencentCloudTeoApplicationProxyDelete(d *schema.ResourceData, meta
logId := getLogId(contextNil)
ctx := context.WithValue(context.TODO(), logIdKey, logId)
-
service := TeoService{client: meta.(*TencentCloudClient).apiV3Conn}
idSplit := strings.Split(d.Id(), FILED_SP)
@@ -368,7 +478,36 @@ func resourceTencentCloudTeoApplicationProxyDelete(d *schema.ResourceData, meta
zoneId := idSplit[0]
proxyId := idSplit[1]
- if err := service.DeleteTeoApplicationProxyById(ctx, zoneId, proxyId); err != nil {
+ err := resource.Retry(readRetryTimeout, func() *resource.RetryError {
+ e := resourceTencentCloudTeoApplicationProxyRead(d, meta)
+ if e != nil {
+ log.Printf("[CRITAL]%s get teo applicationProxy failed, reason:%+v", logId, e)
+ return resource.RetryableError(e)
+ }
+
+ status, _ := d.Get("status").(string)
+ if status == "offline" {
+ return nil
+ }
+ if status == "stopping" {
+ return resource.RetryableError(fmt.Errorf("applicationProxy stopping"))
+ }
+
+ statusRequest := teo.NewModifyApplicationProxyStatusRequest()
+ statusRequest.ZoneId = &zoneId
+ statusRequest.ProxyId = &proxyId
+ statusRequest.Status = helper.String("offline")
+ _, e = meta.(*TencentCloudClient).apiV3Conn.UseTeoClient().ModifyApplicationProxyStatus(statusRequest)
+ if e != nil {
+ return resource.NonRetryableError(fmt.Errorf("setting applicationProxy `status` to offline failed, reason: %v", e))
+ }
+ return resource.RetryableError(fmt.Errorf("setting applicationProxy `status` to offline"))
+ })
+ if err != nil {
+ return err
+ }
+
+ if err = service.DeleteTeoApplicationProxyById(ctx, zoneId, proxyId); err != nil {
return err
}
diff --git a/tencentcloud/resource_tc_teo_application_proxy_rule.go b/tencentcloud/resource_tc_teo_application_proxy_rule.go
index ae6ca3f467..69ea1ef903 100644
--- a/tencentcloud/resource_tc_teo_application_proxy_rule.go
+++ b/tencentcloud/resource_tc_teo_application_proxy_rule.go
@@ -5,27 +5,27 @@ Example Usage
```hcl
resource "tencentcloud_teo_application_proxy_rule" "application_proxy_rule" {
- zone_id = tencentcloud_teo_zone.zone.id
- proxy_id = tencentcloud_teo_application_proxy.application_proxy_rule.proxy_id
-
forward_client_ip = "TOA"
origin_type = "custom"
origin_value = [
- "1.1.1.1:80",
+ "127.0.0.1:8081",
]
- port = [
- "80",
+ port = [
+ "8083",
]
- proto = "TCP"
- session_persist = false
+ proto = "TCP"
+ proxy_id = "proxy-6972528a-373a-11ed-afca-52540044a456"
+ session_persist = false
+ status = "online"
+ zone_id = "zone-2983wizgxqvm"
}
```
Import
-teo application_proxy_rule can be imported using the id, e.g.
+teo application_proxy_rule can be imported using the zoneId#proxyId#ruleId, e.g.
```
-$ terraform import tencentcloud_teo_application_proxy_rule.application_proxy_rule zoneId#proxyId#ruleId
+$ terraform import tencentcloud_teo_application_proxy_rule.application_proxy_rule zone-2983wizgxqvm#proxy-6972528a-373a-11ed-afca-52540044a456#rule-90b13bb4-373a-11ed-8794-525400eddfed
```
*/
package tencentcloud
@@ -38,7 +38,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
- teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220106"
+ teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901"
"github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"
)
@@ -55,14 +55,12 @@ func resourceTencentCloudTeoApplicationProxyRule() *schema.Resource {
"zone_id": {
Type: schema.TypeString,
Required: true,
- ForceNew: true,
Description: "Site ID.",
},
"proxy_id": {
Type: schema.TypeString,
Required: true,
- ForceNew: true,
Description: "Proxy ID.",
},
@@ -90,7 +88,7 @@ func resourceTencentCloudTeoApplicationProxyRule() *schema.Resource {
"origin_type": {
Type: schema.TypeString,
Required: true,
- Description: "Origin server type.- custom: Specified origins.- origins: An origin group.- load_balancing: A load balancer.",
+ Description: "Origin server type.- `custom`: Specified origins.- `origins`: An origin group.",
},
"origin_value": {
@@ -99,21 +97,28 @@ func resourceTencentCloudTeoApplicationProxyRule() *schema.Resource {
Type: schema.TypeString,
},
Required: true,
- Description: "Origin server information.When OriginType is custom, this field value indicates multiple origin servers in either of the following formats:- IP:Port- Domain name:Port.When OriginType is origins, it indicates the origin group ID.",
+ Description: "Origin server information.When `OriginType` is custom, this field value indicates multiple origin servers in either of the following formats:- `IP`:Port- Domain name:Port.When `OriginType` is origins, it indicates the origin group ID.",
+ },
+
+ "status": {
+ Type: schema.TypeString,
+ Optional: true,
+ Computed: true,
+ Description: "Status of this application proxy rule. Valid values to set is `online` and `offline`.- `online`: Enable.- `offline`: Disable.- `progress`: Deploying.- `stopping`: Disabling.- `fail`: Deployment/Disabling failed.",
},
"forward_client_ip": {
Type: schema.TypeString,
Optional: true,
Computed: true,
- Description: "Passes the client IP.When Proto is TCP, valid values:- TOA: Pass the client IP via TOA.- PPV1: Pass the client IP via Proxy Protocol V1.- PPV2: Pass the client IP via Proxy Protocol V2.- OFF: Do not pass the client IP.When Proto=UDP, valid values:- PPV2: Pass the client IP via Proxy Protocol V2.- OFF: Do not pass the client IP.",
+ Description: "Passes the client IP. Default value is OFF.When Proto is TCP, valid values:- `TOA`: Pass the client IP via TOA.- `PPV1`: Pass the client IP via Proxy Protocol V1.- `PPV2`: Pass the client IP via Proxy Protocol V2.- `OFF`: Do not pass the client IP.When Proto=UDP, valid values:- `PPV2`: Pass the client IP via Proxy Protocol V2.- `OFF`: Do not pass the client IP.",
},
"session_persist": {
Type: schema.TypeBool,
Optional: true,
Computed: true,
- Description: "Specifies whether to enable session persistence.",
+ Description: "Specifies whether to enable session persistence. Default value is false.",
},
},
}
@@ -143,10 +148,6 @@ func resourceTencentCloudTeoApplicationProxyRuleCreate(d *schema.ResourceData, m
request.ProxyId = helper.String(v.(string))
}
- if v, ok := d.GetOk("proto"); ok {
- request.Proto = helper.String(v.(string))
- }
-
if v, ok := d.GetOk("port"); ok {
portSet := v.(*schema.Set).List()
for i := range portSet {
@@ -155,6 +156,10 @@ func resourceTencentCloudTeoApplicationProxyRuleCreate(d *schema.ResourceData, m
}
}
+ if v, ok := d.GetOk("proto"); ok {
+ request.Proto = helper.String(v.(string))
+ }
+
if v, ok := d.GetOk("origin_type"); ok {
request.OriginType = helper.String(v.(string))
}
@@ -166,7 +171,6 @@ func resourceTencentCloudTeoApplicationProxyRuleCreate(d *schema.ResourceData, m
request.OriginValue = append(request.OriginValue, &originValue)
}
}
-
if v, ok := d.GetOk("forward_client_ip"); ok {
request.ForwardClientIp = helper.String(v.(string))
}
@@ -178,7 +182,7 @@ func resourceTencentCloudTeoApplicationProxyRuleCreate(d *schema.ResourceData, m
err := resource.Retry(writeRetryTimeout, func() *resource.RetryError {
result, e := meta.(*TencentCloudClient).apiV3Conn.UseTeoClient().CreateApplicationProxyRule(request)
if e != nil {
- return retryError(e)
+ return retryError(e, InternalError)
} else {
log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
logId, request.GetAction(), request.ToJsonString(), result.ToJsonString())
@@ -192,7 +196,29 @@ func resourceTencentCloudTeoApplicationProxyRuleCreate(d *schema.ResourceData, m
return err
}
- ruleId = *response.Response.RuleId
+ if response.Response.RuleId != nil {
+ ruleId = *response.Response.RuleId
+ }
+
+ service := TeoService{client: meta.(*TencentCloudClient).apiV3Conn}
+ ctx := context.WithValue(context.TODO(), logIdKey, logId)
+
+ err = resource.Retry(60*readRetryTimeout, func() *resource.RetryError {
+ instance, errRet := service.DescribeTeoApplicationProxyRule(ctx, zoneId, proxyId, ruleId)
+ if errRet != nil {
+ return retryError(errRet, InternalError)
+ }
+ if *instance.Status == "online" {
+ return nil
+ }
+ if *instance.Status == "fail" {
+ return resource.NonRetryableError(fmt.Errorf("applicationProxyRule status is %v, operate failed.", *instance.Status))
+ }
+ return resource.RetryableError(fmt.Errorf("applicationProxyRule status is %v, retry...", *instance.Status))
+ })
+ if err != nil {
+ return err
+ }
d.SetId(zoneId + FILED_SP + proxyId + FILED_SP + ruleId)
return resourceTencentCloudTeoApplicationProxyRuleRead(d, meta)
@@ -215,43 +241,47 @@ func resourceTencentCloudTeoApplicationProxyRuleRead(d *schema.ResourceData, met
proxyId := idSplit[1]
ruleId := idSplit[2]
- applicationProxyRule, err := service.DescribeTeoApplicationProxyRule(ctx, zoneId, proxyId, ruleId)
+ proxyRule, err := service.DescribeTeoApplicationProxyRule(ctx, zoneId, proxyId, ruleId)
if err != nil {
return err
}
- if applicationProxyRule == nil {
+ if proxyRule == nil {
d.SetId("")
return fmt.Errorf("resource `applicationProxyRule` %s does not exist", ruleId)
}
- if applicationProxyRule.RuleId != nil {
- _ = d.Set("rule_id", applicationProxyRule.RuleId)
+ _ = d.Set("zone_id", zoneId)
+ _ = d.Set("proxy_id", proxyId)
+ _ = d.Set("rule_id", ruleId)
+
+ if proxyRule.Proto != nil {
+ _ = d.Set("proto", proxyRule.Proto)
}
- if applicationProxyRule.Proto != nil {
- _ = d.Set("proto", applicationProxyRule.Proto)
+ if proxyRule.Port != nil {
+ _ = d.Set("port", proxyRule.Port)
}
- if applicationProxyRule.Port != nil {
- _ = d.Set("port", applicationProxyRule.Port)
+ if proxyRule.OriginType != nil {
+ _ = d.Set("origin_type", proxyRule.OriginType)
}
- if applicationProxyRule.OriginType != nil {
- _ = d.Set("origin_type", applicationProxyRule.OriginType)
+ if proxyRule.OriginValue != nil {
+ _ = d.Set("origin_value", proxyRule.OriginValue)
}
- if applicationProxyRule.OriginValue != nil {
- _ = d.Set("origin_value", applicationProxyRule.OriginValue)
+ if proxyRule.Status != nil {
+ _ = d.Set("status", proxyRule.Status)
}
- if applicationProxyRule.ForwardClientIp != nil {
- _ = d.Set("forward_client_ip", applicationProxyRule.ForwardClientIp)
+ if proxyRule.ForwardClientIp != nil {
+ _ = d.Set("forward_client_ip", proxyRule.ForwardClientIp)
}
- if applicationProxyRule.SessionPersist != nil {
- _ = d.Set("session_persist", applicationProxyRule.SessionPersist)
+ if proxyRule.SessionPersist != nil {
+ _ = d.Set("session_persist", proxyRule.SessionPersist)
}
return nil
@@ -278,15 +308,21 @@ func resourceTencentCloudTeoApplicationProxyRuleUpdate(d *schema.ResourceData, m
request.RuleId = &ruleId
if d.HasChange("zone_id") {
+
return fmt.Errorf("`zone_id` do not support change now.")
+
}
if d.HasChange("proxy_id") {
+
return fmt.Errorf("`proxy_id` do not support change now.")
+
}
- if v, ok := d.GetOk("proto"); ok {
- request.Proto = helper.String(v.(string))
+ if d.HasChange("proto") {
+ if v, ok := d.GetOk("proto"); ok {
+ request.Proto = helper.String(v.(string))
+ }
}
if v, ok := d.GetOk("port"); ok {
@@ -301,11 +337,13 @@ func resourceTencentCloudTeoApplicationProxyRuleUpdate(d *schema.ResourceData, m
request.OriginType = helper.String(v.(string))
}
- if v, ok := d.GetOk("origin_value"); ok {
- originValueSet := v.(*schema.Set).List()
- for i := range originValueSet {
- originValue := originValueSet[i].(string)
- request.OriginValue = append(request.OriginValue, &originValue)
+ if d.HasChange("origin_value") {
+ if v, ok := d.GetOk("origin_value"); ok {
+ originValueSet := v.(*schema.Set).List()
+ for i := range originValueSet {
+ originValue := originValueSet[i].(string)
+ request.OriginValue = append(request.OriginValue, &originValue)
+ }
}
}
@@ -333,9 +371,38 @@ func resourceTencentCloudTeoApplicationProxyRuleUpdate(d *schema.ResourceData, m
})
if err != nil {
+ log.Printf("[CRITAL]%s create teo applicationProxyRule failed, reason:%+v", logId, err)
return err
}
+ if d.HasChange("status") {
+ if v, ok := d.GetOk("status"); ok {
+ statusRequest := teo.NewModifyApplicationProxyRuleStatusRequest()
+
+ statusRequest.ZoneId = &zoneId
+ statusRequest.ProxyId = &proxyId
+ statusRequest.RuleId = &ruleId
+ statusRequest.Status = helper.String(v.(string))
+
+ statusErr := resource.Retry(writeRetryTimeout, func() *resource.RetryError {
+ statusResult, e := meta.(*TencentCloudClient).apiV3Conn.UseTeoClient().ModifyApplicationProxyRuleStatus(statusRequest)
+ if e != nil {
+ return retryError(e)
+ } else {
+ log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
+ logId, request.GetAction(), request.ToJsonString(), statusResult.ToJsonString())
+ }
+ return nil
+ })
+
+ if statusErr != nil {
+ log.Printf("[CRITAL]%s create teo applicationProxy failed, reason:%+v", logId, statusErr)
+ return statusErr
+ }
+ _ = d.Set("status", v.(string))
+ }
+ }
+
return resourceTencentCloudTeoApplicationProxyRuleRead(d, meta)
}
@@ -356,7 +423,34 @@ func resourceTencentCloudTeoApplicationProxyRuleDelete(d *schema.ResourceData, m
proxyId := idSplit[1]
ruleId := idSplit[2]
- if err := service.DeleteTeoApplicationProxyRuleById(ctx, zoneId, proxyId, ruleId); err != nil {
+ err := resource.Retry(readRetryTimeout, func() *resource.RetryError {
+ instance, errRet := service.DescribeTeoApplicationProxyRule(ctx, zoneId, proxyId, ruleId)
+ if errRet != nil {
+ return retryError(errRet, InternalError)
+ }
+ if *instance.Status == "offline" {
+ return nil
+ }
+ if *instance.Status == "stopping" {
+ return resource.RetryableError(fmt.Errorf("applicationProxyRule stopping"))
+ }
+
+ statusRequest := teo.NewModifyApplicationProxyRuleStatusRequest()
+ statusRequest.ZoneId = &zoneId
+ statusRequest.ProxyId = &proxyId
+ statusRequest.RuleId = &ruleId
+ statusRequest.Status = helper.String("offline")
+ _, e := meta.(*TencentCloudClient).apiV3Conn.UseTeoClient().ModifyApplicationProxyRuleStatus(statusRequest)
+ if e != nil {
+ return resource.NonRetryableError(fmt.Errorf("setting applicationProxyRule `status` to offline failed, reason: %v", e))
+ }
+ return resource.RetryableError(fmt.Errorf("setting applicationProxyRule `status` to offline"))
+ })
+ if err != nil {
+ return err
+ }
+
+ if err = service.DeleteTeoApplicationProxyRuleById(ctx, zoneId, proxyId, ruleId); err != nil {
return err
}
diff --git a/tencentcloud/resource_tc_teo_custom_error_page.go b/tencentcloud/resource_tc_teo_custom_error_page.go
new file mode 100644
index 0000000000..2d31f089dc
--- /dev/null
+++ b/tencentcloud/resource_tc_teo_custom_error_page.go
@@ -0,0 +1,190 @@
+/*
+Provides a resource to create a teo custom_error_page
+
+Example Usage
+
+```hcl
+resource "tencentcloud_teo_custom_error_page" "error_page_0" {
+ zone_id = data.tencentcloud_teo_zone_ddos_policy.zone_policy.zone_id
+ entity = data.tencentcloud_teo_zone_ddos_policy.zone_policy.shield_areas[0].application[0].host
+
+ name = "test"
+ content = "
"
+}
+
+```
+*/
+package tencentcloud
+
+import (
+ "fmt"
+ "log"
+ "strings"
+
+ "github.com/hashicorp/terraform-plugin-sdk/helper/resource"
+ "github.com/hashicorp/terraform-plugin-sdk/helper/schema"
+ teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901"
+ "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"
+)
+
+func resourceTencentCloudTeoCustomErrorPage() *schema.Resource {
+ return &schema.Resource{
+ Read: resourceTencentCloudTeoCustomErrorPageRead,
+ Create: resourceTencentCloudTeoCustomErrorPageCreate,
+ Update: resourceTencentCloudTeoCustomErrorPageUpdate,
+ Delete: resourceTencentCloudTeoCustomErrorPageDelete,
+
+ Schema: map[string]*schema.Schema{
+ "zone_id": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Site ID.",
+ },
+
+ "entity": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Subdomain.",
+ },
+
+ "page_id": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Page ID.",
+ },
+
+ "name": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Page name.",
+ },
+
+ "content": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Page content.",
+ },
+ },
+ }
+}
+
+func resourceTencentCloudTeoCustomErrorPageCreate(d *schema.ResourceData, meta interface{}) error {
+ defer logElapsed("resource.tencentcloud_teo_custom_error_page.create")()
+ defer inconsistentCheck(d, meta)()
+
+ logId := getLogId(contextNil)
+
+ var (
+ request = teo.NewCreateCustomErrorPageRequest()
+ response *teo.CreateCustomErrorPageResponse
+ zoneId string
+ entity string
+ pageId int64
+ )
+
+ if v, ok := d.GetOk("zone_id"); ok {
+ zoneId = v.(string)
+ request.ZoneId = &zoneId
+ }
+
+ if v, ok := d.GetOk("entity"); ok {
+ entity = v.(string)
+ request.Entity = &entity
+ }
+
+ if v, ok := d.GetOk("name"); ok {
+ request.Name = helper.String(v.(string))
+ }
+
+ if v, ok := d.GetOk("content"); ok {
+ request.Content = helper.String(v.(string))
+ }
+
+ err := resource.Retry(writeRetryTimeout, func() *resource.RetryError {
+ result, e := meta.(*TencentCloudClient).apiV3Conn.UseTeoClient().CreateCustomErrorPage(request)
+ if e != nil {
+ return 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 {
+ log.Printf("[CRITAL]%s create teo customErrorPage failed, reason:%+v", logId, err)
+ return err
+ }
+
+ pageId = *response.Response.PageId
+
+ d.SetId(zoneId + FILED_SP + entity + FILED_SP + helper.Int64ToStr(pageId))
+ return resourceTencentCloudTeoCustomErrorPageRead(d, meta)
+}
+
+func resourceTencentCloudTeoCustomErrorPageRead(d *schema.ResourceData, meta interface{}) error {
+ defer logElapsed("resource.tencentcloud_teo_custom_error_page.read")()
+ defer inconsistentCheck(d, meta)()
+
+ idSplit := strings.Split(d.Id(), FILED_SP)
+ if len(idSplit) != 3 {
+ return fmt.Errorf("id is broken,%s", d.Id())
+ }
+ zoneId := idSplit[0]
+ entity := idSplit[1]
+ pageId := idSplit[2]
+
+ _ = d.Set("zone_id", zoneId)
+ _ = d.Set("entity", entity)
+ _ = d.Set("page_id", pageId)
+
+ if v, ok := d.GetOk("name"); ok {
+ _ = d.Set("name", helper.String(v.(string)))
+ }
+
+ if v, ok := d.GetOk("content"); ok {
+ _ = d.Set("content", helper.String(v.(string)))
+ }
+
+ return nil
+}
+
+func resourceTencentCloudTeoCustomErrorPageUpdate(d *schema.ResourceData, meta interface{}) error {
+ defer logElapsed("resource.tencentcloud_teo_custom_error_page.update")()
+ defer inconsistentCheck(d, meta)()
+
+ var change bool
+
+ if d.HasChange("zone_id") {
+ return fmt.Errorf("`zone_id` do not support change now.")
+ }
+
+ if d.HasChange("entity") {
+ return fmt.Errorf("`entity` do not support change now.")
+ }
+
+ if d.HasChange("name") {
+ change = true
+ }
+
+ if d.HasChange("content") {
+ change = true
+ }
+
+ if change {
+ err := resourceTencentCloudTeoCustomErrorPageCreate(d, meta)
+ if err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func resourceTencentCloudTeoCustomErrorPageDelete(d *schema.ResourceData, meta interface{}) error {
+ defer logElapsed("resource.tencentcloud_teo_custom_error_page.delete")()
+ defer inconsistentCheck(d, meta)()
+
+ return nil
+}
diff --git a/tencentcloud/resource_tc_teo_custom_error_page_test.go b/tencentcloud/resource_tc_teo_custom_error_page_test.go
new file mode 100644
index 0000000000..55f913cbcf
--- /dev/null
+++ b/tencentcloud/resource_tc_teo_custom_error_page_test.go
@@ -0,0 +1,40 @@
+package tencentcloud
+
+import (
+ "testing"
+
+ "github.com/hashicorp/terraform-plugin-sdk/helper/resource"
+)
+
+func TestAccTencentCloudTeoCustomErrorPage_basic(t *testing.T) {
+ t.Parallel()
+
+ resource.Test(t, resource.TestCase{
+ PreCheck: func() { testAccPreCheck(t) },
+ Providers: testAccProviders,
+ Steps: []resource.TestStep{
+ {
+ Config: testAccTeoCustomErrorPage,
+ Check: resource.ComposeTestCheckFunc(
+ resource.TestCheckResourceAttrSet("tencentcloud_teo_custom_error_page.custom_error_page", "id"),
+ ),
+ },
+ {
+ ResourceName: "tencentcloud_teo_custom_error_page.customErrorPage",
+ ImportState: true,
+ ImportStateVerify: true,
+ },
+ },
+ })
+}
+
+const testAccTeoCustomErrorPage = `
+
+resource "tencentcloud_teo_custom_error_page" "custom_error_page" {
+ zone_id = ""
+ entity = ""
+ name = ""
+ content = ""
+}
+
+`
diff --git a/tencentcloud/resource_tc_teo_ddos_policy.go b/tencentcloud/resource_tc_teo_ddos_policy.go
index 52f357bbcf..35a0e71670 100644
--- a/tencentcloud/resource_tc_teo_ddos_policy.go
+++ b/tencentcloud/resource_tc_teo_ddos_policy.go
@@ -1,96 +1,68 @@
/*
-Provides a resource to create a teo ddosPolicy
+Provides a resource to create a teo ddos_policy
Example Usage
```hcl
-resource "tencentcloud_teo_ddos_policy" "ddosPolicy" {
- zone_id = ""
- policy_id = ""
+resource "tencentcloud_teo_ddos_policy" "ddos_policy" {
+ policy_id = 1278
+ zone_id = "zone-2983wizgxqvm"
+
ddos_rule {
- switch = ""
- udp_shard_open = ""
- ddos_status_info {
- ply_level = ""
- }
- ddos_geo_ip {
- region_id = ""
- switch = ""
- }
- ddos_allow_block {
- switch = ""
- user_allow_block_ip {
- ip = ""
- mask = ""
- type = ""
- ip2 = ""
- mask2 = ""
- }
- }
- ddos_anti_ply {
- drop_tcp = ""
- drop_udp = ""
- drop_icmp = ""
- drop_other = ""
- source_create_limit = ""
- source_connect_limit = ""
- destination_create_limit = ""
- destination_connect_limit = ""
- abnormal_connect_num = ""
- abnormal_syn_ratio = ""
- abnormal_syn_num = ""
- connect_timeout = ""
- empty_connect_protect = ""
- udp_shard = ""
- }
- ddos_packet_filter {
- switch = ""
- packet_filter {
- action = ""
- protocol = ""
- dport_start = ""
- dport_end = ""
- packet_min = ""
- packet_max = ""
- sport_start = ""
- sport_end = ""
- match_type = ""
- is_not = ""
- offset = ""
- depth = ""
- match_begin = ""
- str = ""
- match_type2 = ""
- is_not2 = ""
- offset2 = ""
- depth2 = ""
- match_begin2 = ""
- str2 = ""
- match_logic = ""
- }
- }
- ddos_acl {
- switch = ""
- acl {
- dport_end = ""
- dport_start = ""
- sport_end = ""
- sport_start = ""
- protocol = ""
- action = ""
- default = ""
- }
- }
+ switch = "on"
+
+ acl {
+ switch = "on"
+ }
+
+ allow_block {
+ switch = "on"
+ }
+ anti_ply {
+ abnormal_connect_num = 0
+ abnormal_syn_num = 0
+ abnormal_syn_ratio = 0
+ connect_timeout = 0
+ destination_connect_limit = 0
+ destination_create_limit = 0
+ drop_icmp = "off"
+ drop_other = "off"
+ drop_tcp = "off"
+ drop_udp = "off"
+ empty_connect_protect = "off"
+ source_connect_limit = 0
+ source_create_limit = 0
+ udp_shard = "off"
+ }
+
+ geo_ip {
+ region_ids = []
+ switch = "on"
+ }
+
+ packet_filter {
+ switch = "on"
+ }
+
+ speed_limit {
+ flux_limit = "0 bps"
+ package_limit = "0 pps"
+ }
+
+ status_info {
+ ply_level = "middle"
+ }
}
}
+
```
Import
-teo ddosPolicy can be imported using the id, e.g.
+teo ddos_policy can be imported using the id, e.g.
```
-$ terraform import tencentcloud_teo_ddos_policy.ddosPolicy ddosPolicy_id
+$ terraform import tencentcloud_teo_ddos_policy.ddos_policy ddosPolicy_id
```
*/
package tencentcloud
@@ -104,7 +76,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
- teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220106"
+ teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901"
"github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"
)
@@ -142,37 +114,33 @@ func resourceTencentCloudTeoDdosPolicy() *schema.Resource {
Type: schema.TypeString,
Optional: true,
Computed: true,
- Description: "DDoS protection switch. Valid values:- on: Enable.- off: Disable.",
+ Description: "DDoS protection switch. Valid values:- `on`: Enable.- `off`: Disable.",
},
- "udp_shard_open": {
- Type: schema.TypeString,
- Optional: true,
- Computed: true,
- Description: "UDP shard switch. Valid values:- on: Enable.- off: Disable.",
- },
- "ddos_status_info": {
+ "status_info": {
Type: schema.TypeList,
MaxItems: 1,
Optional: true,
+ Computed: true,
Description: "DDoS protection level.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"ply_level": {
Type: schema.TypeString,
Required: true,
- Description: "Policy level. Valid values:- low: loose.- middle: moderate.- high: strict.",
+ Description: "Policy level. Valid values:- `low`: loose.- `middle`: moderate.- `high`: strict.",
},
},
},
},
- "ddos_geo_ip": {
+ "geo_ip": {
Type: schema.TypeList,
MaxItems: 1,
Optional: true,
+ Computed: true,
Description: "DDoS Protection by Geo Info.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
- "region_id": {
+ "region_ids": {
Type: schema.TypeSet,
Elem: &schema.Schema{
Type: schema.TypeInt,
@@ -185,15 +153,16 @@ func resourceTencentCloudTeoDdosPolicy() *schema.Resource {
Type: schema.TypeString,
Optional: true,
Computed: true,
- Description: "- on: Enable.- off: Disable.",
+ Description: "- `on`: Enable.- `off`: Disable.",
},
},
},
},
- "ddos_allow_block": {
+ "allow_block": {
Type: schema.TypeList,
MaxItems: 1,
Optional: true,
+ Computed: true,
Description: "DDoS black-white list.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
@@ -201,9 +170,9 @@ func resourceTencentCloudTeoDdosPolicy() *schema.Resource {
Type: schema.TypeString,
Optional: true,
Computed: true,
- Description: "- on: Enable. `UserAllowBlockIp` parameter is required.- off: Disable.",
+ Description: "- `on`: Enable. `AllowBlockIps` parameter is required.- `off`: Disable.",
},
- "user_allow_block_ip": {
+ "allow_block_ips": {
Type: schema.TypeList,
Optional: true,
Computed: true,
@@ -213,12 +182,7 @@ func resourceTencentCloudTeoDdosPolicy() *schema.Resource {
"ip": {
Type: schema.TypeString,
Optional: true,
- Description: "Client IP.",
- },
- "mask": {
- Type: schema.TypeInt,
- Optional: true,
- Description: "IP Mask.",
+ Description: "Valid value format:- ip, for example 1.1.1.1- ip range, for example 1.1.1.2-1.1.1.3- network segment, for example 1.2.1.0/24- network segment range, for example 1.2.1.0/24-1.2.2.0/24.",
},
"type": {
Type: schema.TypeString,
@@ -230,26 +194,17 @@ func resourceTencentCloudTeoDdosPolicy() *schema.Resource {
Computed: true,
Description: "Last modification date.",
},
- "ip2": {
- Type: schema.TypeString,
- Optional: true,
- Description: "End of the IP address when setting an IP range.",
- },
- "mask2": {
- Type: schema.TypeInt,
- Optional: true,
- Description: "IP mask of the end IP address.",
- },
},
},
},
},
},
},
- "ddos_anti_ply": {
+ "anti_ply": {
Type: schema.TypeList,
MaxItems: 1,
Optional: true,
+ Computed: true,
Description: "DDoS protocol and connection protection.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
@@ -276,12 +231,12 @@ func resourceTencentCloudTeoDdosPolicy() *schema.Resource {
"source_create_limit": {
Type: schema.TypeInt,
Required: true,
- Description: "Limitation of new connection to origin website per second. Valid value range: 0-4294967295.",
+ Description: "Limitation of new connection to origin site per second. Valid value range: 0-4294967295.",
},
"source_connect_limit": {
Type: schema.TypeInt,
Required: true,
- Description: "Limitation of connections to origin website. Valid value range: 0-4294967295.",
+ Description: "Limitation of connections to origin site. Valid value range: 0-4294967295.",
},
"destination_create_limit": {
Type: schema.TypeInt,
@@ -327,10 +282,11 @@ func resourceTencentCloudTeoDdosPolicy() *schema.Resource {
},
},
},
- "ddos_packet_filter": {
+ "packet_filter": {
Type: schema.TypeList,
MaxItems: 1,
Optional: true,
+ Computed: true,
Description: "DDoS feature filtering configuration.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
@@ -338,11 +294,12 @@ func resourceTencentCloudTeoDdosPolicy() *schema.Resource {
Type: schema.TypeString,
Optional: true,
Computed: true,
- Description: "- on: Enable. `ModifyDDoSPolicy` parameter is required.- off: Disable.",
+ Description: "- `on`: Enable. `PacketFilters` parameter is required.- `off`: Disable.",
},
- "packet_filter": {
+ "packet_filters": {
Type: schema.TypeList,
Optional: true,
+ Computed: true,
Description: "DDoS feature filtering configuration detail.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
@@ -389,12 +346,12 @@ func resourceTencentCloudTeoDdosPolicy() *schema.Resource {
"match_type": {
Type: schema.TypeString,
Optional: true,
- Description: "Match type of feature 1. Valid values:- pcre: regex expression.- sunday: string match.",
+ Description: "Match type of feature 1. Valid values:- `pcre`: regex expression.- `sunday`: string match.",
},
"is_not": {
Type: schema.TypeInt,
Optional: true,
- Description: "Negate the match condition of feature 1. Valid values:- 0: match.- 1: not match.",
+ Description: "Negate the match condition of feature 1. Valid values:- `0`: match.- `1`: not match.",
},
"offset": {
Type: schema.TypeInt,
@@ -409,7 +366,7 @@ func resourceTencentCloudTeoDdosPolicy() *schema.Resource {
"match_begin": {
Type: schema.TypeString,
Optional: true,
- Description: "Packet layer for matching begin of feature 1. Valid values:- begin_l5: matching from packet payload.- begin_l4: matching from TCP/UDP header.- begin_l3: matching from IP header.",
+ Description: "Packet layer for matching begin of feature 1. Valid values:- `begin_l5`: matching from packet payload.- `begin_l4`: matching from TCP/UDP header.- `begin_l3`: matching from IP header.",
},
"str": {
Type: schema.TypeString,
@@ -419,12 +376,12 @@ func resourceTencentCloudTeoDdosPolicy() *schema.Resource {
"match_type2": {
Type: schema.TypeString,
Optional: true,
- Description: "Match type of feature 2. Valid values:- pcre: regex expression.- sunday: string match.",
+ Description: "Match type of feature 2. Valid values:- `pcre`: regex expression.- `sunday`: string match.",
},
"is_not2": {
Type: schema.TypeInt,
Optional: true,
- Description: "Negate the match condition of feature 2. Valid values:- 0: match.- 1: not match.",
+ Description: "Negate the match condition of feature 2. Valid values:- `0`: match.- `1`: not match.",
},
"offset2": {
Type: schema.TypeInt,
@@ -439,7 +396,7 @@ func resourceTencentCloudTeoDdosPolicy() *schema.Resource {
"match_begin2": {
Type: schema.TypeString,
Optional: true,
- Description: "Packet layer for matching begin of feature 2. Valid values:- begin_l5: matching from packet payload.- begin_l4: matching from TCP/UDP header.- begin_l3: matching from IP header.",
+ Description: "Packet layer for matching begin of feature 2. Valid values:- `begin_l5`: matching from packet payload.- `begin_l4`: matching from TCP/UDP header.- `begin_l3`: matching from IP header.",
},
"str2": {
Type: schema.TypeString,
@@ -457,10 +414,11 @@ func resourceTencentCloudTeoDdosPolicy() *schema.Resource {
},
},
},
- "ddos_acl": {
+ "acl": {
Type: schema.TypeList,
MaxItems: 1,
Optional: true,
+ Computed: true,
Description: "DDoS ACL rule configuration.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
@@ -468,9 +426,9 @@ func resourceTencentCloudTeoDdosPolicy() *schema.Resource {
Type: schema.TypeString,
Optional: true,
Computed: true,
- Description: "- on: Enable. `Acl` parameter is require.- off: Disable.",
+ Description: "- `on`: Enable. `Acl` parameter is require.- `off`: Disable.",
},
- "acl": {
+ "acls": {
Type: schema.TypeList,
Optional: true,
Description: "DDoS ACL rule configuration detail.",
@@ -506,17 +464,33 @@ func resourceTencentCloudTeoDdosPolicy() *schema.Resource {
Optional: true,
Description: "Action to take. Valid values: `drop`, `transmit`, `forward`.",
},
- "default": {
- Type: schema.TypeInt,
- Optional: true,
- Description: "Whether it is default configuration. Valid value:- 0: custom configuration.- 1: default configuration.",
- },
},
},
},
},
},
},
+ "speed_limit": {
+ Type: schema.TypeList,
+ MaxItems: 1,
+ Optional: true,
+ Computed: true,
+ Description: "DDoS access origin site speed limit configuration.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "package_limit": {
+ Type: schema.TypeString,
+ Optional: true,
+ Description: "Limit the number of packages. Valid range: 1 pps-10000 Gpps, 0 means no limitation, supported units: `pps`,`Kpps`,`Mpps`,`Gpps`.",
+ },
+ "flux_limit": {
+ Type: schema.TypeString,
+ Optional: true,
+ Description: "Limit the number of fluxes. Valid range: 1 bps-10000 Gbps, 0 means no limitation, supported units: `pps`,`Kpps`,`Mpps`,`Gpps`.",
+ },
+ },
+ },
+ },
},
},
},
@@ -531,260 +505,59 @@ func resourceTencentCloudTeoDdosPolicyCreate(d *schema.ResourceData, meta interf
logId := getLogId(contextNil)
var (
- request = teo.NewModifyDDoSPolicyRequest()
- response *teo.ModifyDDoSPolicyResponse
zoneId string
+ policyId int64
+ service = TeoService{client: meta.(*TencentCloudClient).apiV3Conn}
+ ctx = context.WithValue(context.TODO(), logIdKey, logId)
)
if v, ok := d.GetOk("zone_id"); ok {
zoneId = v.(string)
- request.ZoneId = helper.String(v.(string))
}
if v, ok := d.GetOk("policy_id"); ok {
- request.PolicyId = helper.IntInt64(v.(int))
- }
-
- if dMap, ok := helper.InterfacesHeadMap(d, "ddos_rule"); ok {
- ddosRule := teo.DdosRule{}
- if v, ok := dMap["switch"]; ok {
- ddosRule.Switch = helper.String(v.(string))
- }
- if v, ok := dMap["udp_shard_open"]; ok {
- ddosRule.UdpShardOpen = helper.String(v.(string))
- }
- if DdosStatusInfoMap, ok := helper.InterfaceToMap(dMap, "ddos_status_info"); ok {
- dDoSStatusInfo := teo.DDoSStatusInfo{}
- if v, ok := DdosStatusInfoMap["ply_level"]; ok {
- dDoSStatusInfo.PlyLevel = helper.String(v.(string))
- }
- ddosRule.DdosStatusInfo = &dDoSStatusInfo
- }
- if DdosGeoIpMap, ok := helper.InterfaceToMap(dMap, "ddos_geo_ip"); ok {
- dDoSGeoIp := teo.DDoSGeoIp{}
- if v, ok := DdosGeoIpMap["region_id"]; ok {
- regionIdSet := v.(*schema.Set).List()
- for i := range regionIdSet {
- regionId := regionIdSet[i].(int)
- dDoSGeoIp.RegionId = append(dDoSGeoIp.RegionId, helper.IntInt64(regionId))
- }
- }
- if v, ok := DdosGeoIpMap["switch"]; ok {
- dDoSGeoIp.Switch = helper.String(v.(string))
+ if policyId, ok = v.(int64); !ok {
+ var tmpPolicyId int
+ if tmpPolicyId, ok = v.(int); !ok {
+ return fmt.Errorf("create teo ddosPolicy failed, reason: invalid policyId %+v", v)
}
- ddosRule.DdosGeoIp = &dDoSGeoIp
+ policyId = int64(tmpPolicyId)
}
- if DdosAllowBlockMap, ok := helper.InterfaceToMap(dMap, "ddos_allow_block"); ok {
- ddosAllowBlock := teo.DdosAllowBlock{}
- if v, ok := DdosAllowBlockMap["switch"]; ok {
- ddosAllowBlock.Switch = helper.String(v.(string))
- }
- if v, ok := DdosAllowBlockMap["user_allow_block_ip"]; ok {
- for _, item := range v.([]interface{}) {
- UserAllowBlockIpMap := item.(map[string]interface{})
- dDoSUserAllowBlockIP := teo.DDoSUserAllowBlockIP{}
- if v, ok := UserAllowBlockIpMap["ip"]; ok {
- dDoSUserAllowBlockIP.Ip = helper.String(v.(string))
- }
- if v, ok := UserAllowBlockIpMap["mask"]; ok {
- dDoSUserAllowBlockIP.Mask = helper.IntInt64(v.(int))
- }
- if v, ok := UserAllowBlockIpMap["type"]; ok {
- dDoSUserAllowBlockIP.Type = helper.String(v.(string))
- }
- if v, ok := UserAllowBlockIpMap["ip2"]; ok {
- dDoSUserAllowBlockIP.Ip2 = helper.String(v.(string))
- }
- if v, ok := UserAllowBlockIpMap["mask2"]; ok {
- dDoSUserAllowBlockIP.Mask2 = helper.IntInt64(v.(int))
- }
- ddosAllowBlock.UserAllowBlockIp = append(ddosAllowBlock.UserAllowBlockIp, &dDoSUserAllowBlockIP)
- }
- }
- ddosRule.DdosAllowBlock = &ddosAllowBlock
- }
- if DdosAntiPlyMap, ok := helper.InterfaceToMap(dMap, "ddos_anti_ply"); ok {
- dDoSAntiPly := teo.DDoSAntiPly{}
- if v, ok := DdosAntiPlyMap["drop_tcp"]; ok {
- dDoSAntiPly.DropTcp = helper.String(v.(string))
- }
- if v, ok := DdosAntiPlyMap["drop_udp"]; ok {
- dDoSAntiPly.DropUdp = helper.String(v.(string))
- }
- if v, ok := DdosAntiPlyMap["drop_icmp"]; ok {
- dDoSAntiPly.DropIcmp = helper.String(v.(string))
- }
- if v, ok := DdosAntiPlyMap["drop_other"]; ok {
- dDoSAntiPly.DropOther = helper.String(v.(string))
- }
- if v, ok := DdosAntiPlyMap["source_create_limit"]; ok {
- dDoSAntiPly.SourceCreateLimit = helper.IntInt64(v.(int))
- }
- if v, ok := DdosAntiPlyMap["source_connect_limit"]; ok {
- dDoSAntiPly.SourceConnectLimit = helper.IntInt64(v.(int))
- }
- if v, ok := DdosAntiPlyMap["destination_create_limit"]; ok {
- dDoSAntiPly.DestinationCreateLimit = helper.IntInt64(v.(int))
- }
- if v, ok := DdosAntiPlyMap["destination_connect_limit"]; ok {
- dDoSAntiPly.DestinationConnectLimit = helper.IntInt64(v.(int))
- }
- if v, ok := DdosAntiPlyMap["abnormal_connect_num"]; ok {
- dDoSAntiPly.AbnormalConnectNum = helper.IntInt64(v.(int))
- }
- if v, ok := DdosAntiPlyMap["abnormal_syn_ratio"]; ok {
- dDoSAntiPly.AbnormalSynRatio = helper.IntInt64(v.(int))
- }
- if v, ok := DdosAntiPlyMap["abnormal_syn_num"]; ok {
- dDoSAntiPly.AbnormalSynNum = helper.IntInt64(v.(int))
- }
- if v, ok := DdosAntiPlyMap["connect_timeout"]; ok {
- dDoSAntiPly.ConnectTimeout = helper.IntInt64(v.(int))
- }
- if v, ok := DdosAntiPlyMap["empty_connect_protect"]; ok {
- dDoSAntiPly.EmptyConnectProtect = helper.String(v.(string))
- }
- if v, ok := DdosAntiPlyMap["udp_shard"]; ok {
- dDoSAntiPly.UdpShard = helper.String(v.(string))
- }
- ddosRule.DdosAntiPly = &dDoSAntiPly
- }
- if DdosPacketFilterMap, ok := helper.InterfaceToMap(dMap, "ddos_packet_filter"); ok {
- ddosPacketFilter := teo.DdosPacketFilter{}
- if v, ok := DdosPacketFilterMap["switch"]; ok {
- ddosPacketFilter.Switch = helper.String(v.(string))
- }
- if v, ok := DdosPacketFilterMap["packet_filter"]; ok {
- for _, item := range v.([]interface{}) {
- PacketFilterMap := item.(map[string]interface{})
- dDoSFeaturesFilter := teo.DDoSFeaturesFilter{}
- if v, ok := PacketFilterMap["action"]; ok {
- dDoSFeaturesFilter.Action = helper.String(v.(string))
- }
- if v, ok := PacketFilterMap["protocol"]; ok {
- dDoSFeaturesFilter.Protocol = helper.String(v.(string))
- }
- if v, ok := PacketFilterMap["dport_start"]; ok {
- dDoSFeaturesFilter.DportStart = helper.IntInt64(v.(int))
- }
- if v, ok := PacketFilterMap["dport_end"]; ok {
- dDoSFeaturesFilter.DportEnd = helper.IntInt64(v.(int))
- }
- if v, ok := PacketFilterMap["packet_min"]; ok {
- dDoSFeaturesFilter.PacketMin = helper.IntInt64(v.(int))
- }
- if v, ok := PacketFilterMap["packet_max"]; ok {
- dDoSFeaturesFilter.PacketMax = helper.IntInt64(v.(int))
- }
- if v, ok := PacketFilterMap["sport_start"]; ok {
- dDoSFeaturesFilter.SportStart = helper.IntInt64(v.(int))
- }
- if v, ok := PacketFilterMap["sport_end"]; ok {
- dDoSFeaturesFilter.SportEnd = helper.IntInt64(v.(int))
- }
- if v, ok := PacketFilterMap["match_type"]; ok {
- dDoSFeaturesFilter.MatchType = helper.String(v.(string))
- }
- if v, ok := PacketFilterMap["is_not"]; ok {
- dDoSFeaturesFilter.IsNot = helper.IntInt64(v.(int))
- }
- if v, ok := PacketFilterMap["offset"]; ok {
- dDoSFeaturesFilter.Offset = helper.IntInt64(v.(int))
- }
- if v, ok := PacketFilterMap["depth"]; ok {
- dDoSFeaturesFilter.Depth = helper.IntInt64(v.(int))
- }
- if v, ok := PacketFilterMap["match_begin"]; ok {
- dDoSFeaturesFilter.MatchBegin = helper.String(v.(string))
- }
- if v, ok := PacketFilterMap["str"]; ok {
- dDoSFeaturesFilter.Str = helper.String(v.(string))
- }
- if v, ok := PacketFilterMap["match_type2"]; ok {
- dDoSFeaturesFilter.MatchType2 = helper.String(v.(string))
- }
- if v, ok := PacketFilterMap["is_not2"]; ok {
- dDoSFeaturesFilter.IsNot2 = helper.IntInt64(v.(int))
- }
- if v, ok := PacketFilterMap["offset2"]; ok {
- dDoSFeaturesFilter.Offset2 = helper.IntInt64(v.(int))
- }
- if v, ok := PacketFilterMap["depth2"]; ok {
- dDoSFeaturesFilter.Depth2 = helper.IntInt64(v.(int))
- }
- if v, ok := PacketFilterMap["match_begin2"]; ok {
- dDoSFeaturesFilter.MatchBegin2 = helper.String(v.(string))
- }
- if v, ok := PacketFilterMap["str2"]; ok {
- dDoSFeaturesFilter.Str2 = helper.String(v.(string))
- }
- if v, ok := PacketFilterMap["match_logic"]; ok {
- dDoSFeaturesFilter.MatchLogic = helper.String(v.(string))
- }
- ddosPacketFilter.PacketFilter = append(ddosPacketFilter.PacketFilter, &dDoSFeaturesFilter)
- }
- }
- ddosRule.DdosPacketFilter = &ddosPacketFilter
- }
- if DdosAclMap, ok := helper.InterfaceToMap(dMap, "ddos_acl"); ok {
- ddosAcls := teo.DdosAcls{}
- if v, ok := DdosAclMap["switch"]; ok {
- ddosAcls.Switch = helper.String(v.(string))
- }
- if v, ok := DdosAclMap["acl"]; ok {
- for _, item := range v.([]interface{}) {
- AclMap := item.(map[string]interface{})
- dDoSAcl := teo.DDoSAcl{}
- if v, ok := AclMap["dport_end"]; ok {
- dDoSAcl.DportEnd = helper.IntInt64(v.(int))
- }
- if v, ok := AclMap["dport_start"]; ok {
- dDoSAcl.DportStart = helper.IntInt64(v.(int))
- }
- if v, ok := AclMap["sport_end"]; ok {
- dDoSAcl.SportEnd = helper.IntInt64(v.(int))
- }
- if v, ok := AclMap["sport_start"]; ok {
- dDoSAcl.SportStart = helper.IntInt64(v.(int))
- }
- if v, ok := AclMap["protocol"]; ok {
- dDoSAcl.Protocol = helper.String(v.(string))
- }
- if v, ok := AclMap["action"]; ok {
- dDoSAcl.Action = helper.String(v.(string))
- }
- if v, ok := AclMap["default"]; ok {
- dDoSAcl.Default = helper.IntInt64(v.(int))
- }
- ddosAcls.Acl = append(ddosAcls.Acl, &dDoSAcl)
- }
- }
- ddosRule.DdosAcl = &ddosAcls
- }
-
- request.DdosRule = &ddosRule
}
- err := resource.Retry(writeRetryTimeout, func() *resource.RetryError {
- result, e := meta.(*TencentCloudClient).apiV3Conn.UseTeoClient().ModifyDDoSPolicy(request)
+ var (
+ policyIdChecked bool
+ ddosPolicy *teo.DescribeZoneDDoSPolicyResponseParams
+ )
+ err := resource.Retry(readRetryTimeout, func() *resource.RetryError {
+ results, e := service.DescribeTeoZoneDDoSPolicyByFilter(ctx, map[string]interface{}{
+ "zone_id": zoneId,
+ })
if e != nil {
return 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
+ ddosPolicy = results
return nil
})
+ if err != nil {
+ log.Printf("[CRITAL]%s read Teo planInfo failed, reason:%+v", logId, err)
+ return err
+ }
+ for _, areas := range ddosPolicy.ShieldAreas {
+ if *areas.PolicyId == policyId {
+ policyIdChecked = true
+ }
+ }
+ if !policyIdChecked {
+ return fmt.Errorf("create teo ddosPolicy failed, reason: invalid policy id %v", policyId)
+ }
+ d.SetId(zoneId + FILED_SP + strconv.Itoa(int(policyId)))
+ err = resourceTencentCloudTeoDdosPolicyUpdate(d, meta)
if err != nil {
log.Printf("[CRITAL]%s create teo ddosPolicy failed, reason:%+v", logId, err)
return err
}
-
- ddosPolicyId := strconv.FormatInt(*response.Response.PolicyId, 10)
-
- d.SetId(zoneId + FILED_SP + ddosPolicyId)
return resourceTencentCloudTeoDdosPolicyRead(d, meta)
}
@@ -804,7 +577,12 @@ func resourceTencentCloudTeoDdosPolicyRead(d *schema.ResourceData, meta interfac
zoneId := idSplit[0]
policyId := idSplit[1]
- ddosPolicy, err := service.DescribeTeoDdosPolicy(ctx, zoneId, policyId)
+ policyId64, err := strconv.ParseInt(policyId, 10, 64)
+ if err != nil {
+ log.Printf("[READ]%s read teo ddosPolicy parseInt[%v] failed, reason:%+v", logId, policyId, err)
+ return err
+ }
+ ddosPolicy, err := service.DescribeTeoDdosPolicy(ctx, zoneId, policyId64)
if err != nil {
return err
@@ -816,237 +594,233 @@ func resourceTencentCloudTeoDdosPolicyRead(d *schema.ResourceData, meta interfac
}
_ = d.Set("zone_id", zoneId)
- _ = d.Set("policy_id", policyId)
+ _ = d.Set("policy_id", policyId64)
- if ddosPolicy.DdosRule != nil {
- ddosRuleMap := map[string]interface{}{}
- if ddosPolicy.DdosRule.Switch != nil {
- ddosRuleMap["switch"] = ddosPolicy.DdosRule.Switch
- }
- if ddosPolicy.DdosRule.UdpShardOpen != nil {
- ddosRuleMap["udp_shard_open"] = ddosPolicy.DdosRule.UdpShardOpen
+ if ddosPolicy.DDoSRule != nil {
+ dDoSRuleMap := map[string]interface{}{}
+ if ddosPolicy.DDoSRule.Switch != nil {
+ dDoSRuleMap["switch"] = ddosPolicy.DDoSRule.Switch
}
- if ddosPolicy.DdosRule.DdosStatusInfo != nil {
- ddosStatusInfoMap := map[string]interface{}{}
- if ddosPolicy.DdosRule.DdosStatusInfo.PlyLevel != nil {
- ddosStatusInfoMap["ply_level"] = ddosPolicy.DdosRule.DdosStatusInfo.PlyLevel
+ if ddosPolicy.DDoSRule.DDoSStatusInfo != nil {
+ statusInfoMap := map[string]interface{}{}
+ if ddosPolicy.DDoSRule.DDoSStatusInfo.PlyLevel != nil {
+ statusInfoMap["ply_level"] = ddosPolicy.DDoSRule.DDoSStatusInfo.PlyLevel
}
- ddosRuleMap["ddos_status_info"] = []interface{}{ddosStatusInfoMap}
+ dDoSRuleMap["status_info"] = []interface{}{statusInfoMap}
}
- if ddosPolicy.DdosRule.DdosGeoIp != nil {
- ddosGeoIpMap := map[string]interface{}{}
- if ddosPolicy.DdosRule.DdosGeoIp.RegionId != nil {
- ddosGeoIpMap["region_id"] = ddosPolicy.DdosRule.DdosGeoIp.RegionId
+ if ddosPolicy.DDoSRule.DDoSGeoIp != nil {
+ geoIpMap := map[string]interface{}{}
+ if ddosPolicy.DDoSRule.DDoSGeoIp.RegionIds != nil {
+ geoIpMap["region_ids"] = ddosPolicy.DDoSRule.DDoSGeoIp.RegionIds
}
- if ddosPolicy.DdosRule.DdosGeoIp.Switch != nil {
- ddosGeoIpMap["switch"] = ddosPolicy.DdosRule.DdosGeoIp.Switch
+ if ddosPolicy.DDoSRule.DDoSGeoIp.Switch != nil {
+ geoIpMap["switch"] = ddosPolicy.DDoSRule.DDoSGeoIp.Switch
}
- ddosRuleMap["ddos_geo_ip"] = []interface{}{ddosGeoIpMap}
+ dDoSRuleMap["geo_ip"] = []interface{}{geoIpMap}
}
- if ddosPolicy.DdosRule.DdosAllowBlock != nil {
- ddosAllowBlockMap := map[string]interface{}{}
- if ddosPolicy.DdosRule.DdosAllowBlock.Switch != nil {
- ddosAllowBlockMap["switch"] = ddosPolicy.DdosRule.DdosAllowBlock.Switch
+ if ddosPolicy.DDoSRule.DDoSAllowBlock != nil {
+ allowBlockMap := map[string]interface{}{}
+ if ddosPolicy.DDoSRule.DDoSAllowBlock.Switch != nil {
+ allowBlockMap["switch"] = ddosPolicy.DDoSRule.DDoSAllowBlock.Switch
}
- if ddosPolicy.DdosRule.DdosAllowBlock.UserAllowBlockIp != nil {
- userAllowBlockIpList := []interface{}{}
- for _, userAllowBlockIp := range ddosPolicy.DdosRule.DdosAllowBlock.UserAllowBlockIp {
- userAllowBlockIpMap := map[string]interface{}{}
- if userAllowBlockIp.Ip != nil {
- userAllowBlockIpMap["ip"] = userAllowBlockIp.Ip
+ if ddosPolicy.DDoSRule.DDoSAllowBlock.DDoSAllowBlockRules != nil {
+ allowBlockIpsList := []interface{}{}
+ for _, allowBlockIps := range ddosPolicy.DDoSRule.DDoSAllowBlock.DDoSAllowBlockRules {
+ allowBlockIpsMap := map[string]interface{}{}
+ if allowBlockIps.Ip != nil {
+ allowBlockIpsMap["ip"] = allowBlockIps.Ip
}
- if userAllowBlockIp.Mask != nil {
- userAllowBlockIpMap["mask"] = userAllowBlockIp.Mask
+ if allowBlockIps.Type != nil {
+ allowBlockIpsMap["type"] = allowBlockIps.Type
}
- if userAllowBlockIp.Type != nil {
- userAllowBlockIpMap["type"] = userAllowBlockIp.Type
- }
- if userAllowBlockIp.UpdateTime != nil {
- userAllowBlockIpMap["update_time"] = userAllowBlockIp.UpdateTime
- }
- if userAllowBlockIp.Ip2 != nil {
- userAllowBlockIpMap["ip2"] = userAllowBlockIp.Ip2
- }
- if userAllowBlockIp.Mask2 != nil {
- userAllowBlockIpMap["mask2"] = userAllowBlockIp.Mask2
+ if allowBlockIps.UpdateTime != nil {
+ allowBlockIpsMap["update_time"] = allowBlockIps.UpdateTime
}
- userAllowBlockIpList = append(userAllowBlockIpList, userAllowBlockIpMap)
+ allowBlockIpsList = append(allowBlockIpsList, allowBlockIpsMap)
}
- ddosAllowBlockMap["user_allow_block_ip"] = userAllowBlockIpList
+ allowBlockMap["allow_block_ips"] = allowBlockIpsList
}
- ddosRuleMap["ddos_allow_block"] = []interface{}{ddosAllowBlockMap}
+ dDoSRuleMap["allow_block"] = []interface{}{allowBlockMap}
}
- if ddosPolicy.DdosRule.DdosAntiPly != nil {
- ddosAntiPlyMap := map[string]interface{}{}
- if ddosPolicy.DdosRule.DdosAntiPly.DropTcp != nil {
- ddosAntiPlyMap["drop_tcp"] = ddosPolicy.DdosRule.DdosAntiPly.DropTcp
+ if ddosPolicy.DDoSRule.DDoSAntiPly != nil {
+ antiPlyMap := map[string]interface{}{}
+ if ddosPolicy.DDoSRule.DDoSAntiPly.DropTcp != nil {
+ antiPlyMap["drop_tcp"] = ddosPolicy.DDoSRule.DDoSAntiPly.DropTcp
}
- if ddosPolicy.DdosRule.DdosAntiPly.DropUdp != nil {
- ddosAntiPlyMap["drop_udp"] = ddosPolicy.DdosRule.DdosAntiPly.DropUdp
+ if ddosPolicy.DDoSRule.DDoSAntiPly.DropUdp != nil {
+ antiPlyMap["drop_udp"] = ddosPolicy.DDoSRule.DDoSAntiPly.DropUdp
}
- if ddosPolicy.DdosRule.DdosAntiPly.DropIcmp != nil {
- ddosAntiPlyMap["drop_icmp"] = ddosPolicy.DdosRule.DdosAntiPly.DropIcmp
+ if ddosPolicy.DDoSRule.DDoSAntiPly.DropIcmp != nil {
+ antiPlyMap["drop_icmp"] = ddosPolicy.DDoSRule.DDoSAntiPly.DropIcmp
}
- if ddosPolicy.DdosRule.DdosAntiPly.DropOther != nil {
- ddosAntiPlyMap["drop_other"] = ddosPolicy.DdosRule.DdosAntiPly.DropOther
+ if ddosPolicy.DDoSRule.DDoSAntiPly.DropOther != nil {
+ antiPlyMap["drop_other"] = ddosPolicy.DDoSRule.DDoSAntiPly.DropOther
}
- if ddosPolicy.DdosRule.DdosAntiPly.SourceCreateLimit != nil {
- ddosAntiPlyMap["source_create_limit"] = ddosPolicy.DdosRule.DdosAntiPly.SourceCreateLimit
+ if ddosPolicy.DDoSRule.DDoSAntiPly.SourceCreateLimit != nil {
+ antiPlyMap["source_create_limit"] = ddosPolicy.DDoSRule.DDoSAntiPly.SourceCreateLimit
}
- if ddosPolicy.DdosRule.DdosAntiPly.SourceConnectLimit != nil {
- ddosAntiPlyMap["source_connect_limit"] = ddosPolicy.DdosRule.DdosAntiPly.SourceConnectLimit
+ if ddosPolicy.DDoSRule.DDoSAntiPly.SourceConnectLimit != nil {
+ antiPlyMap["source_connect_limit"] = ddosPolicy.DDoSRule.DDoSAntiPly.SourceConnectLimit
}
- if ddosPolicy.DdosRule.DdosAntiPly.DestinationCreateLimit != nil {
- ddosAntiPlyMap["destination_create_limit"] = ddosPolicy.DdosRule.DdosAntiPly.DestinationCreateLimit
+ if ddosPolicy.DDoSRule.DDoSAntiPly.DestinationCreateLimit != nil {
+ antiPlyMap["destination_create_limit"] = ddosPolicy.DDoSRule.DDoSAntiPly.DestinationCreateLimit
}
- if ddosPolicy.DdosRule.DdosAntiPly.DestinationConnectLimit != nil {
- ddosAntiPlyMap["destination_connect_limit"] = ddosPolicy.DdosRule.DdosAntiPly.DestinationConnectLimit
+ if ddosPolicy.DDoSRule.DDoSAntiPly.DestinationConnectLimit != nil {
+ antiPlyMap["destination_connect_limit"] = ddosPolicy.DDoSRule.DDoSAntiPly.DestinationConnectLimit
}
- if ddosPolicy.DdosRule.DdosAntiPly.AbnormalConnectNum != nil {
- ddosAntiPlyMap["abnormal_connect_num"] = ddosPolicy.DdosRule.DdosAntiPly.AbnormalConnectNum
+ if ddosPolicy.DDoSRule.DDoSAntiPly.AbnormalConnectNum != nil {
+ antiPlyMap["abnormal_connect_num"] = ddosPolicy.DDoSRule.DDoSAntiPly.AbnormalConnectNum
}
- if ddosPolicy.DdosRule.DdosAntiPly.AbnormalSynRatio != nil {
- ddosAntiPlyMap["abnormal_syn_ratio"] = ddosPolicy.DdosRule.DdosAntiPly.AbnormalSynRatio
+ if ddosPolicy.DDoSRule.DDoSAntiPly.AbnormalSynRatio != nil {
+ antiPlyMap["abnormal_syn_ratio"] = ddosPolicy.DDoSRule.DDoSAntiPly.AbnormalSynRatio
}
- if ddosPolicy.DdosRule.DdosAntiPly.AbnormalSynNum != nil {
- ddosAntiPlyMap["abnormal_syn_num"] = ddosPolicy.DdosRule.DdosAntiPly.AbnormalSynNum
+ if ddosPolicy.DDoSRule.DDoSAntiPly.AbnormalSynNum != nil {
+ antiPlyMap["abnormal_syn_num"] = ddosPolicy.DDoSRule.DDoSAntiPly.AbnormalSynNum
}
- if ddosPolicy.DdosRule.DdosAntiPly.ConnectTimeout != nil {
- ddosAntiPlyMap["connect_timeout"] = ddosPolicy.DdosRule.DdosAntiPly.ConnectTimeout
+ if ddosPolicy.DDoSRule.DDoSAntiPly.ConnectTimeout != nil {
+ antiPlyMap["connect_timeout"] = ddosPolicy.DDoSRule.DDoSAntiPly.ConnectTimeout
}
- if ddosPolicy.DdosRule.DdosAntiPly.EmptyConnectProtect != nil {
- ddosAntiPlyMap["empty_connect_protect"] = ddosPolicy.DdosRule.DdosAntiPly.EmptyConnectProtect
+ if ddosPolicy.DDoSRule.DDoSAntiPly.EmptyConnectProtect != nil {
+ antiPlyMap["empty_connect_protect"] = ddosPolicy.DDoSRule.DDoSAntiPly.EmptyConnectProtect
}
- if ddosPolicy.DdosRule.DdosAntiPly.UdpShard != nil {
- ddosAntiPlyMap["udp_shard"] = ddosPolicy.DdosRule.DdosAntiPly.UdpShard
+ if ddosPolicy.DDoSRule.DDoSAntiPly.UdpShard != nil {
+ antiPlyMap["udp_shard"] = ddosPolicy.DDoSRule.DDoSAntiPly.UdpShard
}
- ddosRuleMap["ddos_anti_ply"] = []interface{}{ddosAntiPlyMap}
+ dDoSRuleMap["anti_ply"] = []interface{}{antiPlyMap}
}
- if ddosPolicy.DdosRule.DdosPacketFilter != nil {
- ddosPacketFilterMap := map[string]interface{}{}
- if ddosPolicy.DdosRule.DdosPacketFilter.Switch != nil {
- ddosPacketFilterMap["switch"] = ddosPolicy.DdosRule.DdosPacketFilter.Switch
+ if ddosPolicy.DDoSRule.DDoSPacketFilter != nil {
+ packetFilterMap := map[string]interface{}{}
+ if ddosPolicy.DDoSRule.DDoSPacketFilter.Switch != nil {
+ packetFilterMap["switch"] = ddosPolicy.DDoSRule.DDoSPacketFilter.Switch
}
- if ddosPolicy.DdosRule.DdosPacketFilter.PacketFilter != nil {
- packetFilterList := []interface{}{}
- for _, packetFilter := range ddosPolicy.DdosRule.DdosPacketFilter.PacketFilter {
- packetFilterMap := map[string]interface{}{}
- if packetFilter.Action != nil {
- packetFilterMap["action"] = packetFilter.Action
+ if ddosPolicy.DDoSRule.DDoSPacketFilter.DDoSFeaturesFilters != nil {
+ packetFiltersList := []interface{}{}
+ for _, packetFilters := range ddosPolicy.DDoSRule.DDoSPacketFilter.DDoSFeaturesFilters {
+ packetFiltersMap := map[string]interface{}{}
+ if packetFilters.Action != nil {
+ packetFiltersMap["action"] = packetFilters.Action
}
- if packetFilter.Protocol != nil {
- packetFilterMap["protocol"] = packetFilter.Protocol
+ if packetFilters.Protocol != nil {
+ packetFiltersMap["protocol"] = packetFilters.Protocol
}
- if packetFilter.DportStart != nil {
- packetFilterMap["dport_start"] = packetFilter.DportStart
+ if packetFilters.DportStart != nil {
+ packetFiltersMap["dport_start"] = packetFilters.DportStart
}
- if packetFilter.DportEnd != nil {
- packetFilterMap["dport_end"] = packetFilter.DportEnd
+ if packetFilters.DportEnd != nil {
+ packetFiltersMap["dport_end"] = packetFilters.DportEnd
}
- if packetFilter.PacketMin != nil {
- packetFilterMap["packet_min"] = packetFilter.PacketMin
+ if packetFilters.PacketMin != nil {
+ packetFiltersMap["packet_min"] = packetFilters.PacketMin
}
- if packetFilter.PacketMax != nil {
- packetFilterMap["packet_max"] = packetFilter.PacketMax
+ if packetFilters.PacketMax != nil {
+ packetFiltersMap["packet_max"] = packetFilters.PacketMax
}
- if packetFilter.SportStart != nil {
- packetFilterMap["sport_start"] = packetFilter.SportStart
+ if packetFilters.SportStart != nil {
+ packetFiltersMap["sport_start"] = packetFilters.SportStart
}
- if packetFilter.SportEnd != nil {
- packetFilterMap["sport_end"] = packetFilter.SportEnd
+ if packetFilters.SportEnd != nil {
+ packetFiltersMap["sport_end"] = packetFilters.SportEnd
}
- if packetFilter.MatchType != nil {
- packetFilterMap["match_type"] = packetFilter.MatchType
+ if packetFilters.MatchType != nil {
+ packetFiltersMap["match_type"] = packetFilters.MatchType
}
- if packetFilter.IsNot != nil {
- packetFilterMap["is_not"] = packetFilter.IsNot
+ if packetFilters.IsNot != nil {
+ packetFiltersMap["is_not"] = packetFilters.IsNot
}
- if packetFilter.Offset != nil {
- packetFilterMap["offset"] = packetFilter.Offset
+ if packetFilters.Offset != nil {
+ packetFiltersMap["offset"] = packetFilters.Offset
}
- if packetFilter.Depth != nil {
- packetFilterMap["depth"] = packetFilter.Depth
+ if packetFilters.Depth != nil {
+ packetFiltersMap["depth"] = packetFilters.Depth
}
- if packetFilter.MatchBegin != nil {
- packetFilterMap["match_begin"] = packetFilter.MatchBegin
+ if packetFilters.MatchBegin != nil {
+ packetFiltersMap["match_begin"] = packetFilters.MatchBegin
}
- if packetFilter.Str != nil {
- packetFilterMap["str"] = packetFilter.Str
+ if packetFilters.Str != nil {
+ packetFiltersMap["str"] = packetFilters.Str
}
- if packetFilter.MatchType2 != nil {
- packetFilterMap["match_type2"] = packetFilter.MatchType2
+ if packetFilters.MatchType2 != nil {
+ packetFiltersMap["match_type2"] = packetFilters.MatchType2
}
- if packetFilter.IsNot2 != nil {
- packetFilterMap["is_not2"] = packetFilter.IsNot2
+ if packetFilters.IsNot2 != nil {
+ packetFiltersMap["is_not2"] = packetFilters.IsNot2
}
- if packetFilter.Offset2 != nil {
- packetFilterMap["offset2"] = packetFilter.Offset2
+ if packetFilters.Offset2 != nil {
+ packetFiltersMap["offset2"] = packetFilters.Offset2
}
- if packetFilter.Depth2 != nil {
- packetFilterMap["depth2"] = packetFilter.Depth2
+ if packetFilters.Depth2 != nil {
+ packetFiltersMap["depth2"] = packetFilters.Depth2
}
- if packetFilter.MatchBegin2 != nil {
- packetFilterMap["match_begin2"] = packetFilter.MatchBegin2
+ if packetFilters.MatchBegin2 != nil {
+ packetFiltersMap["match_begin2"] = packetFilters.MatchBegin2
}
- if packetFilter.Str2 != nil {
- packetFilterMap["str2"] = packetFilter.Str2
+ if packetFilters.Str2 != nil {
+ packetFiltersMap["str2"] = packetFilters.Str2
}
- if packetFilter.MatchLogic != nil {
- packetFilterMap["match_logic"] = packetFilter.MatchLogic
+ if packetFilters.MatchLogic != nil {
+ packetFiltersMap["match_logic"] = packetFilters.MatchLogic
}
- packetFilterList = append(packetFilterList, packetFilterMap)
+ packetFiltersList = append(packetFiltersList, packetFiltersMap)
}
- ddosPacketFilterMap["packet_filter"] = packetFilterList
+ packetFilterMap["packet_filters"] = packetFiltersList
}
- ddosRuleMap["ddos_packet_filter"] = []interface{}{ddosPacketFilterMap}
+ dDoSRuleMap["packet_filter"] = []interface{}{packetFilterMap}
}
- if ddosPolicy.DdosRule.DdosAcl != nil {
- ddosAclMap := map[string]interface{}{}
- if ddosPolicy.DdosRule.DdosAcl.Switch != nil {
- ddosAclMap["switch"] = ddosPolicy.DdosRule.DdosAcl.Switch
+ if ddosPolicy.DDoSRule.DDoSAcl != nil {
+ aclMap := map[string]interface{}{}
+ if ddosPolicy.DDoSRule.DDoSAcl.Switch != nil {
+ aclMap["switch"] = ddosPolicy.DDoSRule.DDoSAcl.Switch
}
- if ddosPolicy.DdosRule.DdosAcl.Acl != nil {
- aclList := []interface{}{}
- for _, acl := range ddosPolicy.DdosRule.DdosAcl.Acl {
- aclMap := map[string]interface{}{}
- if acl.DportEnd != nil {
- aclMap["dport_end"] = acl.DportEnd
+ if ddosPolicy.DDoSRule.DDoSAcl.DDoSAclRules != nil {
+ aclsList := []interface{}{}
+ for _, acls := range ddosPolicy.DDoSRule.DDoSAcl.DDoSAclRules {
+ aclsMap := map[string]interface{}{}
+ if acls.DportEnd != nil {
+ aclsMap["dport_end"] = acls.DportEnd
}
- if acl.DportStart != nil {
- aclMap["dport_start"] = acl.DportStart
+ if acls.DportStart != nil {
+ aclsMap["dport_start"] = acls.DportStart
}
- if acl.SportEnd != nil {
- aclMap["sport_end"] = acl.SportEnd
+ if acls.SportEnd != nil {
+ aclsMap["sport_end"] = acls.SportEnd
}
- if acl.SportStart != nil {
- aclMap["sport_start"] = acl.SportStart
+ if acls.SportStart != nil {
+ aclsMap["sport_start"] = acls.SportStart
}
- if acl.Protocol != nil {
- aclMap["protocol"] = acl.Protocol
+ if acls.Protocol != nil {
+ aclsMap["protocol"] = acls.Protocol
}
- if acl.Action != nil {
- aclMap["action"] = acl.Action
- }
- if acl.Default != nil {
- aclMap["default"] = acl.Default
+ if acls.Action != nil {
+ aclsMap["action"] = acls.Action
}
- aclList = append(aclList, aclMap)
+ aclsList = append(aclsList, aclsMap)
}
- ddosAclMap["acl"] = aclList
+ aclMap["acls"] = aclsList
}
- ddosRuleMap["ddos_acl"] = []interface{}{ddosAclMap}
+ dDoSRuleMap["acl"] = []interface{}{aclMap}
}
+ if ddosPolicy.DDoSRule.DDoSSpeedLimit != nil {
+ speedLimitMap := map[string]interface{}{}
+ if ddosPolicy.DDoSRule.DDoSSpeedLimit.PackageLimit != nil {
+ speedLimitMap["package_limit"] = ddosPolicy.DDoSRule.DDoSSpeedLimit.PackageLimit
+ }
+ if ddosPolicy.DDoSRule.DDoSSpeedLimit.FluxLimit != nil {
+ speedLimitMap["flux_limit"] = ddosPolicy.DDoSRule.DDoSSpeedLimit.FluxLimit
+ }
- _ = d.Set("ddos_rule", []interface{}{ddosRuleMap})
+ dDoSRuleMap["speed_limit"] = []interface{}{speedLimitMap}
+ }
+
+ _ = d.Set("ddos_rule", []interface{}{dDoSRuleMap})
}
return nil
@@ -1066,245 +840,245 @@ func resourceTencentCloudTeoDdosPolicyUpdate(d *schema.ResourceData, meta interf
zoneId := idSplit[0]
policyId := idSplit[1]
- policyId64, errRet := strconv.ParseInt(policyId, 10, 64)
- if errRet != nil {
- return fmt.Errorf("Type conversion failed, [%s] conversion int64 failed\n", policyId)
+ policyId64, err := strconv.ParseInt(policyId, 10, 64)
+ if err != nil {
+ log.Printf("[UPDATE]%s update teo ddosPolicy parseInt[%v] failed, reason:%+v", logId, policyId, err)
+ return err
}
-
request.ZoneId = &zoneId
- request.PolicyId = &policyId64
+ request.PolicyId = helper.Int64(policyId64)
if d.HasChange("zone_id") {
- return fmt.Errorf("`zone_id` do not support change now.")
+ if old, _ := d.GetChange("zone_id"); old.(string) != "" {
+ return fmt.Errorf("`zone_id` do not support change now.")
+ }
}
if d.HasChange("policy_id") {
- return fmt.Errorf("`policy_id` do not support change now.")
+ if old, _ := d.GetChange("policy_id"); old.(int) != 0 {
+ return fmt.Errorf("`policy_id` do not support change now.")
+ }
}
if d.HasChange("ddos_rule") {
if dMap, ok := helper.InterfacesHeadMap(d, "ddos_rule"); ok {
- ddosRule := teo.DdosRule{}
+ ddosRule := teo.DDoSRule{}
if v, ok := dMap["switch"]; ok {
ddosRule.Switch = helper.String(v.(string))
}
- if v, ok := dMap["udp_shard_open"]; ok {
- ddosRule.UdpShardOpen = helper.String(v.(string))
- }
- if DdosStatusInfoMap, ok := helper.InterfaceToMap(dMap, "ddos_status_info"); ok {
+ if StatusInfoMap, ok := helper.InterfaceToMap(dMap, "status_info"); ok {
dDoSStatusInfo := teo.DDoSStatusInfo{}
- if v, ok := DdosStatusInfoMap["ply_level"]; ok {
+ if v, ok := StatusInfoMap["ply_level"]; ok {
dDoSStatusInfo.PlyLevel = helper.String(v.(string))
}
- ddosRule.DdosStatusInfo = &dDoSStatusInfo
+ ddosRule.DDoSStatusInfo = &dDoSStatusInfo
}
- if DdosGeoIpMap, ok := helper.InterfaceToMap(dMap, "ddos_geo_ip"); ok {
+ if GeoIpMap, ok := helper.InterfaceToMap(dMap, "geo_ip"); ok {
dDoSGeoIp := teo.DDoSGeoIp{}
- if v, ok := DdosGeoIpMap["region_id"]; ok {
- regionIdSet := v.(*schema.Set).List()
- for i := range regionIdSet {
- regionId := regionIdSet[i].(int)
- dDoSGeoIp.RegionId = append(dDoSGeoIp.RegionId, helper.IntInt64(regionId))
+ if v, ok := GeoIpMap["region_ids"]; ok {
+ regionIdsSet := v.(*schema.Set).List()
+ for i := range regionIdsSet {
+ regionIds := regionIdsSet[i].(int)
+ dDoSGeoIp.RegionIds = append(dDoSGeoIp.RegionIds, helper.IntInt64(regionIds))
}
}
- if v, ok := DdosGeoIpMap["switch"]; ok {
+ if v, ok := GeoIpMap["switch"]; ok {
dDoSGeoIp.Switch = helper.String(v.(string))
}
- ddosRule.DdosGeoIp = &dDoSGeoIp
+ ddosRule.DDoSGeoIp = &dDoSGeoIp
}
- if DdosAllowBlockMap, ok := helper.InterfaceToMap(dMap, "ddos_allow_block"); ok {
- ddosAllowBlock := teo.DdosAllowBlock{}
- if v, ok := DdosAllowBlockMap["switch"]; ok {
- ddosAllowBlock.Switch = helper.String(v.(string))
+ if AllowBlockMap, ok := helper.InterfaceToMap(dMap, "allow_block"); ok {
+ dDoSAllowBlock := teo.DDoSAllowBlock{}
+ if v, ok := AllowBlockMap["switch"]; ok {
+ dDoSAllowBlock.Switch = helper.String(v.(string))
}
- if v, ok := DdosAllowBlockMap["user_allow_block_ip"]; ok {
+ if v, ok := AllowBlockMap["allow_block_ips"]; ok {
for _, item := range v.([]interface{}) {
- UserAllowBlockIpMap := item.(map[string]interface{})
- dDoSUserAllowBlockIP := teo.DDoSUserAllowBlockIP{}
- if v, ok := UserAllowBlockIpMap["ip"]; ok {
+ AllowBlockIpsMap := item.(map[string]interface{})
+ dDoSUserAllowBlockIP := teo.DDoSAllowBlockRule{}
+ if v, ok := AllowBlockIpsMap["ip"]; ok {
dDoSUserAllowBlockIP.Ip = helper.String(v.(string))
}
- if v, ok := UserAllowBlockIpMap["mask"]; ok {
- dDoSUserAllowBlockIP.Mask = helper.IntInt64(v.(int))
- }
- if v, ok := UserAllowBlockIpMap["type"]; ok {
+ if v, ok := AllowBlockIpsMap["type"]; ok {
dDoSUserAllowBlockIP.Type = helper.String(v.(string))
}
- if v, ok := UserAllowBlockIpMap["ip2"]; ok {
- dDoSUserAllowBlockIP.Ip2 = helper.String(v.(string))
- }
- if v, ok := UserAllowBlockIpMap["mask2"]; ok {
- dDoSUserAllowBlockIP.Mask2 = helper.IntInt64(v.(int))
- }
- ddosAllowBlock.UserAllowBlockIp = append(ddosAllowBlock.UserAllowBlockIp, &dDoSUserAllowBlockIP)
+ dDoSAllowBlock.DDoSAllowBlockRules = append(dDoSAllowBlock.DDoSAllowBlockRules, &dDoSUserAllowBlockIP)
}
}
- ddosRule.DdosAllowBlock = &ddosAllowBlock
+ ddosRule.DDoSAllowBlock = &dDoSAllowBlock
}
- if DdosAntiPlyMap, ok := helper.InterfaceToMap(dMap, "ddos_anti_ply"); ok {
+ if AntiPlyMap, ok := helper.InterfaceToMap(dMap, "anti_ply"); ok {
dDoSAntiPly := teo.DDoSAntiPly{}
- if v, ok := DdosAntiPlyMap["drop_tcp"]; ok {
+ if v, ok := AntiPlyMap["drop_tcp"]; ok {
dDoSAntiPly.DropTcp = helper.String(v.(string))
}
- if v, ok := DdosAntiPlyMap["drop_udp"]; ok {
+ if v, ok := AntiPlyMap["drop_udp"]; ok {
dDoSAntiPly.DropUdp = helper.String(v.(string))
}
- if v, ok := DdosAntiPlyMap["drop_icmp"]; ok {
+ if v, ok := AntiPlyMap["drop_icmp"]; ok {
dDoSAntiPly.DropIcmp = helper.String(v.(string))
}
- if v, ok := DdosAntiPlyMap["drop_other"]; ok {
+ if v, ok := AntiPlyMap["drop_other"]; ok {
dDoSAntiPly.DropOther = helper.String(v.(string))
}
- if v, ok := DdosAntiPlyMap["source_create_limit"]; ok {
+ if v, ok := AntiPlyMap["source_create_limit"]; ok {
dDoSAntiPly.SourceCreateLimit = helper.IntInt64(v.(int))
}
- if v, ok := DdosAntiPlyMap["source_connect_limit"]; ok {
+ if v, ok := AntiPlyMap["source_connect_limit"]; ok {
dDoSAntiPly.SourceConnectLimit = helper.IntInt64(v.(int))
}
- if v, ok := DdosAntiPlyMap["destination_create_limit"]; ok {
+ if v, ok := AntiPlyMap["destination_create_limit"]; ok {
dDoSAntiPly.DestinationCreateLimit = helper.IntInt64(v.(int))
}
- if v, ok := DdosAntiPlyMap["destination_connect_limit"]; ok {
+ if v, ok := AntiPlyMap["destination_connect_limit"]; ok {
dDoSAntiPly.DestinationConnectLimit = helper.IntInt64(v.(int))
}
- if v, ok := DdosAntiPlyMap["abnormal_connect_num"]; ok {
+ if v, ok := AntiPlyMap["abnormal_connect_num"]; ok {
dDoSAntiPly.AbnormalConnectNum = helper.IntInt64(v.(int))
}
- if v, ok := DdosAntiPlyMap["abnormal_syn_ratio"]; ok {
+ if v, ok := AntiPlyMap["abnormal_syn_ratio"]; ok {
dDoSAntiPly.AbnormalSynRatio = helper.IntInt64(v.(int))
}
- if v, ok := DdosAntiPlyMap["abnormal_syn_num"]; ok {
+ if v, ok := AntiPlyMap["abnormal_syn_num"]; ok {
dDoSAntiPly.AbnormalSynNum = helper.IntInt64(v.(int))
}
- if v, ok := DdosAntiPlyMap["connect_timeout"]; ok {
+ if v, ok := AntiPlyMap["connect_timeout"]; ok {
dDoSAntiPly.ConnectTimeout = helper.IntInt64(v.(int))
}
- if v, ok := DdosAntiPlyMap["empty_connect_protect"]; ok {
+ if v, ok := AntiPlyMap["empty_connect_protect"]; ok {
dDoSAntiPly.EmptyConnectProtect = helper.String(v.(string))
}
- if v, ok := DdosAntiPlyMap["udp_shard"]; ok {
+ if v, ok := AntiPlyMap["udp_shard"]; ok {
dDoSAntiPly.UdpShard = helper.String(v.(string))
}
- ddosRule.DdosAntiPly = &dDoSAntiPly
+ ddosRule.DDoSAntiPly = &dDoSAntiPly
}
- if DdosPacketFilterMap, ok := helper.InterfaceToMap(dMap, "ddos_packet_filter"); ok {
- ddosPacketFilter := teo.DdosPacketFilter{}
- if v, ok := DdosPacketFilterMap["switch"]; ok {
- ddosPacketFilter.Switch = helper.String(v.(string))
+ if PacketFilterMap, ok := helper.InterfaceToMap(dMap, "packet_filter"); ok {
+ dDoSPacketFilter := teo.DDoSPacketFilter{}
+ if v, ok := PacketFilterMap["switch"]; ok {
+ dDoSPacketFilter.Switch = helper.String(v.(string))
}
- if v, ok := DdosPacketFilterMap["packet_filter"]; ok {
+ if v, ok := PacketFilterMap["packet_filters"]; ok {
for _, item := range v.([]interface{}) {
- PacketFilterMap := item.(map[string]interface{})
+ PacketFiltersMap := item.(map[string]interface{})
dDoSFeaturesFilter := teo.DDoSFeaturesFilter{}
- if v, ok := PacketFilterMap["action"]; ok {
+ if v, ok := PacketFiltersMap["action"]; ok {
dDoSFeaturesFilter.Action = helper.String(v.(string))
}
- if v, ok := PacketFilterMap["protocol"]; ok {
+ if v, ok := PacketFiltersMap["protocol"]; ok {
dDoSFeaturesFilter.Protocol = helper.String(v.(string))
}
- if v, ok := PacketFilterMap["dport_start"]; ok {
+ if v, ok := PacketFiltersMap["dport_start"]; ok {
dDoSFeaturesFilter.DportStart = helper.IntInt64(v.(int))
}
- if v, ok := PacketFilterMap["dport_end"]; ok {
+ if v, ok := PacketFiltersMap["dport_end"]; ok {
dDoSFeaturesFilter.DportEnd = helper.IntInt64(v.(int))
}
- if v, ok := PacketFilterMap["packet_min"]; ok {
+ if v, ok := PacketFiltersMap["packet_min"]; ok {
dDoSFeaturesFilter.PacketMin = helper.IntInt64(v.(int))
}
- if v, ok := PacketFilterMap["packet_max"]; ok {
+ if v, ok := PacketFiltersMap["packet_max"]; ok {
dDoSFeaturesFilter.PacketMax = helper.IntInt64(v.(int))
}
- if v, ok := PacketFilterMap["sport_start"]; ok {
+ if v, ok := PacketFiltersMap["sport_start"]; ok {
dDoSFeaturesFilter.SportStart = helper.IntInt64(v.(int))
}
- if v, ok := PacketFilterMap["sport_end"]; ok {
+ if v, ok := PacketFiltersMap["sport_end"]; ok {
dDoSFeaturesFilter.SportEnd = helper.IntInt64(v.(int))
}
- if v, ok := PacketFilterMap["match_type"]; ok {
+ if v, ok := PacketFiltersMap["match_type"]; ok {
dDoSFeaturesFilter.MatchType = helper.String(v.(string))
}
- if v, ok := PacketFilterMap["is_not"]; ok {
+ if v, ok := PacketFiltersMap["is_not"]; ok {
dDoSFeaturesFilter.IsNot = helper.IntInt64(v.(int))
}
- if v, ok := PacketFilterMap["offset"]; ok {
+ if v, ok := PacketFiltersMap["offset"]; ok {
dDoSFeaturesFilter.Offset = helper.IntInt64(v.(int))
}
- if v, ok := PacketFilterMap["depth"]; ok {
+ if v, ok := PacketFiltersMap["depth"]; ok {
dDoSFeaturesFilter.Depth = helper.IntInt64(v.(int))
}
- if v, ok := PacketFilterMap["match_begin"]; ok {
+ if v, ok := PacketFiltersMap["match_begin"]; ok {
dDoSFeaturesFilter.MatchBegin = helper.String(v.(string))
}
- if v, ok := PacketFilterMap["str"]; ok {
+ if v, ok := PacketFiltersMap["str"]; ok {
dDoSFeaturesFilter.Str = helper.String(v.(string))
}
- if v, ok := PacketFilterMap["match_type2"]; ok {
+ if v, ok := PacketFiltersMap["match_type2"]; ok {
dDoSFeaturesFilter.MatchType2 = helper.String(v.(string))
}
- if v, ok := PacketFilterMap["is_not2"]; ok {
+ if v, ok := PacketFiltersMap["is_not2"]; ok {
dDoSFeaturesFilter.IsNot2 = helper.IntInt64(v.(int))
}
- if v, ok := PacketFilterMap["offset2"]; ok {
+ if v, ok := PacketFiltersMap["offset2"]; ok {
dDoSFeaturesFilter.Offset2 = helper.IntInt64(v.(int))
}
- if v, ok := PacketFilterMap["depth2"]; ok {
+ if v, ok := PacketFiltersMap["depth2"]; ok {
dDoSFeaturesFilter.Depth2 = helper.IntInt64(v.(int))
}
- if v, ok := PacketFilterMap["match_begin2"]; ok {
+ if v, ok := PacketFiltersMap["match_begin2"]; ok {
dDoSFeaturesFilter.MatchBegin2 = helper.String(v.(string))
}
- if v, ok := PacketFilterMap["str2"]; ok {
+ if v, ok := PacketFiltersMap["str2"]; ok {
dDoSFeaturesFilter.Str2 = helper.String(v.(string))
}
- if v, ok := PacketFilterMap["match_logic"]; ok {
+ if v, ok := PacketFiltersMap["match_logic"]; ok {
dDoSFeaturesFilter.MatchLogic = helper.String(v.(string))
}
- ddosPacketFilter.PacketFilter = append(ddosPacketFilter.PacketFilter, &dDoSFeaturesFilter)
+ dDoSPacketFilter.DDoSFeaturesFilters = append(dDoSPacketFilter.DDoSFeaturesFilters, &dDoSFeaturesFilter)
}
}
- ddosRule.DdosPacketFilter = &ddosPacketFilter
+ ddosRule.DDoSPacketFilter = &dDoSPacketFilter
}
- if DdosAclMap, ok := helper.InterfaceToMap(dMap, "ddos_acl"); ok {
- ddosAcls := teo.DdosAcls{}
- if v, ok := DdosAclMap["switch"]; ok {
- ddosAcls.Switch = helper.String(v.(string))
+ if AclMap, ok := helper.InterfaceToMap(dMap, "acl"); ok {
+ dDoSAcls := teo.DDoSAcl{}
+ if v, ok := AclMap["switch"]; ok {
+ dDoSAcls.Switch = helper.String(v.(string))
}
- if v, ok := DdosAclMap["acl"]; ok {
+ if v, ok := AclMap["acls"]; ok {
for _, item := range v.([]interface{}) {
- AclMap := item.(map[string]interface{})
- dDoSAcl := teo.DDoSAcl{}
- if v, ok := AclMap["dport_end"]; ok {
+ AclsMap := item.(map[string]interface{})
+ dDoSAcl := teo.DDoSAclRule{}
+ if v, ok := AclsMap["dport_end"]; ok {
dDoSAcl.DportEnd = helper.IntInt64(v.(int))
}
- if v, ok := AclMap["dport_start"]; ok {
+ if v, ok := AclsMap["dport_start"]; ok {
dDoSAcl.DportStart = helper.IntInt64(v.(int))
}
- if v, ok := AclMap["sport_end"]; ok {
+ if v, ok := AclsMap["sport_end"]; ok {
dDoSAcl.SportEnd = helper.IntInt64(v.(int))
}
- if v, ok := AclMap["sport_start"]; ok {
+ if v, ok := AclsMap["sport_start"]; ok {
dDoSAcl.SportStart = helper.IntInt64(v.(int))
}
- if v, ok := AclMap["protocol"]; ok {
+ if v, ok := AclsMap["protocol"]; ok {
dDoSAcl.Protocol = helper.String(v.(string))
}
- if v, ok := AclMap["action"]; ok {
+ if v, ok := AclsMap["action"]; ok {
dDoSAcl.Action = helper.String(v.(string))
}
- if v, ok := AclMap["default"]; ok {
- dDoSAcl.Default = helper.IntInt64(v.(int))
- }
- ddosAcls.Acl = append(ddosAcls.Acl, &dDoSAcl)
+ dDoSAcls.DDoSAclRules = append(dDoSAcls.DDoSAclRules, &dDoSAcl)
}
}
- ddosRule.DdosAcl = &ddosAcls
+ ddosRule.DDoSAcl = &dDoSAcls
+ }
+ if SpeedLimitMap, ok := helper.InterfaceToMap(dMap, "speed_limit"); ok {
+ dDoSSpeedLimit := teo.DDoSSpeedLimit{}
+ if v, ok := SpeedLimitMap["package_limit"]; ok {
+ dDoSSpeedLimit.PackageLimit = helper.String(v.(string))
+ }
+ if v, ok := SpeedLimitMap["flux_limit"]; ok {
+ dDoSSpeedLimit.FluxLimit = helper.String(v.(string))
+ }
+ ddosRule.DDoSSpeedLimit = &dDoSSpeedLimit
}
- request.DdosRule = &ddosRule
+ request.DDoSRule = &ddosRule
}
+
}
- err := resource.Retry(writeRetryTimeout, func() *resource.RetryError {
+ modifyErr := resource.Retry(writeRetryTimeout, func() *resource.RetryError {
result, e := meta.(*TencentCloudClient).apiV3Conn.UseTeoClient().ModifyDDoSPolicy(request)
if e != nil {
return retryError(e)
@@ -1315,8 +1089,9 @@ func resourceTencentCloudTeoDdosPolicyUpdate(d *schema.ResourceData, meta interf
return nil
})
- if err != nil {
- return err
+ if modifyErr != nil {
+ log.Printf("[CRITAL]%s create teo ddosPolicy failed, reason:%+v", logId, modifyErr)
+ return modifyErr
}
return resourceTencentCloudTeoDdosPolicyRead(d, meta)
@@ -1326,21 +1101,5 @@ func resourceTencentCloudTeoDdosPolicyDelete(d *schema.ResourceData, meta interf
defer logElapsed("resource.tencentcloud_teo_ddos_policy.delete")()
defer inconsistentCheck(d, meta)()
- logId := getLogId(contextNil)
- ctx := context.WithValue(context.TODO(), logIdKey, logId)
-
- service := TeoService{client: meta.(*TencentCloudClient).apiV3Conn}
-
- idSplit := strings.Split(d.Id(), FILED_SP)
- if len(idSplit) != 2 {
- return fmt.Errorf("id is broken,%s", d.Id())
- }
- zoneId := idSplit[0]
- policyId := idSplit[1]
-
- if err := service.DeleteTeoDdosPolicyById(ctx, zoneId, policyId); err != nil {
- return err
- }
-
return nil
}
diff --git a/tencentcloud/resource_tc_teo_default_certificate.go b/tencentcloud/resource_tc_teo_default_certificate.go
index 0c769b3d39..0ce2abb92d 100644
--- a/tencentcloud/resource_tc_teo_default_certificate.go
+++ b/tencentcloud/resource_tc_teo_default_certificate.go
@@ -1,15 +1,15 @@
/*
-Provides a resource to create a teo defaultCertificate
+Provides a resource to create a teo default_certificate
Example Usage
```hcl
resource "tencentcloud_teo_default_certificate" "default_certificate" {
- zone_id = tencentcloud_teo_zone.zone.id
-
+ zone_id = ""
cert_info {
- cert_id = "teo-28i46c1gtmkl"
- status = "deployed"
+ cert_id = ""
+ status = ""
+
}
}
@@ -18,7 +18,7 @@ Import
teo default_certificate can be imported using the id, e.g.
```
-$ terraform import tencentcloud_teo_default_certificate.default_certificate zoneId
+$ terraform import tencentcloud_teo_default_certificate.default_certificate defaultCertificate_id
```
*/
package tencentcloud
@@ -27,12 +27,12 @@ import (
"context"
"fmt"
"log"
-
- "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"
+ "strings"
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
- teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220106"
+ teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901"
+ "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"
)
func resourceTencentCloudTeoDefaultCertificate() *schema.Resource {
@@ -53,8 +53,8 @@ func resourceTencentCloudTeoDefaultCertificate() *schema.Resource {
"cert_info": {
Type: schema.TypeList,
+ Required: true,
MaxItems: 1,
- Optional: true,
Description: "List of default certificates. Note: This field may return null, indicating that no valid value can be obtained.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
@@ -71,7 +71,7 @@ func resourceTencentCloudTeoDefaultCertificate() *schema.Resource {
"type": {
Type: schema.TypeString,
Computed: true,
- Description: "Certificate type.- default: Default certificate.- upload: External certificate.- managed: Tencent Cloud managed certificate.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "Certificate type.- `default`: Default certificate.- `upload`: External certificate.- `managed`: Tencent Cloud managed certificate. Note: This field may return null, indicating that no valid value can be obtained.",
},
"expire_time": {
Type: schema.TypeString,
@@ -100,12 +100,12 @@ func resourceTencentCloudTeoDefaultCertificate() *schema.Resource {
Type: schema.TypeString,
Optional: true,
Computed: true,
- Description: "Certificate status.- applying: Application in progress.- failed: Application failed.- processing: Deploying certificate.- deployed: Certificate deployed.- disabled: Certificate disabled.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "Certificate status.- `applying`: Application in progress.- `failed`: Application failed.- `processing`: Deploying certificate.- `deployed`: Certificate deployed.- `disabled`: Certificate disabled. Note: This field may return null, indicating that no valid value can be obtained.",
},
"message": {
Type: schema.TypeString,
Computed: true,
- Description: "Returns a message to display failure causes when `Status` is failed.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "Returns a message to display failure causes when `Status` is failed. Note: This field may return null, indicating that no valid value can be obtained.",
},
},
},
@@ -118,37 +118,26 @@ func resourceTencentCloudTeoDefaultCertificateCreate(d *schema.ResourceData, met
defer logElapsed("resource.tencentcloud_teo_default_certificate.create")()
defer inconsistentCheck(d, meta)()
- logId := getLogId(contextNil)
-
var (
zoneId string
+ certId string
)
if v, ok := d.GetOk("zone_id"); ok {
zoneId = v.(string)
}
- service := TeoService{client: meta.(*TencentCloudClient).apiV3Conn}
- ctx := context.WithValue(context.TODO(), logIdKey, logId)
-
- err := resource.Retry(60*readRetryTimeout, func() *resource.RetryError {
- instance, errRet := service.DescribeTeoDefaultCertificate(ctx, zoneId)
- if errRet != nil {
- return retryError(errRet, InternalError)
- }
- if *instance.Status == "deployed" {
- return nil
- }
- if *instance.Status == "disabled" {
- return resource.NonRetryableError(fmt.Errorf("defaultCertificate status is %v, operate failed.", *instance.Status))
+ if v, ok := d.GetOk("cert_info"); ok {
+ for _, item := range v.([]interface{}) {
+ dMap := item.(map[string]interface{})
+ if v, ok := dMap["cert_id"]; ok {
+ certId = v.(string)
+ break
+ }
}
- return resource.RetryableError(fmt.Errorf("defaultCertificate status is %v, retry...", *instance.Status))
- })
- if err != nil {
- return err
}
- d.SetId(zoneId)
+ d.SetId(zoneId + FILED_SP + certId)
return resourceTencentCloudTeoDefaultCertificateUpdate(d, meta)
}
@@ -161,9 +150,14 @@ func resourceTencentCloudTeoDefaultCertificateRead(d *schema.ResourceData, meta
service := TeoService{client: meta.(*TencentCloudClient).apiV3Conn}
- zoneId := d.Id()
+ idSplit := strings.Split(d.Id(), FILED_SP)
+ if len(idSplit) != 2 {
+ return fmt.Errorf("id is broken,%s", d.Id())
+ }
+ zoneId := idSplit[0]
+ certId := idSplit[1]
- defaultCertificate, err := service.DescribeTeoDefaultCertificate(ctx, zoneId)
+ defaultCertificate, err := service.DescribeTeoDefaultCertificate(ctx, zoneId, certId)
if err != nil {
return err
@@ -171,10 +165,13 @@ func resourceTencentCloudTeoDefaultCertificateRead(d *schema.ResourceData, meta
if defaultCertificate == nil {
d.SetId("")
- return fmt.Errorf("resource `defaultCertificate` %s does not exist", zoneId)
+ return fmt.Errorf("resource `defaultCertificate` %s does not exist", certId)
}
+ _ = d.Set("zone_id", zoneId)
+
if defaultCertificate != nil {
+ certInfoList := []interface{}{}
certInfoMap := map[string]interface{}{}
if defaultCertificate.CertId != nil {
certInfoMap["cert_id"] = defaultCertificate.CertId
@@ -203,8 +200,8 @@ func resourceTencentCloudTeoDefaultCertificateRead(d *schema.ResourceData, meta
if defaultCertificate.Message != nil {
certInfoMap["message"] = defaultCertificate.Message
}
-
- _ = d.Set("cert_info", []interface{}{certInfoMap})
+ certInfoList = append(certInfoList, certInfoMap)
+ _ = d.Set("cert_info", certInfoList)
}
return nil
@@ -218,16 +215,24 @@ func resourceTencentCloudTeoDefaultCertificateUpdate(d *schema.ResourceData, met
request := teo.NewModifyDefaultCertificateRequest()
- zoneId := d.Id()
+ idSplit := strings.Split(d.Id(), FILED_SP)
+ if len(idSplit) != 2 {
+ return fmt.Errorf("id is broken,%s", d.Id())
+ }
+ zoneId := idSplit[0]
+ certId := idSplit[1]
request.ZoneId = &zoneId
- if certInfo, ok := d.GetOk("cert_info"); ok {
- if defaultCertList := certInfo.([]interface{}); len(defaultCertList) > 0 {
- if cert := defaultCertList[0].(map[string]interface{}); cert != nil {
- if v := cert["cert_id"]; v != nil {
+ request.CertId = &certId
+
+ if d.HasChange("cert_info") {
+ if v, ok := d.GetOk("cert_info"); ok {
+ for _, item := range v.([]interface{}) {
+ dMap := item.(map[string]interface{})
+ if v, ok := dMap["cert_id"]; ok {
request.CertId = helper.String(v.(string))
}
- if v := cert["status"]; v != nil {
+ if v, ok := dMap["status"]; ok {
request.Status = helper.String(v.(string))
}
}
@@ -242,7 +247,6 @@ func resourceTencentCloudTeoDefaultCertificateUpdate(d *schema.ResourceData, met
log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
logId, request.GetAction(), request.ToJsonString(), result.ToJsonString())
}
-
return nil
})
@@ -251,6 +255,24 @@ func resourceTencentCloudTeoDefaultCertificateUpdate(d *schema.ResourceData, met
return err
}
+ service := TeoService{client: meta.(*TencentCloudClient).apiV3Conn}
+ ctx := context.WithValue(context.TODO(), logIdKey, logId)
+
+ err = resource.Retry(60*readRetryTimeout, func() *resource.RetryError {
+ instance, errRet := service.DescribeTeoDefaultCertificate(ctx, zoneId, certId)
+ if errRet != nil {
+ return retryError(errRet, InternalError)
+ }
+ if *instance.Status == *request.Status {
+ return nil
+ }
+ return resource.RetryableError(fmt.Errorf("defaultCertificate status is %v, retry...", *instance.Status))
+ })
+
+ if err != nil {
+ return err
+ }
+
return resourceTencentCloudTeoDefaultCertificateRead(d, meta)
}
diff --git a/tencentcloud/resource_tc_teo_dns_record.go b/tencentcloud/resource_tc_teo_dns_record.go
index 64f8b50c45..676bc2e342 100644
--- a/tencentcloud/resource_tc_teo_dns_record.go
+++ b/tencentcloud/resource_tc_teo_dns_record.go
@@ -1,24 +1,25 @@
/*
-Provides a resource to create a teo dnsRecord
+Provides a resource to create a teo dns_record
Example Usage
```hcl
resource "tencentcloud_teo_dns_record" "dns_record" {
- zone_id = tencentcloud_teo_zone.zone.id
- record_type = "A"
- name = "sfurnace.work"
- mode = "proxied"
- content = "2.2.2.2"
- ttl = 80
+ zone_id = "zone-297z8rf93cfw"
+ type = "A"
+ name = "www.toutiao2.com"
+ content = "150.109.8.2"
+ mode = "proxied"
+ ttl = "1"
+ priority = 1
}
```
Import
-teo dns_record can be imported using the id, e.g.
+teo dns_record can be imported using the zone_id#dns_record_id, e.g.
```
-$ terraform import tencentcloud_teo_dns_record.dnsRecord zoneId#dnsRecordId#name
+$ terraform import tencentcloud_teo_dns_record.dns_record zone-297z8rf93cfw#record-297z9ei9b9oc
```
*/
package tencentcloud
@@ -31,7 +32,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
- teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220106"
+ teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901"
"github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"
)
@@ -45,54 +46,66 @@ func resourceTencentCloudTeoDnsRecord() *schema.Resource {
State: schema.ImportStatePassthrough,
},
Schema: map[string]*schema.Schema{
- "record_type": {
+ "zone_id": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Site ID.",
+ },
+
+ "dns_record_id": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "DNS record ID.",
+ },
+
+ "type": {
Type: schema.TypeString,
Required: true,
- Description: "DNS Record Type.",
+ Description: "DNS record Type. Valid values: `A`, `AAAA`, `CNAME`, `MX`, `TXT`, `NS`, `CAA`, `SRV`.",
},
"name": {
Type: schema.TypeString,
Required: true,
- Description: "DNS Record Name.",
+ Description: "DNS record Name.",
},
"content": {
Type: schema.TypeString,
Required: true,
- Description: "DNS Record Content.",
+ Description: "DNS record Content.",
},
"mode": {
Type: schema.TypeString,
Required: true,
- Description: "Proxy mode. Valid values: dns_only, cdn_only, and secure_cdn.",
+ Description: "Proxy mode. Valid values:- `dns_only`: only DNS resolution of the subdomain is enabled.- `proxied`: subdomain is proxied and accelerated.",
},
"ttl": {
Type: schema.TypeInt,
Optional: true,
Computed: true,
- Description: "TTL, the range is 1-604800, and the minimum value of different levels of domain names is different.",
+ Description: "Time to live of the DNS record cache in seconds.",
},
"priority": {
Type: schema.TypeInt,
Optional: true,
Computed: true,
- Description: "Priority.",
+ Description: "Priority of the record. Valid value range: 1-50, the smaller value, the higher priority.",
},
"created_on": {
Type: schema.TypeString,
Computed: true,
- Description: "Creation time.",
+ Description: "Creation date.",
},
"modified_on": {
Type: schema.TypeString,
Computed: true,
- Description: "Modification time.",
+ Description: "Last modification date.",
},
"locked": {
@@ -101,28 +114,17 @@ func resourceTencentCloudTeoDnsRecord() *schema.Resource {
Description: "Whether the DNS record is locked.",
},
- "zone_id": {
- Type: schema.TypeString,
- Required: true,
- Description: "Site ID.",
- },
-
- "zone_name": {
- Type: schema.TypeString,
- Computed: true,
- Description: "Site Name.",
- },
-
"status": {
Type: schema.TypeString,
+ Optional: true,
Computed: true,
- Description: "Resolution status.",
+ Description: "Resolution status. Valid values: `active`, `pending`.",
},
"cname": {
Type: schema.TypeString,
Computed: true,
- Description: "CNAME address.",
+ Description: "CNAME address. Note: This field may return null, indicating that no valid value can be obtained.",
},
"domain_status": {
@@ -131,13 +133,7 @@ func resourceTencentCloudTeoDnsRecord() *schema.Resource {
Type: schema.TypeString,
},
Computed: true,
- Description: ".",
- },
-
- "tags": {
- Type: schema.TypeMap,
- Optional: true,
- Description: "Tag description list.",
+ Description: "Whether this domain enable load balancing, security, or l4 proxy capability. Valid values: `lb`, `security`, `l4`.",
},
},
}
@@ -150,11 +146,18 @@ func resourceTencentCloudTeoDnsRecordCreate(d *schema.ResourceData, meta interfa
logId := getLogId(contextNil)
var (
- request = teo.NewCreateDnsRecordRequest()
- response *teo.CreateDnsRecordResponse
+ request = teo.NewCreateDnsRecordRequest()
+ response *teo.CreateDnsRecordResponse
+ zoneId string
+ dnsRecordId string
)
- if v, ok := d.GetOk("record_type"); ok {
+ if v, ok := d.GetOk("zone_id"); ok {
+ zoneId = v.(string)
+ request.ZoneId = helper.String(v.(string))
+ }
+
+ if v, ok := d.GetOk("type"); ok {
request.Type = helper.String(v.(string))
}
@@ -171,21 +174,26 @@ func resourceTencentCloudTeoDnsRecordCreate(d *schema.ResourceData, meta interfa
}
if v, ok := d.GetOk("ttl"); ok {
- request.Ttl = helper.IntInt64(v.(int))
+ request.TTL = helper.IntInt64(v.(int))
}
if v, ok := d.GetOk("priority"); ok {
request.Priority = helper.IntInt64(v.(int))
}
- if v, ok := d.GetOk("zone_id"); ok {
- request.ZoneId = helper.String(v.(string))
+ ctx := context.WithValue(context.TODO(), logIdKey, logId)
+ service := TeoService{client: meta.(*TencentCloudClient).apiV3Conn}
+
+ err := service.CheckZoneComplete(ctx, zoneId)
+ if err != nil {
+ log.Printf("[CRITAL]%s create teo dnsRecord failed, reason:%+v", logId, err)
+ return err
}
- err := resource.Retry(writeRetryTimeout, func() *resource.RetryError {
+ err = resource.Retry(writeRetryTimeout, func() *resource.RetryError {
result, e := meta.(*TencentCloudClient).apiV3Conn.UseTeoClient().CreateDnsRecord(request)
if e != nil {
- return retryError(e)
+ return retryError(e, "OperationDenied", "UnauthorizedOperation")
} else {
log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
logId, request.GetAction(), request.ToJsonString(), result.ToJsonString())
@@ -199,26 +207,28 @@ func resourceTencentCloudTeoDnsRecordCreate(d *schema.ResourceData, meta interfa
return err
}
- dnsRecordId := *response.Response.Id
+ dnsRecordId = *response.Response.DnsRecordId
- ctx := context.WithValue(context.TODO(), logIdKey, logId)
- if tags := helper.GetTags(d, "tags"); len(tags) > 0 {
- tagService := TagService{client: meta.(*TencentCloudClient).apiV3Conn}
- region := meta.(*TencentCloudClient).apiV3Conn.Region
- resourceName := fmt.Sprintf("qcs::teo:%s:uin/:zone/%s", region, dnsRecordId)
- if err := tagService.ModifyTags(ctx, resourceName, tags, nil); err != nil {
- return err
+ err = resource.Retry(6*readRetryTimeout, func() *resource.RetryError {
+ instance, errRet := service.DescribeTeoDnsRecord(ctx, zoneId, dnsRecordId)
+ if errRet != nil {
+ return retryError(errRet, InternalError)
+ }
+ if *instance.Status == "pending" {
+ return resource.RetryableError(fmt.Errorf("dnsRecord status is %v, retry...", *instance.Status))
}
+ return nil
+ })
+ if err != nil {
+ return err
}
- zoneId := *response.Response.ZoneId
- name := *response.Response.Name
- d.SetId(strings.Join([]string{zoneId, dnsRecordId, name}, FILED_SP))
+ d.SetId(zoneId + FILED_SP + dnsRecordId)
return resourceTencentCloudTeoDnsRecordRead(d, meta)
}
func resourceTencentCloudTeoDnsRecordRead(d *schema.ResourceData, meta interface{}) error {
- defer logElapsed("resource.tencentcloud_teo_dnsRecord.read")()
+ defer logElapsed("resource.tencentcloud_teo_dns_record.read")()
defer inconsistentCheck(d, meta)()
logId := getLogId(contextNil)
@@ -226,34 +236,37 @@ func resourceTencentCloudTeoDnsRecordRead(d *schema.ResourceData, meta interface
service := TeoService{client: meta.(*TencentCloudClient).apiV3Conn}
- ids := strings.Split(d.Id(), FILED_SP)
- if len(ids) != 3 {
- return fmt.Errorf("id is broken, id is %s", d.Id())
+ idSplit := strings.Split(d.Id(), FILED_SP)
+ if len(idSplit) != 2 {
+ return fmt.Errorf("id is broken,%s", d.Id())
}
+ zoneId := idSplit[0]
+ dnsRecordId := idSplit[1]
- zoneId := ids[0]
- //dnsRecordId := ids[1]
- name := ids[2]
-
- dnsRecord, err := service.DescribeTeoDnsRecord(ctx, zoneId, name)
-
+ dnsRecord, err := service.DescribeTeoDnsRecord(ctx, zoneId, dnsRecordId)
if err != nil {
return err
}
if dnsRecord == nil {
d.SetId("")
- return fmt.Errorf("resource `dnsRecord` %s does not exist", name)
+ return fmt.Errorf("resource `dnsRecord` %s does not exist", dnsRecordId)
}
- _ = d.Set("id", dnsRecord.Id)
+ if dnsRecord.ZoneId != nil {
+ _ = d.Set("zone_id", dnsRecord.ZoneId)
+ }
+
+ if dnsRecord.DnsRecordId != nil {
+ _ = d.Set("dns_record_id", dnsRecord.DnsRecordId)
+ }
- if dnsRecord.Type != nil {
- _ = d.Set("record_type", dnsRecord.Type)
+ if dnsRecord.DnsRecordType != nil {
+ _ = d.Set("type", dnsRecord.DnsRecordType)
}
- if dnsRecord.Name != nil {
- _ = d.Set("name", dnsRecord.Name)
+ if dnsRecord.DnsRecordName != nil {
+ _ = d.Set("name", dnsRecord.DnsRecordName)
}
if dnsRecord.Content != nil {
@@ -264,8 +277,8 @@ func resourceTencentCloudTeoDnsRecordRead(d *schema.ResourceData, meta interface
_ = d.Set("mode", dnsRecord.Mode)
}
- if dnsRecord.Ttl != nil {
- _ = d.Set("ttl", dnsRecord.Ttl)
+ if dnsRecord.TTL != nil {
+ _ = d.Set("ttl", dnsRecord.TTL)
}
if dnsRecord.Priority != nil {
@@ -284,14 +297,6 @@ func resourceTencentCloudTeoDnsRecordRead(d *schema.ResourceData, meta interface
_ = d.Set("locked", dnsRecord.Locked)
}
- if dnsRecord.ZoneId != nil {
- _ = d.Set("zone_id", dnsRecord.ZoneId)
- }
-
- if dnsRecord.ZoneName != nil {
- _ = d.Set("zone_name", dnsRecord.ZoneName)
- }
-
if dnsRecord.Status != nil {
_ = d.Set("status", dnsRecord.Status)
}
@@ -304,14 +309,6 @@ func resourceTencentCloudTeoDnsRecordRead(d *schema.ResourceData, meta interface
_ = d.Set("domain_status", dnsRecord.DomainStatus)
}
- tcClient := meta.(*TencentCloudClient).apiV3Conn
- tagService := &TagService{client: tcClient}
- tags, err := tagService.DescribeResourceTags(ctx, "teo", "zone", tcClient.Region, d.Id())
- if err != nil {
- return err
- }
- _ = d.Set("tags", tags)
-
return nil
}
@@ -320,31 +317,30 @@ func resourceTencentCloudTeoDnsRecordUpdate(d *schema.ResourceData, meta interfa
defer inconsistentCheck(d, meta)()
logId := getLogId(contextNil)
- ctx := context.WithValue(context.TODO(), logIdKey, logId)
-
request := teo.NewModifyDnsRecordRequest()
-
- ids := strings.Split(d.Id(), FILED_SP)
- if len(ids) != 3 {
- return fmt.Errorf("id is broken, id is %s", d.Id())
+ idSplit := strings.Split(d.Id(), FILED_SP)
+ if len(idSplit) != 2 {
+ return fmt.Errorf("id is broken,%s", d.Id())
}
-
- zoneId := ids[0]
- dnsRecordId := ids[1]
- //name := ids[2]
+ zoneId := idSplit[0]
+ dnsRecordId := idSplit[1]
request.ZoneId = &zoneId
- request.Id = &dnsRecordId
+ request.DnsRecordId = &dnsRecordId
+
+ if d.HasChange("zone_id") {
+ return fmt.Errorf("`zone_id` do not support change now.")
+ }
- if d.HasChange("record_type") {
- if v, ok := d.GetOk("record_type"); ok {
- request.Type = helper.String(v.(string))
+ if d.HasChange("type") {
+ if v, ok := d.GetOk("type"); ok {
+ request.DnsRecordType = helper.String(v.(string))
}
}
if d.HasChange("name") {
if v, ok := d.GetOk("name"); ok {
- request.Name = helper.String(v.(string))
+ request.DnsRecordName = helper.String(v.(string))
}
}
@@ -362,7 +358,7 @@ func resourceTencentCloudTeoDnsRecordUpdate(d *schema.ResourceData, meta interfa
if d.HasChange("ttl") {
if v, ok := d.GetOk("ttl"); ok {
- request.Ttl = helper.IntInt64(v.(int))
+ request.TTL = helper.IntInt64(v.(int))
}
}
@@ -384,20 +380,10 @@ func resourceTencentCloudTeoDnsRecordUpdate(d *schema.ResourceData, meta interfa
})
if err != nil {
+ log.Printf("[UPDATE]%s update teo dnsRecord failed, reason:%+v", logId, err)
return err
}
- if d.HasChange("tags") {
- tcClient := meta.(*TencentCloudClient).apiV3Conn
- tagService := &TagService{client: tcClient}
- oldTags, newTags := d.GetChange("tags")
- replaceTags, deleteTags := diffTags(oldTags.(map[string]interface{}), newTags.(map[string]interface{}))
- resourceName := BuildTagResourceName("teo", "zone", tcClient.Region, d.Id())
- if err := tagService.ModifyTags(ctx, resourceName, replaceTags, deleteTags); err != nil {
- return err
- }
- }
-
return resourceTencentCloudTeoDnsRecordRead(d, meta)
}
@@ -410,16 +396,22 @@ func resourceTencentCloudTeoDnsRecordDelete(d *schema.ResourceData, meta interfa
service := TeoService{client: meta.(*TencentCloudClient).apiV3Conn}
- ids := strings.Split(d.Id(), FILED_SP)
- if len(ids) != 3 {
- return fmt.Errorf("id is broken, id is %s", d.Id())
+ idSplit := strings.Split(d.Id(), FILED_SP)
+ if len(idSplit) != 2 {
+ return fmt.Errorf("id is broken,%s", d.Id())
}
+ zoneId := idSplit[0]
+ dnsRecordId := idSplit[1]
- zoneId := ids[0]
- dnsRecordId := ids[1]
- //name := ids[2]
+ err := resource.Retry(writeRetryTimeout, func() *resource.RetryError {
+ if e := service.DeleteTeoDnsRecordById(ctx, zoneId, dnsRecordId); e != nil {
+ return retryError(e, "OperationDenied", InternalError)
+ }
+ return nil
+ })
- if err := service.DeleteTeoDnsRecordById(ctx, zoneId, dnsRecordId); err != nil {
+ if err != nil {
+ log.Printf("[DELETE]%s delete teo dnsRecord failed, reason:%+v", logId, err)
return err
}
diff --git a/tencentcloud/resource_tc_teo_dns_sec.go b/tencentcloud/resource_tc_teo_dns_sec.go
index a0bc817388..6d7b5b18fa 100644
--- a/tencentcloud/resource_tc_teo_dns_sec.go
+++ b/tencentcloud/resource_tc_teo_dns_sec.go
@@ -1,20 +1,20 @@
/*
-Provides a resource to create a teo dnsSec
+Provides a resource to create a teo dns_sec
Example Usage
```hcl
resource "tencentcloud_teo_dns_sec" "dns_sec" {
- zone_id = tencentcloud_teo_zone.zone.id
- status = "disabled"
+ zone_id = "zone-297z8rf93cfw"
+ status = "enabled"
}
```
Import
-teo dns_sec can be imported using the id, e.g.
+teo dns_sec can be imported using the zone_id, e.g.
```
-$ terraform import tencentcloud_teo_dns_sec.dns_sec zoneId
+$ terraform import tencentcloud_teo_dns_sec.dns_sec zone-297z8rf93cfw
```
*/
package tencentcloud
@@ -26,7 +26,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
- teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220106"
+ teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901"
"github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"
)
@@ -43,15 +43,10 @@ func resourceTencentCloudTeoDnsSec() *schema.Resource {
"zone_id": {
Type: schema.TypeString,
Required: true,
+ ForceNew: true,
Description: "Site ID.",
},
- "zone_name": {
- Type: schema.TypeString,
- Computed: true,
- Description: "Site Name.",
- },
-
"status": {
Type: schema.TypeString,
Required: true,
@@ -129,37 +124,18 @@ func resourceTencentCloudTeoDnsSecCreate(d *schema.ResourceData, meta interface{
logId := getLogId(contextNil)
- var (
- request = teo.NewModifyDnssecRequest()
- zoneId string
- )
-
+ var zoneId string
if v, ok := d.GetOk("zone_id"); ok {
zoneId = v.(string)
- request.Id = helper.String(v.(string))
}
- if v, ok := d.GetOk("status"); ok {
- request.Status = helper.String(v.(string))
- }
-
- err := resource.Retry(writeRetryTimeout, func() *resource.RetryError {
- result, e := meta.(*TencentCloudClient).apiV3Conn.UseTeoClient().ModifyDnssec(request)
- if e != nil {
- return 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
- })
-
+ d.SetId(zoneId)
+ err := resourceTencentCloudTeoDnsSecUpdate(d, meta)
if err != nil {
log.Printf("[CRITAL]%s create teo dnsSec failed, reason:%+v", logId, err)
return err
}
- d.SetId(zoneId)
return resourceTencentCloudTeoDnsSecRead(d, meta)
}
@@ -185,42 +161,40 @@ func resourceTencentCloudTeoDnsSecRead(d *schema.ResourceData, meta interface{})
return fmt.Errorf("resource `dnsSec` %s does not exist", zoneId)
}
- if dnsSec.Name != nil {
- _ = d.Set("zone_name", dnsSec.Name)
- }
+ _ = d.Set("zone_id", zoneId)
if dnsSec.Status != nil {
_ = d.Set("status", dnsSec.Status)
}
- if dnsSec.Dnssec != nil {
+ if dnsSec.DnssecInfo != nil {
dnssecMap := map[string]interface{}{}
- if dnsSec.Dnssec.Flags != nil {
- dnssecMap["flags"] = dnsSec.Dnssec.Flags
+ if dnsSec.DnssecInfo.Flags != nil {
+ dnssecMap["flags"] = dnsSec.DnssecInfo.Flags
}
- if dnsSec.Dnssec.Algorithm != nil {
- dnssecMap["algorithm"] = dnsSec.Dnssec.Algorithm
+ if dnsSec.DnssecInfo.Algorithm != nil {
+ dnssecMap["algorithm"] = dnsSec.DnssecInfo.Algorithm
}
- if dnsSec.Dnssec.KeyType != nil {
- dnssecMap["key_type"] = dnsSec.Dnssec.KeyType
+ if dnsSec.DnssecInfo.KeyType != nil {
+ dnssecMap["key_type"] = dnsSec.DnssecInfo.KeyType
}
- if dnsSec.Dnssec.DigestType != nil {
- dnssecMap["digest_type"] = dnsSec.Dnssec.DigestType
+ if dnsSec.DnssecInfo.DigestType != nil {
+ dnssecMap["digest_type"] = dnsSec.DnssecInfo.DigestType
}
- if dnsSec.Dnssec.DigestAlgorithm != nil {
- dnssecMap["digest_algorithm"] = dnsSec.Dnssec.DigestAlgorithm
+ if dnsSec.DnssecInfo.DigestAlgorithm != nil {
+ dnssecMap["digest_algorithm"] = dnsSec.DnssecInfo.DigestAlgorithm
}
- if dnsSec.Dnssec.Digest != nil {
- dnssecMap["digest"] = dnsSec.Dnssec.Digest
+ if dnsSec.DnssecInfo.Digest != nil {
+ dnssecMap["digest"] = dnsSec.DnssecInfo.Digest
}
- if dnsSec.Dnssec.DS != nil {
- dnssecMap["d_s"] = dnsSec.Dnssec.DS
+ if dnsSec.DnssecInfo.DS != nil {
+ dnssecMap["d_s"] = dnsSec.DnssecInfo.DS
}
- if dnsSec.Dnssec.KeyTag != nil {
- dnssecMap["key_tag"] = dnsSec.Dnssec.KeyTag
+ if dnsSec.DnssecInfo.KeyTag != nil {
+ dnssecMap["key_tag"] = dnsSec.DnssecInfo.KeyTag
}
- if dnsSec.Dnssec.PublicKey != nil {
- dnssecMap["public_key"] = dnsSec.Dnssec.PublicKey
+ if dnsSec.DnssecInfo.PublicKey != nil {
+ dnssecMap["public_key"] = dnsSec.DnssecInfo.PublicKey
}
_ = d.Set("dnssec", []interface{}{dnssecMap})
@@ -241,10 +215,12 @@ func resourceTencentCloudTeoDnsSecUpdate(d *schema.ResourceData, meta interface{
request := teo.NewModifyDnssecRequest()
zoneId := d.Id()
- request.Id = &zoneId
+ request.ZoneId = &zoneId
- if v, ok := d.GetOk("status"); ok {
- request.Status = helper.String(v.(string))
+ if d.HasChange("status") {
+ if v, ok := d.GetOk("status"); ok {
+ request.Status = helper.String(v.(string))
+ }
}
err := resource.Retry(writeRetryTimeout, func() *resource.RetryError {
diff --git a/tencentcloud/resource_tc_teo_host_certificate.go b/tencentcloud/resource_tc_teo_host_certificate.go
index 1546754dab..925c1d6c29 100644
--- a/tencentcloud/resource_tc_teo_host_certificate.go
+++ b/tencentcloud/resource_tc_teo_host_certificate.go
@@ -1,25 +1,25 @@
/*
-Provides a resource to create a teo hostCertificate
+Provides a resource to create a teo host_certificate
Example Usage
```hcl
-resource "tencentcloud_teo_host_certificate" "host_certificate" {
- zone_id = tencentcloud_teo_zone.zone.id
- host = tencentcloud_teo_dns_record.dns_record.name
-
- cert_info {
- cert_id = "yqWPPbs7"
- status = "deployed"
- }
+resource "tencentcloud_teo_host_certificate" "vstest_sfurnace_work" {
+ zone_id = tencentcloud_teo_zone.sfurnace_work.id
+ host = tencentcloud_teo_dns_record.vstest_sfurnace_work.name
+
+ cert_info {
+ cert_id = "yqWPPbs7"
+ status = "deployed"
+ }
}
```
Import
-teo hostCertificate can be imported using the id, e.g.
+teo host_certificate can be imported using the id, e.g.
```
-$ terraform import tencentcloud_teo_host_certificate.host_certificate zoneId#host
+$ terraform import tencentcloud_teo_host_certificate.host_certificate hostCertificate_id
```
*/
package tencentcloud
@@ -32,7 +32,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
- teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220106"
+ teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901"
"github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"
)
@@ -62,7 +62,7 @@ func resourceTencentCloudTeoHostCertificate() *schema.Resource {
Type: schema.TypeList,
Optional: true,
Computed: true,
- Description: "Server certificate configuration.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "Server certificate configuration. Note: This field may return null, indicating that no valid value can be obtained.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"cert_id": {
@@ -73,23 +73,28 @@ func resourceTencentCloudTeoHostCertificate() *schema.Resource {
"alias": {
Type: schema.TypeString,
Computed: true,
- Description: "Alias of the certificate.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "Alias of the certificate. Note: This field may return null, indicating that no valid value can be obtained.",
},
"type": {
Type: schema.TypeString,
Computed: true,
- Description: "Certificate type.- default: Default certificate.- upload: External certificate.- managed: Tencent Cloud managed certificate.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "Certificate type.- `default`: Default certificate.- `upload`: External certificate.- `managed`: Tencent Cloud managed certificate. Note: This field may return null, indicating that no valid value can be obtained.",
},
"expire_time": {
Type: schema.TypeString,
Computed: true,
- Description: "Time when the certificate expires.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "Time when the certificate expires. Note: This field may return null, indicating that no valid value can be obtained.",
+ },
+ "effective_time": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Time when the certificate takes effect. Note: This field may return null, indicating that no valid value can be obtained.",
},
"status": {
Type: schema.TypeString,
Optional: true,
Computed: true,
- Description: "Certificate deployment status.- processing: Deploying- deployed: DeployedNote: This field may return null, indicating that no valid value can be obtained.",
+ Description: "Certificate deployment status.- `processing`: Deploying- `deployed`: Deployed Note: This field may return null, indicating that no valid value can be obtained.",
},
},
},
@@ -102,9 +107,12 @@ func resourceTencentCloudTeoHostCertificateCreate(d *schema.ResourceData, meta i
defer logElapsed("resource.tencentcloud_teo_host_certificate.create")()
defer inconsistentCheck(d, meta)()
+ logId := getLogId(contextNil)
+
var (
zoneId string
host string
+ certId string
)
if v, ok := d.GetOk("zone_id"); ok {
@@ -114,8 +122,29 @@ func resourceTencentCloudTeoHostCertificateCreate(d *schema.ResourceData, meta i
if v, ok := d.GetOk("host"); ok {
host = v.(string)
}
- d.SetId(zoneId + FILED_SP + host)
- return resourceTencentCloudTeoHostCertificateUpdate(d, meta)
+
+ if v, ok := d.GetOk("cert_info"); ok {
+ for _, item := range v.([]interface{}) {
+ dMap := item.(map[string]interface{})
+ if v, ok := dMap["cert_id"]; ok {
+ certId = v.(string)
+ }
+ if v, ok := dMap["status"]; ok {
+ if v.(string) != "" {
+ return fmt.Errorf("[CRITAL] create teo hostCertificate status error")
+ }
+ }
+ }
+ }
+
+ err := resourceTencentCloudTeoHostCertificateUpdate(d, meta)
+ if err != nil {
+ log.Printf("[CRITAL]%s create teo hostCertificate failed, reason:%+v", logId, err)
+ return err
+ }
+
+ d.SetId(zoneId + FILED_SP + host + FILED_SP + certId)
+ return resourceTencentCloudTeoHostCertificateRead(d, meta)
}
func resourceTencentCloudTeoHostCertificateRead(d *schema.ResourceData, meta interface{}) error {
@@ -128,13 +157,14 @@ func resourceTencentCloudTeoHostCertificateRead(d *schema.ResourceData, meta int
service := TeoService{client: meta.(*TencentCloudClient).apiV3Conn}
idSplit := strings.Split(d.Id(), FILED_SP)
- if len(idSplit) != 2 {
+ if len(idSplit) != 3 {
return fmt.Errorf("id is broken,%s", d.Id())
}
zoneId := idSplit[0]
host := idSplit[1]
+ cateId := idSplit[2]
- hostCertificate, err := service.DescribeTeoHostCertificate(ctx, zoneId, host)
+ hostCertificate, err := service.DescribeTeoHostCertificate(ctx, zoneId, host, cateId)
if err != nil {
return err
@@ -142,16 +172,16 @@ func resourceTencentCloudTeoHostCertificateRead(d *schema.ResourceData, meta int
if hostCertificate == nil {
d.SetId("")
- return fmt.Errorf("resource `hostCertificate` %s does not exist", d.Id())
+ return fmt.Errorf("resource `hostCertificate` %s does not exist", cateId)
}
- if hostCertificate.Host != nil {
- _ = d.Set("host", hostCertificate.Host)
- }
+ _ = d.Set("zone_id", zoneId)
+ _ = d.Set("host", host)
- if hostCertificate.CertInfo != nil {
+ if hostCertificate != nil {
certInfoList := []interface{}{}
- for _, certInfo := range hostCertificate.CertInfo {
+ for _, certificate := range hostCertificate {
+ certInfo := certificate.HostCertInfo
certInfoMap := map[string]interface{}{}
if certInfo.CertId != nil {
certInfoMap["cert_id"] = certInfo.CertId
@@ -165,8 +195,14 @@ func resourceTencentCloudTeoHostCertificateRead(d *schema.ResourceData, meta int
if certInfo.ExpireTime != nil {
certInfoMap["expire_time"] = certInfo.ExpireTime
}
- if certInfo.Status != nil {
- certInfoMap["status"] = certInfo.Status
+ //if certInfo.EffectiveTime != nil {
+ // certInfoMap["effective_time"] = certInfo.EffectiveTime
+ //}
+ if certInfo.DeployTime != nil {
+ certInfoMap["deploy_time"] = certInfo.DeployTime
+ }
+ if certInfo.SignAlgo != nil {
+ certInfoMap["sign_algo"] = certInfo.SignAlgo
}
certInfoList = append(certInfoList, certInfoMap)
@@ -186,27 +222,37 @@ func resourceTencentCloudTeoHostCertificateUpdate(d *schema.ResourceData, meta i
request := teo.NewModifyHostsCertificateRequest()
idSplit := strings.Split(d.Id(), FILED_SP)
- if len(idSplit) != 2 {
+ if len(idSplit) != 3 {
return fmt.Errorf("id is broken,%s", d.Id())
}
zoneId := idSplit[0]
host := idSplit[1]
+ //cateId := idSplit[2]
- request.ZoneId = helper.String(zoneId)
- request.Hosts = []*string{helper.String(host)}
+ request.ZoneId = &zoneId
+ request.Hosts = []*string{&host}
- if v, ok := d.GetOk("cert_info"); ok {
- for _, item := range v.([]interface{}) {
- dMap := item.(map[string]interface{})
- serverCertInfo := teo.ServerCertInfo{}
- if v, ok := dMap["cert_id"]; ok {
- serverCertInfo.CertId = helper.String(v.(string))
- }
- if v, ok := dMap["status"]; ok {
- serverCertInfo.Status = helper.String(v.(string))
- }
+ if d.HasChange("zone_id") {
+ return fmt.Errorf("`zone_id` do not support change now.")
+ }
+
+ if d.HasChange("host") {
+ return fmt.Errorf("`host` do not support change now.")
+ }
- request.CertInfo = append(request.CertInfo, &serverCertInfo)
+ if d.HasChange("cert_info") {
+ if v, ok := d.GetOk("cert_info"); ok {
+ for _, item := range v.([]interface{}) {
+ dMap := item.(map[string]interface{})
+ serverCertInfo := teo.ServerCertInfo{}
+ if v, ok := dMap["cert_id"]; ok {
+ serverCertInfo.CertId = helper.String(v.(string))
+ }
+ //if v, ok := dMap["status"]; ok {
+ // serverCertInfo.Status = helper.String(v.(string))
+ //}
+ request.ServerCertInfo = append(request.ServerCertInfo, &serverCertInfo)
+ }
}
}
diff --git a/tencentcloud/resource_tc_teo_load_balancing.go b/tencentcloud/resource_tc_teo_load_balancing.go
index f1d71701bb..f38b8ebb38 100644
--- a/tencentcloud/resource_tc_teo_load_balancing.go
+++ b/tencentcloud/resource_tc_teo_load_balancing.go
@@ -1,26 +1,26 @@
/*
-Provides a resource to create a teo loadBalancing
+Provides a resource to create a teo load_balancing
Example Usage
```hcl
resource "tencentcloud_teo_load_balancing" "load_balancing" {
- zone_id = tencentcloud_teo_zone.zone.id
-
- host = "sfurnace.work"
- origin_id = [
- split("#", tencentcloud_teo_origin_group.group0.id)[1]
- ]
- ttl = 600
- type = "proxied"
+# backup_origin_group_id = "origin-a499ca4b-3721-11ed-b9c1-5254005a52aa"
+ host = "www.toutiao2.com"
+ origin_group_id = "origin-4f8a30b2-3720-11ed-b66b-525400dceb86"
+ status = "online"
+ tags = {}
+ ttl = 600
+ type = "proxied"
+ zone_id = "zone-297z8rf93cfw"
}
```
Import
-teo loadBalancing can be imported using the id, e.g.
+teo load_balancing can be imported using the zone_id#loadBalancing_id, e.g.
```
-$ terraform import tencentcloud_teo_load_balancing.loadBalancing loadBalancing_id
+$ terraform import tencentcloud_teo_load_balancing.load_balancing zone-297z8rf93cfw#lb-2a93c649-3719-11ed-b9c1-5254005a52aa
```
*/
package tencentcloud
@@ -33,7 +33,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
- teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220106"
+ teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901"
"github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"
)
@@ -47,19 +47,18 @@ func resourceTencentCloudTeoLoadBalancing() *schema.Resource {
State: schema.ImportStatePassthrough,
},
Schema: map[string]*schema.Schema{
- "load_balancing_id": {
- Type: schema.TypeString,
- Computed: true,
- Description: "CLB instance ID.",
- },
-
"zone_id": {
Type: schema.TypeString,
Required: true,
- ForceNew: true,
Description: "Site ID.",
},
+ "load_balancing_id": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Load balancer instance ID.",
+ },
+
"host": {
Type: schema.TypeString,
Required: true,
@@ -69,35 +68,46 @@ func resourceTencentCloudTeoLoadBalancing() *schema.Resource {
"type": {
Type: schema.TypeString,
Required: true,
- Description: "Proxy mode. Valid values: dns_only: Only DNS, proxied: Enable proxy.",
+ Description: "Proxy mode.- `dns_only`: Only DNS.- `proxied`: Enable proxy.",
+ },
+
+ "origin_group_id": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "ID of the origin group to use.",
+ },
+
+ "backup_origin_group_id": {
+ Type: schema.TypeString,
+ Optional: true,
+ Computed: true,
+ Description: "ID of the backup origin group to use.",
},
"ttl": {
Type: schema.TypeInt,
Optional: true,
Computed: true,
- Description: "Indicates DNS TTL time when Type=dns_only.",
+ Description: "Indicates DNS TTL time when `Type` is dns_only.",
},
- "origin_id": {
- Type: schema.TypeSet,
- Elem: &schema.Schema{
- Type: schema.TypeString,
- },
- Required: true,
- Description: "ID of the origin group used.",
+ "status": {
+ Type: schema.TypeString,
+ Optional: true,
+ Computed: true,
+ Description: "Status of the task. Valid values to set: `online`, `offline`. During status change, the status is `process`.",
},
- "update_time": {
+ "cname": {
Type: schema.TypeString,
Computed: true,
- Description: "Update time.",
+ Description: "Schedules domain names. Note: This field may return null, indicating that no valid value can be obtained.",
},
- "cname": {
+ "update_time": {
Type: schema.TypeString,
Computed: true,
- Description: "Schedules domain names, Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "Last modification date.",
},
},
}
@@ -110,14 +120,15 @@ func resourceTencentCloudTeoLoadBalancingCreate(d *schema.ResourceData, meta int
logId := getLogId(contextNil)
var (
- request = teo.NewCreateLoadBalancingRequest()
- response *teo.CreateLoadBalancingResponse
- zoneId string
+ request = teo.NewCreateLoadBalancingRequest()
+ response *teo.CreateLoadBalancingResponse
+ zoneId string
+ loadBalancingId string
)
if v, ok := d.GetOk("zone_id"); ok {
zoneId = v.(string)
- request.ZoneId = helper.String(zoneId)
+ request.ZoneId = helper.String(v.(string))
}
if v, ok := d.GetOk("host"); ok {
@@ -128,16 +139,18 @@ func resourceTencentCloudTeoLoadBalancingCreate(d *schema.ResourceData, meta int
request.Type = helper.String(v.(string))
}
- if v, ok := d.GetOk("ttl"); ok {
- request.TTL = helper.IntUint64(v.(int))
+ if v, ok := d.GetOk("origin_group_id"); ok {
+ request.OriginGroupId = helper.String(v.(string))
}
- if v, ok := d.GetOk("origin_id"); ok {
- originIdSet := v.(*schema.Set).List()
- for i := range originIdSet {
- originId := originIdSet[i].(string)
- request.OriginId = append(request.OriginId, &originId)
- }
+ if v, ok := d.GetOk("backup_origin_group_id"); ok {
+ request.BackupOriginGroupId = helper.String(v.(string))
+ } else {
+ request.BackupOriginGroupId = helper.String("")
+ }
+
+ if v, ok := d.GetOk("ttl"); ok {
+ request.TTL = helper.IntUint64(v.(int))
}
err := resource.Retry(writeRetryTimeout, func() *resource.RetryError {
@@ -157,14 +170,34 @@ func resourceTencentCloudTeoLoadBalancingCreate(d *schema.ResourceData, meta int
return err
}
- loadBalancingId := *response.Response.LoadBalancingId
+ loadBalancingId = *response.Response.LoadBalancingId
- d.SetId(zoneId + "#" + loadBalancingId)
+ service := TeoService{client: meta.(*TencentCloudClient).apiV3Conn}
+ ctx := context.WithValue(context.TODO(), logIdKey, logId)
+
+ err = resource.Retry(6*readRetryTimeout, func() *resource.RetryError {
+ instance, errRet := service.DescribeTeoLoadBalancing(ctx, zoneId, loadBalancingId)
+ if errRet != nil {
+ return retryError(errRet, InternalError)
+ }
+ if *instance.Status == "online" || *instance.Status == "init" {
+ return nil
+ }
+ if *instance.Status == "process" {
+ return resource.RetryableError(fmt.Errorf("loadBalancing status is %v, operate failed.", *instance.Status))
+ }
+ return resource.RetryableError(fmt.Errorf("loadBalancing status is %v, retry...", *instance.Status))
+ })
+ if err != nil {
+ return err
+ }
+
+ d.SetId(zoneId + FILED_SP + loadBalancingId)
return resourceTencentCloudTeoLoadBalancingRead(d, meta)
}
func resourceTencentCloudTeoLoadBalancingRead(d *schema.ResourceData, meta interface{}) error {
- defer logElapsed("resource.tencentcloud_teo_loadBalancing.read")()
+ defer logElapsed("resource.tencentcloud_teo_load_balancing.read")()
defer inconsistentCheck(d, meta)()
logId := getLogId(contextNil)
@@ -190,14 +223,14 @@ func resourceTencentCloudTeoLoadBalancingRead(d *schema.ResourceData, meta inter
return fmt.Errorf("resource `loadBalancing` %s does not exist", loadBalancingId)
}
- if loadBalancing.LoadBalancingId != nil {
- _ = d.Set("load_balancing_id", loadBalancing.LoadBalancingId)
- }
-
if loadBalancing.ZoneId != nil {
_ = d.Set("zone_id", loadBalancing.ZoneId)
}
+ if loadBalancing.LoadBalancingId != nil {
+ _ = d.Set("load_balancing_id", loadBalancing.LoadBalancingId)
+ }
+
if loadBalancing.Host != nil {
_ = d.Set("host", loadBalancing.Host)
}
@@ -206,22 +239,30 @@ func resourceTencentCloudTeoLoadBalancingRead(d *schema.ResourceData, meta inter
_ = d.Set("type", loadBalancing.Type)
}
- if loadBalancing.TTL != nil {
- _ = d.Set("ttl", loadBalancing.TTL)
+ if loadBalancing.OriginGroupId != nil {
+ _ = d.Set("origin_group_id", loadBalancing.OriginGroupId)
}
- if loadBalancing.OriginId != nil {
- _ = d.Set("origin_id", loadBalancing.OriginId)
+ if loadBalancing.BackupOriginGroupId != nil {
+ _ = d.Set("backup_origin_group_id", loadBalancing.BackupOriginGroupId)
}
- if loadBalancing.UpdateTime != nil {
- _ = d.Set("update_time", loadBalancing.UpdateTime)
+ if loadBalancing.TTL != nil {
+ _ = d.Set("ttl", loadBalancing.TTL)
+ }
+
+ if loadBalancing.Status != nil {
+ _ = d.Set("status", loadBalancing.Status)
}
if loadBalancing.Cname != nil {
_ = d.Set("cname", loadBalancing.Cname)
}
+ if loadBalancing.UpdateTime != nil {
+ _ = d.Set("update_time", loadBalancing.UpdateTime)
+ }
+
return nil
}
@@ -229,20 +270,48 @@ func resourceTencentCloudTeoLoadBalancingUpdate(d *schema.ResourceData, meta int
defer logElapsed("resource.tencentcloud_teo_load_balancing.update")()
defer inconsistentCheck(d, meta)()
- logId := getLogId(contextNil)
+ var (
+ logId = getLogId(contextNil)
+ request = teo.NewModifyLoadBalancingRequest()
+ statusRequest = teo.NewModifyLoadBalancingStatusRequest()
+ )
- request := teo.NewModifyLoadBalancingRequest()
+ idSplit := strings.Split(d.Id(), FILED_SP)
+ if len(idSplit) != 2 {
+ return fmt.Errorf("id is broken,%s", d.Id())
+ }
+ zoneId := idSplit[0]
+ loadBalancingId := idSplit[1]
+
+ request.ZoneId = &zoneId
+ request.LoadBalancingId = &loadBalancingId
- request.ZoneId = helper.String(d.Id())
+ if d.HasChange("zone_id") {
+
+ return fmt.Errorf("`zone_id` do not support change now.")
+
+ }
if d.HasChange("host") {
+
return fmt.Errorf("`host` do not support change now.")
+
}
- if d.HasChange("type") {
- if v, ok := d.GetOk("type"); ok {
- request.Type = helper.String(v.(string))
+ if v, ok := d.GetOk("type"); ok {
+ request.Type = helper.String(v.(string))
+ }
+
+ if v, ok := d.GetOk("origin_group_id"); ok {
+ request.OriginGroupId = helper.String(v.(string))
+ }
+
+ if d.HasChange("backup_origin_group_id") {
+ if v, ok := d.GetOk("backup_origin_group_id"); ok {
+ request.BackupOriginGroupId = helper.String(v.(string))
}
+ } else {
+ request.BackupOriginGroupId = helper.String("")
}
if d.HasChange("ttl") {
@@ -251,16 +320,6 @@ func resourceTencentCloudTeoLoadBalancingUpdate(d *schema.ResourceData, meta int
}
}
- if d.HasChange("origin_id") {
- if v, ok := d.GetOk("origin_id"); ok {
- originIdSet := v.(*schema.Set).List()
- for i := range originIdSet {
- originId := originIdSet[i].(string)
- request.OriginId = append(request.OriginId, &originId)
- }
- }
- }
-
err := resource.Retry(writeRetryTimeout, func() *resource.RetryError {
result, e := meta.(*TencentCloudClient).apiV3Conn.UseTeoClient().ModifyLoadBalancing(request)
if e != nil {
@@ -273,9 +332,34 @@ func resourceTencentCloudTeoLoadBalancingUpdate(d *schema.ResourceData, meta int
})
if err != nil {
+ log.Printf("[CRITAL]%s create teo loadBalancing failed, reason:%+v", logId, err)
return err
}
+ if d.HasChange("status") {
+ statusRequest.ZoneId = &zoneId
+ statusRequest.LoadBalancingId = &loadBalancingId
+ if v, ok := d.GetOk("status"); ok {
+ statusRequest.Status = helper.String(v.(string))
+ }
+
+ statusErr := resource.Retry(writeRetryTimeout, func() *resource.RetryError {
+ statusResult, e := meta.(*TencentCloudClient).apiV3Conn.UseTeoClient().ModifyLoadBalancingStatus(statusRequest)
+ if e != nil {
+ return retryError(e)
+ } else {
+ log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
+ logId, statusRequest.GetAction(), statusRequest.ToJsonString(), statusResult.ToJsonString())
+ }
+ return nil
+ })
+
+ if statusErr != nil {
+ log.Printf("[CRITAL]%s create teo loadBalancing failed, reason:%+v", logId, statusErr)
+ return statusErr
+ }
+ }
+
return resourceTencentCloudTeoLoadBalancingRead(d, meta)
}
@@ -293,6 +377,25 @@ func resourceTencentCloudTeoLoadBalancingDelete(d *schema.ResourceData, meta int
}
zoneId := idSplit[0]
loadBalancingId := idSplit[1]
+ statusRequest := teo.NewModifyLoadBalancingStatusRequest()
+ statusRequest.ZoneId = &zoneId
+ statusRequest.LoadBalancingId = &loadBalancingId
+ statusRequest.Status = helper.String("offline")
+ statusErr := resource.Retry(writeRetryTimeout, func() *resource.RetryError {
+ statusResult, e := meta.(*TencentCloudClient).apiV3Conn.UseTeoClient().ModifyLoadBalancingStatus(statusRequest)
+ if e != nil {
+ return retryError(e)
+ } else {
+ log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
+ logId, statusRequest.GetAction(), statusRequest.ToJsonString(), statusResult.ToJsonString())
+ }
+ return nil
+ })
+
+ if statusErr != nil {
+ log.Printf("[CRITAL]%s offline teo loadBalancing failed, reason:%+v", logId, statusErr)
+ return statusErr
+ }
if err := service.DeleteTeoLoadBalancingById(ctx, zoneId, loadBalancingId); err != nil {
return err
diff --git a/tencentcloud/resource_tc_teo_origin_group.go b/tencentcloud/resource_tc_teo_origin_group.go
index 0c4726e00c..a3d29a1f4f 100644
--- a/tencentcloud/resource_tc_teo_origin_group.go
+++ b/tencentcloud/resource_tc_teo_origin_group.go
@@ -1,47 +1,32 @@
/*
-Provides a resource to create a teo originGroup
+Provides a resource to create a teo origin_group
Example Usage
```hcl
-locals {
- group0 = [
- {
- "record" = "1.1.1.1"
- "port" = 80
- "weight" = 30
- }, {
- "record" = "2.2.2.2"
- "port" = 443
- "weight" = 70
- }
- ]
-}
-
resource "tencentcloud_teo_origin_group" "origin_group" {
- zone_id = tencentcloud_teo_zone.zone.id
- origin_name = "group0"
- origin_type = "self"
- type = "weight"
-
- dynamic "record" {
- for_each = local.group0
- content {
- record = record.value["record"]
- port = record.value["port"]
- weight = record.value["weight"]
- area = []
- }
+ configuration_type = "weight"
+ origin_group_name = "test-group"
+ origin_type = "self"
+ tags = {}
+ zone_id = "zone-297z8rf93cfw"
+
+ origin_records {
+ area = []
+ port = 8080
+ private = false
+ record = "150.109.8.1"
+ weight = 100
}
}
-```
+````
Import
-teo origin_group can be imported using the id, e.g.
-```
-$ terraform import tencentcloud_teo_origin_group.origin_group zoneId#originId
-```
+teo origin_group can be imported using the zone_id#originGroup_id, e.g.
+````
+$ terraform import tencentcloud_teo_origin_group.origin_group zone-297z8rf93cfw#origin-4f8a30b2-3720-11ed-b66b-525400dceb86
+````
*/
package tencentcloud
@@ -53,7 +38,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
- teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220106"
+ teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901"
"github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"
)
@@ -67,51 +52,74 @@ func resourceTencentCloudTeoOriginGroup() *schema.Resource {
State: schema.ImportStatePassthrough,
},
Schema: map[string]*schema.Schema{
- "origin_name": {
+ "zone_id": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Site ID.",
+ },
+
+ "origin_group_id": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "OriginGroup ID.",
+ },
+
+ "origin_group_name": {
Type: schema.TypeString,
Required: true,
Description: "OriginGroup Name.",
},
- "type": {
+ "origin_type": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Type of the origin site. Valid values:- `self`: self-build website.- `cos`: tencent cos.- `third_party`: third party cos.",
+ },
+
+ "configuration_type": {
Type: schema.TypeString,
Required: true,
- Description: "Type of the origin group, this field is required only when `OriginType` is `self`. Valid values:- area: select an origin by using Geo info of the client IP and `Area` field in Records.- weight: weighted select an origin by using `Weight` field in Records.",
+ Description: "Type of the origin group, this field should be set when `OriginType` is self, otherwise leave it empty. Valid values:- `area`: select an origin by using Geo info of the client IP and `Area` field in Records.- `weight`: weighted select an origin by using `Weight` field in Records.- `proto`: config by HTTP protocol.",
},
- "record": {
+ "origin_records": {
Type: schema.TypeList,
Required: true,
- Description: "Origin website records.",
+ Description: "Origin site records.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
+ "record_id": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Record Id.",
+ },
"record": {
Type: schema.TypeString,
Required: true,
- Description: "Record Value.",
+ Description: "Record value, which could be an IPv4/IPv6 address or a domain.",
},
- "area": {
- Type: schema.TypeSet,
- Elem: &schema.Schema{
- Type: schema.TypeString,
- },
+ "port": {
+ Type: schema.TypeInt,
Required: true,
- Description: "Indicating origin website's area when `Type` field is `area`. An empty List indicate the default area.",
+ Description: "Port of the origin site. Valid value range: 1-65535.",
},
"weight": {
Type: schema.TypeInt,
- Required: true,
- Description: "Indicating origin website's weight when `Type` field is `weight`. Valid value range: 1-100. Sum of all weights should be 100.",
+ Optional: true,
+ Description: "Indicating origin site's weight when `Type` field is `weight`. Valid value range: 1-100. Sum of all weights should be 100.",
},
- "port": {
- Type: schema.TypeInt,
- Required: true,
- Description: "Port of the origin website.",
+ "area": {
+ Type: schema.TypeSet,
+ Elem: &schema.Schema{
+ Type: schema.TypeString,
+ },
+ Optional: true,
+ Description: "Indicating origin site's area when `Type` field is `area`. An empty List indicate the default area. Valid value:- Asia, Americas, Europe, Africa or Oceania.- 2 characters ISO 3166 area code.",
},
"private": {
Type: schema.TypeBool,
Optional: true,
- Description: "Whether origin website is using private authentication. Only valid when `OriginType` is `third_party`.",
+ Description: "Whether origin site is using private authentication. Only valid when `OriginType` is `third_party`.",
},
"private_parameter": {
Type: schema.TypeList,
@@ -122,7 +130,7 @@ func resourceTencentCloudTeoOriginGroup() *schema.Resource {
"name": {
Type: schema.TypeString,
Required: true,
- Description: "Parameter Name. Valid values:- AccessKeyId: Access Key ID.- SecretAccessKey: Secret Access Key.",
+ Description: "Parameter Name. Valid values:- AccessKeyId:Access Key ID.- SecretAccessKey:Secret Access Key.",
},
"value": {
Type: schema.TypeString,
@@ -132,33 +140,10 @@ func resourceTencentCloudTeoOriginGroup() *schema.Resource {
},
},
},
- "record_id": {
- Type: schema.TypeString,
- Computed: true,
- Description: "Record Id.",
- },
},
},
},
- "zone_id": {
- Type: schema.TypeString,
- Required: true,
- Description: "Site ID.",
- },
-
- "origin_type": {
- Type: schema.TypeString,
- Optional: true,
- Description: "Type of the origin website. Valid values:- self: self-build website.- cos: tencent cos.- third_party: third party cos.",
- },
-
- "zone_name": {
- Type: schema.TypeString,
- Computed: true,
- Description: "Site Name.",
- },
-
"update_time": {
Type: schema.TypeString,
Computed: true,
@@ -175,27 +160,46 @@ func resourceTencentCloudTeoOriginGroupCreate(d *schema.ResourceData, meta inter
logId := getLogId(contextNil)
var (
- request = teo.NewCreateOriginGroupRequest()
- response *teo.CreateOriginGroupResponse
- zoneId string
- originId string
+ request = teo.NewCreateOriginGroupRequest()
+ response *teo.CreateOriginGroupResponse
+ zoneId string
+ originGroupId string
)
- if v, ok := d.GetOk("origin_name"); ok {
- request.OriginName = helper.String(v.(string))
+ if v, ok := d.GetOk("zone_id"); ok {
+ zoneId = v.(string)
+ request.ZoneId = helper.String(v.(string))
}
- if v, ok := d.GetOk("type"); ok {
- request.Type = helper.String(v.(string))
+ //if v, ok := d.GetOk("origin_group_id"); ok {
+ // request.OriginGroupId = helper.String(v.(string))
+ //}
+
+ if v, ok := d.GetOk("origin_group_name"); ok {
+ request.OriginGroupName = helper.String(v.(string))
}
- if v, ok := d.GetOk("record"); ok {
+ if v, ok := d.GetOk("origin_type"); ok {
+ request.OriginType = helper.String(v.(string))
+ }
+
+ if v, ok := d.GetOk("configuration_type"); ok {
+ request.ConfigurationType = helper.String(v.(string))
+ }
+
+ if v, ok := d.GetOk("origin_records"); ok {
for _, item := range v.([]interface{}) {
dMap := item.(map[string]interface{})
originRecord := teo.OriginRecord{}
if v, ok := dMap["record"]; ok {
originRecord.Record = helper.String(v.(string))
}
+ if v, ok := dMap["port"]; ok {
+ originRecord.Port = helper.IntUint64(v.(int))
+ }
+ if v, ok := dMap["weight"]; ok {
+ originRecord.Weight = helper.IntUint64(v.(int))
+ }
if v, ok := dMap["area"]; ok {
areaSet := v.(*schema.Set).List()
for i := range areaSet {
@@ -203,46 +207,30 @@ func resourceTencentCloudTeoOriginGroupCreate(d *schema.ResourceData, meta inter
originRecord.Area = append(originRecord.Area, &area)
}
}
- if v, ok := dMap["weight"]; ok {
- originRecord.Weight = helper.IntUint64(v.(int))
- }
- if v, ok := dMap["port"]; ok {
- originRecord.Port = helper.IntUint64(v.(int))
- }
if v, ok := dMap["private"]; ok {
originRecord.Private = helper.Bool(v.(bool))
}
if v, ok := dMap["private_parameter"]; ok {
for _, item := range v.([]interface{}) {
PrivateParameterMap := item.(map[string]interface{})
- originRecordPrivateParameter := teo.OriginRecordPrivateParameter{}
+ originRecordPrivateParameter := teo.PrivateParameter{}
if v, ok := PrivateParameterMap["name"]; ok {
originRecordPrivateParameter.Name = helper.String(v.(string))
}
if v, ok := PrivateParameterMap["value"]; ok {
originRecordPrivateParameter.Value = helper.String(v.(string))
}
- originRecord.PrivateParameter = append(originRecord.PrivateParameter, &originRecordPrivateParameter)
+ originRecord.PrivateParameters = append(originRecord.PrivateParameters, &originRecordPrivateParameter)
}
}
-
- request.Record = append(request.Record, &originRecord)
+ request.OriginRecords = append(request.OriginRecords, &originRecord)
}
}
- if v, ok := d.GetOk("zone_id"); ok {
- zoneId = v.(string)
- request.ZoneId = helper.String(v.(string))
- }
-
- if v, ok := d.GetOk("origin_type"); ok {
- request.OriginType = helper.String(v.(string))
- }
-
err := resource.Retry(writeRetryTimeout, func() *resource.RetryError {
result, e := meta.(*TencentCloudClient).apiV3Conn.UseTeoClient().CreateOriginGroup(request)
if e != nil {
- return retryError(e)
+ return retryError(e, "OperationDenied")
} else {
log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
logId, request.GetAction(), request.ToJsonString(), result.ToJsonString())
@@ -256,9 +244,9 @@ func resourceTencentCloudTeoOriginGroupCreate(d *schema.ResourceData, meta inter
return err
}
- originId = *response.Response.OriginId
+ originGroupId = *response.Response.OriginGroupId
- d.SetId(zoneId + FILED_SP + originId)
+ d.SetId(zoneId + FILED_SP + originGroupId)
return resourceTencentCloudTeoOriginGroupRead(d, meta)
}
@@ -276,9 +264,9 @@ func resourceTencentCloudTeoOriginGroupRead(d *schema.ResourceData, meta interfa
return fmt.Errorf("id is broken,%s", d.Id())
}
zoneId := idSplit[0]
- originId := idSplit[1]
+ originGroupId := idSplit[1]
- originGroup, err := service.DescribeTeoOriginGroup(ctx, zoneId, originId)
+ originGroup, err := service.DescribeTeoOriginGroup(ctx, zoneId, originGroupId)
if err != nil {
return err
@@ -286,39 +274,49 @@ func resourceTencentCloudTeoOriginGroupRead(d *schema.ResourceData, meta interfa
if originGroup == nil {
d.SetId("")
- return fmt.Errorf("resource `originGroup` %s does not exist", originId)
+ return fmt.Errorf("resource `originGroup` %s does not exist", originGroupId)
+ }
+
+ _ = d.Set("zone_id", zoneId)
+ _ = d.Set("origin_group_id", originGroupId)
+
+ if originGroup.OriginGroupName != nil {
+ _ = d.Set("origin_group_name", originGroup.OriginGroupName)
}
- if originGroup.OriginName != nil {
- _ = d.Set("origin_name", originGroup.OriginName)
+ if originGroup.OriginType != nil {
+ _ = d.Set("origin_type", originGroup.OriginType)
}
- if originGroup.Type != nil {
- _ = d.Set("type", originGroup.Type)
+ if originGroup.ConfigurationType != nil {
+ _ = d.Set("configuration_type", originGroup.ConfigurationType)
}
- if originGroup.Record != nil {
- recordList := []interface{}{}
- for _, record := range originGroup.Record {
- recordMap := map[string]interface{}{}
- if record.Record != nil {
- recordMap["record"] = record.Record
+ if originGroup.OriginRecords != nil {
+ originRecordsList := []interface{}{}
+ for _, originRecords := range originGroup.OriginRecords {
+ originRecordsMap := map[string]interface{}{}
+ if originRecords.RecordId != nil {
+ originRecordsMap["record_id"] = originRecords.RecordId
}
- if record.Area != nil {
- recordMap["area"] = record.Area
+ if originRecords.Record != nil {
+ originRecordsMap["record"] = originRecords.Record
}
- if record.Weight != nil {
- recordMap["weight"] = record.Weight
+ if originRecords.Port != nil {
+ originRecordsMap["port"] = originRecords.Port
}
- if record.Port != nil {
- recordMap["port"] = record.Port
+ if originRecords.Weight != nil {
+ originRecordsMap["weight"] = originRecords.Weight
}
- if record.Private != nil {
- recordMap["private"] = record.Private
+ if originRecords.Area != nil {
+ originRecordsMap["area"] = originRecords.Area
}
- if record.PrivateParameter != nil {
+ if originRecords.Private != nil {
+ originRecordsMap["private"] = originRecords.Private
+ }
+ if originRecords.PrivateParameters != nil {
privateParameterList := []interface{}{}
- for _, privateParameter := range record.PrivateParameter {
+ for _, privateParameter := range originRecords.PrivateParameters {
privateParameterMap := map[string]interface{}{}
if privateParameter.Name != nil {
privateParameterMap["name"] = privateParameter.Name
@@ -329,27 +327,12 @@ func resourceTencentCloudTeoOriginGroupRead(d *schema.ResourceData, meta interfa
privateParameterList = append(privateParameterList, privateParameterMap)
}
- recordMap["private_parameter"] = privateParameterList
- }
- if record.RecordId != nil {
- recordMap["record_id"] = record.RecordId
+ originRecordsMap["private_parameter"] = privateParameterList
}
- recordList = append(recordList, recordMap)
+ originRecordsList = append(originRecordsList, originRecordsMap)
}
- _ = d.Set("record", recordList)
- }
-
- if originGroup.ZoneId != nil {
- _ = d.Set("zone_id", originGroup.ZoneId)
- }
-
- if originGroup.OriginType != nil {
- _ = d.Set("origin_type", originGroup.OriginType)
- }
-
- if originGroup.ZoneName != nil {
- _ = d.Set("zone_name", originGroup.ZoneName)
+ _ = d.Set("origin_records", originRecordsList)
}
if originGroup.UpdateTime != nil {
@@ -364,7 +347,6 @@ func resourceTencentCloudTeoOriginGroupUpdate(d *schema.ResourceData, meta inter
defer inconsistentCheck(d, meta)()
logId := getLogId(contextNil)
-
request := teo.NewModifyOriginGroupRequest()
idSplit := strings.Split(d.Id(), FILED_SP)
@@ -372,31 +354,45 @@ func resourceTencentCloudTeoOriginGroupUpdate(d *schema.ResourceData, meta inter
return fmt.Errorf("id is broken,%s", d.Id())
}
zoneId := idSplit[0]
- originId := idSplit[1]
+ originGroupId := idSplit[1]
request.ZoneId = &zoneId
- request.OriginId = &originId
+ request.OriginGroupId = &originGroupId
+
+ if d.HasChange("zone_id") {
+ return fmt.Errorf("`zone_id` do not support change now.")
+ }
- if v, ok := d.GetOk("origin_name"); ok {
- request.OriginName = helper.String(v.(string))
+ if d.HasChange("origin_group_id") {
+ return fmt.Errorf("`origin_group_id` do not support change now.")
}
- if v, ok := d.GetOk("type"); ok {
- request.Type = helper.String(v.(string))
+ if v, ok := d.GetOk("origin_group_name"); ok {
+ request.OriginGroupName = helper.String(v.(string))
}
if v, ok := d.GetOk("origin_type"); ok {
request.OriginType = helper.String(v.(string))
}
- if d.HasChange("record") {
- if v, ok := d.GetOk("record"); ok {
+ if v, ok := d.GetOk("configuration_type"); ok {
+ request.ConfigurationType = helper.String(v.(string))
+ }
+
+ if d.HasChange("origin_records") {
+ if v, ok := d.GetOk("origin_records"); ok {
for _, item := range v.([]interface{}) {
dMap := item.(map[string]interface{})
originRecord := teo.OriginRecord{}
if v, ok := dMap["record"]; ok {
originRecord.Record = helper.String(v.(string))
}
+ if v, ok := dMap["port"]; ok {
+ originRecord.Port = helper.IntUint64(v.(int))
+ }
+ if v, ok := dMap["weight"]; ok {
+ originRecord.Weight = helper.IntUint64(v.(int))
+ }
if v, ok := dMap["area"]; ok {
areaSet := v.(*schema.Set).List()
for i := range areaSet {
@@ -404,40 +400,27 @@ func resourceTencentCloudTeoOriginGroupUpdate(d *schema.ResourceData, meta inter
originRecord.Area = append(originRecord.Area, &area)
}
}
- if v, ok := dMap["weight"]; ok {
- originRecord.Weight = helper.IntUint64(v.(int))
- }
- if v, ok := dMap["port"]; ok {
- originRecord.Port = helper.IntUint64(v.(int))
- }
if v, ok := dMap["private"]; ok {
originRecord.Private = helper.Bool(v.(bool))
}
if v, ok := dMap["private_parameter"]; ok {
for _, item := range v.([]interface{}) {
PrivateParameterMap := item.(map[string]interface{})
- originRecordPrivateParameter := teo.OriginRecordPrivateParameter{}
+ originRecordPrivateParameter := teo.PrivateParameter{}
if v, ok := PrivateParameterMap["name"]; ok {
originRecordPrivateParameter.Name = helper.String(v.(string))
}
if v, ok := PrivateParameterMap["value"]; ok {
originRecordPrivateParameter.Value = helper.String(v.(string))
}
- originRecord.PrivateParameter = append(originRecord.PrivateParameter, &originRecordPrivateParameter)
+ originRecord.PrivateParameters = append(originRecord.PrivateParameters, &originRecordPrivateParameter)
}
}
-
- request.Record = append(request.Record, &originRecord)
+ request.OriginRecords = append(request.OriginRecords, &originRecord)
}
}
}
- if d.HasChange("zone_id") {
- if v, ok := d.GetOk("zone_id"); ok {
- request.ZoneId = helper.String(v.(string))
- }
- }
-
err := resource.Retry(writeRetryTimeout, func() *resource.RetryError {
result, e := meta.(*TencentCloudClient).apiV3Conn.UseTeoClient().ModifyOriginGroup(request)
if e != nil {
@@ -450,6 +433,7 @@ func resourceTencentCloudTeoOriginGroupUpdate(d *schema.ResourceData, meta inter
})
if err != nil {
+ log.Printf("[CRITAL]%s create teo originGroup failed, reason:%+v", logId, err)
return err
}
@@ -470,9 +454,9 @@ func resourceTencentCloudTeoOriginGroupDelete(d *schema.ResourceData, meta inter
return fmt.Errorf("id is broken,%s", d.Id())
}
zoneId := idSplit[0]
- originId := idSplit[1]
+ originGroupId := idSplit[1]
- if err := service.DeleteTeoOriginGroupById(ctx, zoneId, originId); err != nil {
+ if err := service.DeleteTeoOriginGroupById(ctx, zoneId, originGroupId); err != nil {
return err
}
diff --git a/tencentcloud/resource_tc_teo_rule_engine.go b/tencentcloud/resource_tc_teo_rule_engine.go
index 6de283d8d4..c20ead01e0 100644
--- a/tencentcloud/resource_tc_teo_rule_engine.go
+++ b/tencentcloud/resource_tc_teo_rule_engine.go
@@ -1,39 +1,71 @@
/*
-Provides a resource to create a teo ruleEngine
+Provides a resource to create a teo rule_engine
Example Usage
```hcl
-resource "tencentcloud_teo_rule_engine" "rule_engine" {
- zone_id = tencentcloud_teo_zone.zone.id
- rule_name = "rule0"
- status = "enable"
+resource "tencentcloud_teo_rule_engine" "rule1" {
+ zone_id = tencentcloud_teo_zone.example.id
+ rule_name = "test-rule"
+ status = "disable"
rules {
- conditions {
- conditions {
+ or {
+ and {
operator = "equal"
target = "host"
values = [
- "www.sfurnace.work",
+ tencentcloud_teo_dns_record.example.name,
+ ]
+ }
+ and {
+ operator = "equal"
+ target = "extension"
+ values = [
+ "mp4",
]
}
}
actions {
normal_action {
- action = "MaxAge"
+ action = "CachePrefresh"
parameters {
- name = "FollowOrigin"
+ name = "Switch"
values = [
"on",
]
}
parameters {
- name = "MaxAgeTime"
+ name = "Percent"
values = [
- "0",
+ "80",
+ ]
+ }
+ }
+ }
+
+ actions {
+ normal_action {
+ action = "CacheKey"
+
+ parameters {
+ name = "Type"
+ values = [
+ "Header",
+ ]
+ }
+ parameters {
+ name = "Switch"
+ values = [
+ "on",
+ ]
+ }
+ parameters {
+ name = "Value"
+ values = [
+ "Duck",
]
}
}
@@ -44,9 +76,9 @@ resource "tencentcloud_teo_rule_engine" "rule_engine" {
```
Import
-teo ruleEngine can be imported using the id, e.g.
+teo rule_engine can be imported using the id#rule_id, e.g.
```
-$ terraform import tencentcloud_teo_rule_engine.rule_engine zoneId#ruleId
+$ terraform import tencentcloud_teo_rule_engine.rule_engine zone-297z8rf93cfw#rule-ajol584a
```
*/
package tencentcloud
@@ -56,10 +88,11 @@ import (
"fmt"
"log"
"strings"
+ "time"
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
- teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220106"
+ teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901"
"github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"
)
@@ -79,9 +112,15 @@ func resourceTencentCloudTeoRuleEngine() *schema.Resource {
Description: "Site ID.",
},
+ "rule_id": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Rule ID.",
+ },
+
"rule_name": {
Type: schema.TypeString,
- Optional: true,
+ Required: true,
Description: "Rule name.",
},
@@ -97,13 +136,13 @@ func resourceTencentCloudTeoRuleEngine() *schema.Resource {
Description: "Rule items list.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
- "conditions": {
+ "or": {
Type: schema.TypeList,
Required: true,
Description: "OR Conditions list of the rule. Rule would be triggered if any of the condition is true.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
- "conditions": {
+ "and": {
Type: schema.TypeList,
Required: true,
Description: "AND Conditions list of the rule. Rule would be triggered if all conditions are true.",
@@ -117,7 +156,7 @@ func resourceTencentCloudTeoRuleEngine() *schema.Resource {
"target": {
Type: schema.TypeString,
Required: true,
- Description: "Condition target. Valid values:- host: Host of the URL.- filename: filename of the URL.- extension: file extension of the URL.- full_url: full url.- url: path of the URL.",
+ Description: "Condition target. Valid values:- `host`: Host of the URL.- `filename`: filename of the URL.- `extension`: file extension of the URL.- `full_url`: full url.- `url`: path of the URL.",
},
"values": {
Type: schema.TypeSet,
@@ -197,7 +236,7 @@ func resourceTencentCloudTeoRuleEngine() *schema.Resource {
"action": {
Type: schema.TypeString,
Required: true,
- Description: "Action to take on the HEADER.",
+ Description: "Action to take on the HEADER. Valid values: `add`, `del`, `set`.",
},
"name": {
Type: schema.TypeString,
@@ -266,12 +305,6 @@ func resourceTencentCloudTeoRuleEngine() *schema.Resource {
},
},
},
-
- "rule_id": {
- Type: schema.TypeString,
- Computed: true,
- Description: "Rule ID.",
- },
},
}
}
@@ -305,12 +338,12 @@ func resourceTencentCloudTeoRuleEngineCreate(d *schema.ResourceData, meta interf
if v, ok := d.GetOk("rules"); ok {
for _, item := range v.([]interface{}) {
dMap := item.(map[string]interface{})
- ruleItem := teo.RuleItem{}
- if v, ok := dMap["conditions"]; ok {
+ ruleItem := teo.Rule{}
+ if v, ok := dMap["or"]; ok {
for _, item := range v.([]interface{}) {
ConditionsMap := item.(map[string]interface{})
ruleAndConditions := teo.RuleAndConditions{}
- if v, ok := ConditionsMap["conditions"]; ok {
+ if v, ok := ConditionsMap["and"]; ok {
for _, item := range v.([]interface{}) {
ConditionsMap := item.(map[string]interface{})
ruleCondition := teo.RuleCondition{}
@@ -336,9 +369,9 @@ func resourceTencentCloudTeoRuleEngineCreate(d *schema.ResourceData, meta interf
if v, ok := dMap["actions"]; ok {
for _, item := range v.([]interface{}) {
ActionsMap := item.(map[string]interface{})
- ruleAction := teo.RuleAction{}
+ ruleAction := teo.Action{}
if NormalActionMap, ok := helper.InterfaceToMap(ActionsMap, "normal_action"); ok {
- ruleNormalAction := teo.RuleNormalAction{}
+ ruleNormalAction := teo.NormalAction{}
if v, ok := NormalActionMap["action"]; ok {
ruleNormalAction.Action = helper.String(v.(string))
}
@@ -362,7 +395,7 @@ func resourceTencentCloudTeoRuleEngineCreate(d *schema.ResourceData, meta interf
ruleAction.NormalAction = &ruleNormalAction
}
if RewriteActionMap, ok := helper.InterfaceToMap(ActionsMap, "rewrite_action"); ok {
- ruleRewriteAction := teo.RuleRewriteAction{}
+ ruleRewriteAction := teo.RewriteAction{}
if v, ok := RewriteActionMap["action"]; ok {
ruleRewriteAction.Action = helper.String(v.(string))
}
@@ -389,7 +422,7 @@ func resourceTencentCloudTeoRuleEngineCreate(d *schema.ResourceData, meta interf
ruleAction.RewriteAction = &ruleRewriteAction
}
if CodeActionMap, ok := helper.InterfaceToMap(ActionsMap, "code_action"); ok {
- ruleCodeAction := teo.RuleCodeAction{}
+ ruleCodeAction := teo.CodeAction{}
if v, ok := CodeActionMap["action"]; ok {
ruleCodeAction.Action = helper.String(v.(string))
}
@@ -473,6 +506,9 @@ func resourceTencentCloudTeoRuleEngineRead(d *schema.ResourceData, meta interfac
return fmt.Errorf("resource `ruleEngine` %s does not exist", ruleId)
}
+ _ = d.Set("zone_id", zoneId)
+ _ = d.Set("rule_id", ruleId)
+
if ruleEngine.RuleName != nil {
_ = d.Set("rule_name", ruleEngine.RuleName)
}
@@ -505,12 +541,12 @@ func resourceTencentCloudTeoRuleEngineRead(d *schema.ResourceData, meta interfac
conditionsList = append(conditionsList, conditionsMap)
}
- conditionsMap["conditions"] = conditionsList
+ conditionsMap["and"] = conditionsList
}
conditionsList = append(conditionsList, conditionsMap)
}
- rulesMap["conditions"] = conditionsList
+ rulesMap["or"] = conditionsList
}
if rules.Actions != nil {
actionsList := []interface{}{}
@@ -602,10 +638,6 @@ func resourceTencentCloudTeoRuleEngineRead(d *schema.ResourceData, meta interfac
_ = d.Set("rules", rulesList)
}
- if ruleEngine.RuleId != nil {
- _ = d.Set("rule_id", ruleEngine.RuleId)
- }
-
return nil
}
@@ -614,7 +646,6 @@ func resourceTencentCloudTeoRuleEngineUpdate(d *schema.ResourceData, meta interf
defer inconsistentCheck(d, meta)()
logId := getLogId(contextNil)
-
request := teo.NewModifyRuleRequest()
idSplit := strings.Split(d.Id(), FILED_SP)
@@ -626,130 +657,140 @@ func resourceTencentCloudTeoRuleEngineUpdate(d *schema.ResourceData, meta interf
request.ZoneId = &zoneId
request.RuleId = &ruleId
+
+ if d.HasChange("zone_id") {
+
+ return fmt.Errorf("`zone_id` do not support change now.")
+
+ }
+
if v, ok := d.GetOk("rule_name"); ok {
request.RuleName = helper.String(v.(string))
}
+
if v, ok := d.GetOk("status"); ok {
request.Status = helper.String(v.(string))
}
- if v, ok := d.GetOk("rules"); ok {
- for _, item := range v.([]interface{}) {
- dMap := item.(map[string]interface{})
- ruleItem := teo.RuleItem{}
- if v, ok := dMap["conditions"]; ok {
- for _, item := range v.([]interface{}) {
- ConditionsMap := item.(map[string]interface{})
- ruleAndConditions := teo.RuleAndConditions{}
- if v, ok := ConditionsMap["conditions"]; ok {
- for _, item := range v.([]interface{}) {
- ConditionsMap := item.(map[string]interface{})
- ruleCondition := teo.RuleCondition{}
- if v, ok := ConditionsMap["operator"]; ok {
- ruleCondition.Operator = helper.String(v.(string))
- }
- if v, ok := ConditionsMap["target"]; ok {
- ruleCondition.Target = helper.String(v.(string))
- }
- if v, ok := ConditionsMap["values"]; ok {
- valuesSet := v.(*schema.Set).List()
- for i := range valuesSet {
- values := valuesSet[i].(string)
- ruleCondition.Values = append(ruleCondition.Values, &values)
- }
- }
- ruleAndConditions.Conditions = append(ruleAndConditions.Conditions, &ruleCondition)
- }
- }
- ruleItem.Conditions = append(ruleItem.Conditions, &ruleAndConditions)
- }
- }
- if v, ok := dMap["actions"]; ok {
- for _, item := range v.([]interface{}) {
- ActionsMap := item.(map[string]interface{})
- ruleAction := teo.RuleAction{}
- if NormalActionMap, ok := helper.InterfaceToMap(ActionsMap, "normal_action"); ok {
- ruleNormalAction := teo.RuleNormalAction{}
- if v, ok := NormalActionMap["action"]; ok {
- ruleNormalAction.Action = helper.String(v.(string))
- }
- if v, ok := NormalActionMap["parameters"]; ok {
+
+ if d.HasChange("rules") {
+ if v, ok := d.GetOk("rules"); ok {
+ for _, item := range v.([]interface{}) {
+ dMap := item.(map[string]interface{})
+ ruleItem := teo.Rule{}
+ if v, ok := dMap["or"]; ok {
+ for _, item := range v.([]interface{}) {
+ ConditionsMap := item.(map[string]interface{})
+ ruleAndConditions := teo.RuleAndConditions{}
+ if v, ok := ConditionsMap["and"]; ok {
for _, item := range v.([]interface{}) {
- ParametersMap := item.(map[string]interface{})
- ruleNormalActionParams := teo.RuleNormalActionParams{}
- if v, ok := ParametersMap["name"]; ok {
- ruleNormalActionParams.Name = helper.String(v.(string))
+ ConditionsMap := item.(map[string]interface{})
+ ruleCondition := teo.RuleCondition{}
+ if v, ok := ConditionsMap["operator"]; ok {
+ ruleCondition.Operator = helper.String(v.(string))
}
- if v, ok := ParametersMap["values"]; ok {
+ if v, ok := ConditionsMap["target"]; ok {
+ ruleCondition.Target = helper.String(v.(string))
+ }
+ if v, ok := ConditionsMap["values"]; ok {
valuesSet := v.(*schema.Set).List()
for i := range valuesSet {
values := valuesSet[i].(string)
- ruleNormalActionParams.Values = append(ruleNormalActionParams.Values, &values)
+ ruleCondition.Values = append(ruleCondition.Values, &values)
}
}
- ruleNormalAction.Parameters = append(ruleNormalAction.Parameters, &ruleNormalActionParams)
+ ruleAndConditions.Conditions = append(ruleAndConditions.Conditions, &ruleCondition)
}
}
- ruleAction.NormalAction = &ruleNormalAction
+ ruleItem.Conditions = append(ruleItem.Conditions, &ruleAndConditions)
}
- if RewriteActionMap, ok := helper.InterfaceToMap(ActionsMap, "rewrite_action"); ok {
- ruleRewriteAction := teo.RuleRewriteAction{}
- if v, ok := RewriteActionMap["action"]; ok {
- ruleRewriteAction.Action = helper.String(v.(string))
- }
- if v, ok := RewriteActionMap["parameters"]; ok {
- for _, item := range v.([]interface{}) {
- ParametersMap := item.(map[string]interface{})
- ruleRewriteActionParams := teo.RuleRewriteActionParams{}
- if v, ok := ParametersMap["action"]; ok {
- ruleRewriteActionParams.Action = helper.String(v.(string))
- }
- if v, ok := ParametersMap["name"]; ok {
- ruleRewriteActionParams.Name = helper.String(v.(string))
- }
- if v, ok := ParametersMap["values"]; ok {
- valuesSet := v.(*schema.Set).List()
- for i := range valuesSet {
- values := valuesSet[i].(string)
- ruleRewriteActionParams.Values = append(ruleRewriteActionParams.Values, &values)
+ }
+ if v, ok := dMap["actions"]; ok {
+ for _, item := range v.([]interface{}) {
+ ActionsMap := item.(map[string]interface{})
+ ruleAction := teo.Action{}
+ if NormalActionMap, ok := helper.InterfaceToMap(ActionsMap, "normal_action"); ok {
+ ruleNormalAction := teo.NormalAction{}
+ if v, ok := NormalActionMap["action"]; ok {
+ ruleNormalAction.Action = helper.String(v.(string))
+ }
+ if v, ok := NormalActionMap["parameters"]; ok {
+ for _, item := range v.([]interface{}) {
+ ParametersMap := item.(map[string]interface{})
+ ruleNormalActionParams := teo.RuleNormalActionParams{}
+ if v, ok := ParametersMap["name"]; ok {
+ ruleNormalActionParams.Name = helper.String(v.(string))
}
+ if v, ok := ParametersMap["values"]; ok {
+ valuesSet := v.(*schema.Set).List()
+ for i := range valuesSet {
+ values := valuesSet[i].(string)
+ ruleNormalActionParams.Values = append(ruleNormalActionParams.Values, &values)
+ }
+ }
+ ruleNormalAction.Parameters = append(ruleNormalAction.Parameters, &ruleNormalActionParams)
}
- ruleRewriteAction.Parameters = append(ruleRewriteAction.Parameters, &ruleRewriteActionParams)
}
+ ruleAction.NormalAction = &ruleNormalAction
}
- ruleAction.RewriteAction = &ruleRewriteAction
- }
- if CodeActionMap, ok := helper.InterfaceToMap(ActionsMap, "code_action"); ok {
- ruleCodeAction := teo.RuleCodeAction{}
- if v, ok := CodeActionMap["action"]; ok {
- ruleCodeAction.Action = helper.String(v.(string))
- }
- if v, ok := CodeActionMap["parameters"]; ok {
- for _, item := range v.([]interface{}) {
- ParametersMap := item.(map[string]interface{})
- ruleCodeActionParams := teo.RuleCodeActionParams{}
- if v, ok := ParametersMap["name"]; ok {
- ruleCodeActionParams.Name = helper.String(v.(string))
- }
- if v, ok := ParametersMap["values"]; ok {
- valuesSet := v.(*schema.Set).List()
- for i := range valuesSet {
- values := valuesSet[i].(string)
- ruleCodeActionParams.Values = append(ruleCodeActionParams.Values, &values)
+ if RewriteActionMap, ok := helper.InterfaceToMap(ActionsMap, "rewrite_action"); ok {
+ ruleRewriteAction := teo.RewriteAction{}
+ if v, ok := RewriteActionMap["action"]; ok {
+ ruleRewriteAction.Action = helper.String(v.(string))
+ }
+ if v, ok := RewriteActionMap["parameters"]; ok {
+ for _, item := range v.([]interface{}) {
+ ParametersMap := item.(map[string]interface{})
+ ruleRewriteActionParams := teo.RuleRewriteActionParams{}
+ if v, ok := ParametersMap["action"]; ok {
+ ruleRewriteActionParams.Action = helper.String(v.(string))
+ }
+ if v, ok := ParametersMap["name"]; ok {
+ ruleRewriteActionParams.Name = helper.String(v.(string))
}
+ if v, ok := ParametersMap["values"]; ok {
+ valuesSet := v.(*schema.Set).List()
+ for i := range valuesSet {
+ values := valuesSet[i].(string)
+ ruleRewriteActionParams.Values = append(ruleRewriteActionParams.Values, &values)
+ }
+ }
+ ruleRewriteAction.Parameters = append(ruleRewriteAction.Parameters, &ruleRewriteActionParams)
}
- if v, ok := ParametersMap["status_code"]; ok {
- ruleCodeActionParams.StatusCode = helper.IntInt64(v.(int))
+ }
+ ruleAction.RewriteAction = &ruleRewriteAction
+ }
+ if CodeActionMap, ok := helper.InterfaceToMap(ActionsMap, "code_action"); ok {
+ ruleCodeAction := teo.CodeAction{}
+ if v, ok := CodeActionMap["action"]; ok {
+ ruleCodeAction.Action = helper.String(v.(string))
+ }
+ if v, ok := CodeActionMap["parameters"]; ok {
+ for _, item := range v.([]interface{}) {
+ ParametersMap := item.(map[string]interface{})
+ ruleCodeActionParams := teo.RuleCodeActionParams{}
+ if v, ok := ParametersMap["name"]; ok {
+ ruleCodeActionParams.Name = helper.String(v.(string))
+ }
+ if v, ok := ParametersMap["values"]; ok {
+ valuesSet := v.(*schema.Set).List()
+ for i := range valuesSet {
+ values := valuesSet[i].(string)
+ ruleCodeActionParams.Values = append(ruleCodeActionParams.Values, &values)
+ }
+ }
+ if v, ok := ParametersMap["status_code"]; ok {
+ ruleCodeActionParams.StatusCode = helper.IntInt64(v.(int))
+ }
+ ruleCodeAction.Parameters = append(ruleCodeAction.Parameters, &ruleCodeActionParams)
}
- ruleCodeAction.Parameters = append(ruleCodeAction.Parameters, &ruleCodeActionParams)
}
+ ruleAction.CodeAction = &ruleCodeAction
}
- ruleAction.CodeAction = &ruleCodeAction
+ ruleItem.Actions = append(ruleItem.Actions, &ruleAction)
}
- ruleItem.Actions = append(ruleItem.Actions, &ruleAction)
}
+ request.Rules = append(request.Rules, &ruleItem)
}
-
- request.Rules = append(request.Rules, &ruleItem)
}
}
@@ -765,6 +806,7 @@ func resourceTencentCloudTeoRuleEngineUpdate(d *schema.ResourceData, meta interf
})
if err != nil {
+ log.Printf("[CRITAL]%s create teo ruleEngine failed, reason:%+v", logId, err)
return err
}
@@ -787,9 +829,16 @@ func resourceTencentCloudTeoRuleEngineDelete(d *schema.ResourceData, meta interf
zoneId := idSplit[0]
ruleId := idSplit[1]
- if err := service.DeleteTeoRuleEngineById(ctx, zoneId, ruleId); err != nil {
+ err := resource.Retry(5*time.Second, func() *resource.RetryError {
+ if e := service.DeleteTeoRuleEngineById(ctx, zoneId, ruleId); e != nil {
+ return retryError(e, "InternalError")
+ }
+ return nil
+ })
+
+ if err != nil {
+ log.Printf("[CRITAL]%s delete teo ruleEngine failed, reason:%+v", logId, err)
return err
}
-
return nil
}
diff --git a/tencentcloud/resource_tc_teo_rule_engine_priority.go b/tencentcloud/resource_tc_teo_rule_engine_priority.go
new file mode 100644
index 0000000000..3e19132349
--- /dev/null
+++ b/tencentcloud/resource_tc_teo_rule_engine_priority.go
@@ -0,0 +1,201 @@
+/*
+Provides a resource to create a teo rule_engine_priority
+
+Example Usage
+
+```hcl
+resource "tencentcloud_teo_rule_engine_priority" "rule_engine_priority" {
+ zone_id = "zone-294v965lwmn6"
+
+ rules_priority {
+ index = 0
+ value = "rule-m9jlttua"
+ }
+ rules_priority {
+ index = 1
+ value = "rule-m5l9t4k1"
+ }
+}
+
+```
+Import
+
+teo rule_engine_priority can be imported using the zone_id, e.g.
+```
+$ terraform import tencentcloud_teo_rule_engine_priority.rule_engine_priority zone-294v965lwmn6
+```
+*/
+package tencentcloud
+
+import (
+ "context"
+ "fmt"
+ "log"
+
+ "github.com/hashicorp/terraform-plugin-sdk/helper/resource"
+ "github.com/hashicorp/terraform-plugin-sdk/helper/schema"
+ teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901"
+)
+
+func resourceTencentCloudTeoRuleEnginePriority() *schema.Resource {
+ return &schema.Resource{
+ Read: resourceTencentCloudTeoRuleEnginePriorityRead,
+ Create: resourceTencentCloudTeoRuleEnginePriorityCreate,
+ Update: resourceTencentCloudTeoRuleEnginePriorityUpdate,
+ Delete: resourceTencentCloudTeoRuleEnginePriorityDelete,
+ Importer: &schema.ResourceImporter{
+ State: schema.ImportStatePassthrough,
+ },
+ Schema: map[string]*schema.Schema{
+ "zone_id": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "Site ID.",
+ },
+
+ "rules_priority": {
+ Type: schema.TypeList,
+ Optional: true,
+ Computed: true,
+ Description: "Priority of rules.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "index": {
+ Type: schema.TypeInt,
+ Optional: true,
+ Computed: true,
+ Description: "Priority order of rules.",
+ },
+ "value": {
+ Type: schema.TypeString,
+ Optional: true,
+ Computed: true,
+ Description: "Priority of rules id.",
+ },
+ },
+ },
+ },
+ },
+ }
+}
+
+func resourceTencentCloudTeoRuleEnginePriorityCreate(d *schema.ResourceData, meta interface{}) error {
+ defer logElapsed("resource.tencentcloud_teo_rule_engine_priority.create")()
+ defer inconsistentCheck(d, meta)()
+
+ logId := getLogId(contextNil)
+
+ var zoneId string
+ if v, ok := d.GetOk("zone_id"); ok {
+ zoneId = v.(string)
+ }
+
+ d.SetId(zoneId)
+ err := resourceTencentCloudTeoRuleEnginePriorityUpdate(d, meta)
+ if err != nil {
+ log.Printf("[CRITAL]%s create teo ruleEnginePriority failed, reason:%+v", logId, err)
+ return err
+ }
+
+ return resourceTencentCloudTeoRuleEnginePriorityRead(d, meta)
+}
+
+func resourceTencentCloudTeoRuleEnginePriorityRead(d *schema.ResourceData, meta interface{}) error {
+ defer logElapsed("resource.tencentcloud_teo_rule_engine_priority.read")()
+ defer inconsistentCheck(d, meta)()
+
+ logId := getLogId(contextNil)
+ ctx := context.WithValue(context.TODO(), logIdKey, logId)
+
+ service := TeoService{client: meta.(*TencentCloudClient).apiV3Conn}
+
+ zoneId := d.Id()
+
+ ruleEnginePriority, err := service.DescribeTeoRuleEnginePriority(ctx, zoneId)
+
+ if err != nil {
+ return err
+ }
+
+ if ruleEnginePriority == nil {
+ d.SetId("")
+ return fmt.Errorf("resource `ruleEnginePriority` %s does not exist", zoneId)
+ }
+
+ _ = d.Set("zone_id", zoneId)
+
+ if ruleEnginePriority != nil {
+ ruleEnginePriorityList := []interface{}{}
+ for i, v := range ruleEnginePriority {
+ ruleId := map[string]interface{}{}
+ ruleId["index"] = i
+ ruleId["value"] = v.RuleId
+ ruleEnginePriorityList = append(ruleEnginePriorityList, ruleId)
+ }
+ _ = d.Set("rules_priority", ruleEnginePriorityList)
+ }
+
+ return nil
+}
+
+func resourceTencentCloudTeoRuleEnginePriorityUpdate(d *schema.ResourceData, meta interface{}) error {
+ defer logElapsed("resource.tencentcloud_teo_rule_engine_priority.update")()
+ defer inconsistentCheck(d, meta)()
+
+ logId := getLogId(contextNil)
+ request := teo.NewModifyRulePriorityRequest()
+ zoneId := d.Id()
+ request.ZoneId = &zoneId
+
+ if d.HasChange("rules_priority") {
+ if v, ok := d.GetOk("rules_priority"); ok {
+ l := len(v.([]interface{}))
+ ruleIds := make([]*string, l)
+ for _, item := range v.([]interface{}) {
+ rule := item.(map[string]interface{})
+ var index int
+ var value string
+ if vv, ok := rule["index"]; ok {
+ index = vv.(int)
+ if index > l {
+ return fmt.Errorf("index is not continuous")
+ }
+ }
+ if vv, ok := rule["value"]; ok {
+ value = vv.(string)
+ }
+ if ruleIds[index] == nil {
+ ruleIds[index] = &value
+ } else {
+ return fmt.Errorf("`index` [%v] is not repeatable", index)
+ }
+ }
+ request.RuleIds = append(request.RuleIds, ruleIds...)
+ }
+ }
+
+ err := resource.Retry(writeRetryTimeout, func() *resource.RetryError {
+ result, e := meta.(*TencentCloudClient).apiV3Conn.UseTeoClient().ModifyRulePriority(request)
+ if e != nil {
+ return 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 teo ruleEnginePriority failed, reason:%+v", logId, err)
+ return err
+ }
+
+ return resourceTencentCloudTeoRuleEnginePriorityRead(d, meta)
+}
+
+func resourceTencentCloudTeoRuleEnginePriorityDelete(d *schema.ResourceData, meta interface{}) error {
+ defer logElapsed("resource.tencentcloud_teo_rule_engine_priority.delete")()
+ defer inconsistentCheck(d, meta)()
+
+ return nil
+}
diff --git a/tencentcloud/resource_tc_teo_rule_engine_priority_test.go b/tencentcloud/resource_tc_teo_rule_engine_priority_test.go
new file mode 100644
index 0000000000..e160b02123
--- /dev/null
+++ b/tencentcloud/resource_tc_teo_rule_engine_priority_test.go
@@ -0,0 +1,37 @@
+package tencentcloud
+
+import (
+ "testing"
+
+ "github.com/hashicorp/terraform-plugin-sdk/helper/resource"
+)
+
+func TestAccTencentCloudTeoRuleEnginePriority_basic(t *testing.T) {
+ t.Parallel()
+
+ resource.Test(t, resource.TestCase{
+ PreCheck: func() { testAccPreCheck(t) },
+ Providers: testAccProviders,
+ Steps: []resource.TestStep{
+ {
+ Config: testAccTeoRuleEnginePriority,
+ Check: resource.ComposeTestCheckFunc(
+ resource.TestCheckResourceAttrSet("tencentcloud_teo_rule_engine_priority.rule_engine_priority", "id"),
+ ),
+ },
+ {
+ ResourceName: "tencentcloud_teo_rule_engine_priority.ruleEnginePriority",
+ ImportState: true,
+ ImportStateVerify: true,
+ },
+ },
+ })
+}
+
+const testAccTeoRuleEnginePriority = `
+
+resource "tencentcloud_teo_rule_engine_priority" "rule_engine_priority" {
+ rules_priority = ""
+}
+
+`
diff --git a/tencentcloud/resource_tc_teo_security_policy.go b/tencentcloud/resource_tc_teo_security_policy.go
index c4ac609be2..ad85f8addc 100644
--- a/tencentcloud/resource_tc_teo_security_policy.go
+++ b/tencentcloud/resource_tc_teo_security_policy.go
@@ -1,137 +1,167 @@
/*
-Provides a resource to create a teo securityPolicy
+Provides a resource to create a teo security_policy
Example Usage
```hcl
-resource "tencentcloud_teo_security_policy" "securityPolicy" {
- zone_id = ""
- entity = ""
+resource "tencentcloud_teo_security_policy" "security_policy" {
+ entity = "aaa.sfurnace.work"
+ zone_id = "zone-2983wizgxqvm"
+
config {
- waf_config {
- switch = ""
- level = ""
- mode = ""
- waf_rules {
- switch = ""
- block_rule_ids = ""
- observe_rule_ids = ""
- }
- ai_rule {
- mode = ""
- }
+ acl_config {
+ switch = "off"
}
- rate_limit_config {
- switch = ""
- user_rules {
- rule_name = ""
- threshold = ""
- period = ""
- action = ""
- punish_time = ""
- punish_time_unit = ""
- rule_status = ""
- freq_fields = ""
- conditions {
- match_from = ""
- match_param = ""
- operator = ""
- match_content = ""
+
+ bot_config {
+ switch = "off"
+
+ intelligence_rule {
+ switch = "off"
+
+ items {
+ action = "drop"
+ label = "evil_bot"
}
- rule_priority = ""
- }
- template {
- mode = ""
- detail {
- mode = ""
- id = ""
- action = ""
- punish_time = ""
- threshold = ""
- period = ""
+ items {
+ action = "alg"
+ label = "suspect_bot"
}
- }
- intelligence {
- switch = ""
- action = ""
- }
- }
- acl_config {
- switch = ""
- user_rules {
- rule_name = ""
- action = ""
- rule_status = ""
- conditions {
- match_from = ""
- match_param = ""
- operator = ""
- match_content = ""
+ items {
+ action = "monitor"
+ label = "good_bot"
+ }
+ items {
+ action = "trans"
+ label = "normal"
}
- rule_priority = ""
- punish_time = ""
- punish_time_unit = ""
- name = ""
- page_id = ""
- redirect_url = ""
- response_code = ""
}
- }
- bot_config {
- switch = ""
+
managed_rule {
- rule_id = ""
- action = ""
- punish_time = ""
- punish_time_unit = ""
- name = ""
- page_id = ""
- redirect_url = ""
- response_code = ""
- trans_managed_ids = ""
- alg_managed_ids = ""
- cap_managed_ids = ""
- mon_managed_ids = ""
- drop_managed_ids = ""
+ action = "monitor"
+ alg_managed_ids = []
+ cap_managed_ids = []
+ drop_managed_ids = []
+ mon_managed_ids = []
+ page_id = 0
+ punish_time = 0
+ response_code = 0
+ rule_id = 0
+ trans_managed_ids = []
}
+
portrait_rule {
- rule_id = ""
- alg_managed_ids = ""
- cap_managed_ids = ""
- mon_managed_ids = ""
- drop_managed_ids = ""
- switch = ""
+ alg_managed_ids = []
+ cap_managed_ids = []
+ drop_managed_ids = []
+ mon_managed_ids = []
+ rule_id = -1
+ switch = "off"
}
- intelligence_rule {
- switch = ""
- items {
- label = ""
- action = ""
- }
+ }
+
+ drop_page_config {
+ switch = "on"
+
+ acl_drop_page_detail {
+ name = "-"
+ page_id = 0
+ status_code = 569
+ type = "default"
+ }
+
+ waf_drop_page_detail {
+ name = "-"
+ page_id = 0
+ status_code = 566
+ type = "default"
}
}
- switch_config {
- web_switch = ""
+
+ except_config {
+ switch = "on"
}
+
ip_table_config {
- switch = ""
- rules {
- action = ""
- match_from = ""
- match_content = ""
- rule_id = ""
+ switch = "off"
+ }
+
+ rate_limit_config {
+ switch = "on"
+
+ intelligence {
+ action = "monitor"
+ switch = "off"
}
+
+ template {
+ mode = "sup_loose"
+
+ detail {
+ action = "alg"
+ id = 831807989
+ mode = "sup_loose"
+ period = 1
+ punish_time = 0
+ threshold = 2000
+ }
+ }
+ }
+
+ switch_config {
+ web_switch = "on"
}
+ waf_config {
+ level = "strict"
+ mode = "block"
+ switch = "on"
+
+ ai_rule {
+ mode = "smart_status_close"
+ }
+
+ waf_rules {
+ block_rule_ids = [
+ 22,
+ 84214562,
+ 106246133,
+ 106246507,
+ 106246508,
+ 106246523,
+ 106246524,
+ 106246679,
+ 106247029,
+ 106247048,
+ 106247140,
+ 106247356,
+ 106247357,
+ 106247358,
+ 106247378,
+ 106247389,
+ 106247392,
+ 106247394,
+ 106247405,
+ 106247409,
+ 106247413,
+ 106247558,
+ 106247795,
+ 106247819,
+ 106248021,
+ ]
+ observe_rule_ids = []
+ switch = "off"
+ }
+ }
}
}
```
Import
-teo securityPolicy can be imported using the id, e.g.
+teo security_policy can be imported using the zoneId#entity, e.g.
```
-$ terraform import tencentcloud_teo_security_policy.securityPolicy securityPolicy_id#entity
+$ terraform import tencentcloud_teo_security_policy.security_policy zone-2983wizgxqvm#aaa.sfurnace.work
```
*/
package tencentcloud
@@ -144,7 +174,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
- teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220106"
+ teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901"
"github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"
)
@@ -173,7 +203,8 @@ func resourceTencentCloudTeoSecurityPolicy() *schema.Resource {
"config": {
Type: schema.TypeList,
MaxItems: 1,
- Required: true,
+ Optional: true,
+ Computed: true,
Description: "Security policy configuration.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
@@ -188,7 +219,7 @@ func resourceTencentCloudTeoSecurityPolicy() *schema.Resource {
"switch": {
Type: schema.TypeString,
Required: true,
- Description: "Whether to enable WAF rules. Valid values:- on: Enable.- off: Disable.",
+ Description: "Whether to enable WAF rules. Valid values:- `on`: Enable.- `off`: Disable.",
},
"level": {
Type: schema.TypeString,
@@ -198,7 +229,7 @@ func resourceTencentCloudTeoSecurityPolicy() *schema.Resource {
"mode": {
Type: schema.TypeString,
Required: true,
- Description: "Protection mode. Valid values:- block: use block mode globally, you still can set a group of rules to use observe mode.- observe: use observe mode globally.",
+ Description: "Protection mode. Valid values:- `block`: use block mode globally, you still can set a group of rules to use observe mode.- `observe`: use observe mode globally.",
},
"waf_rules": {
Type: schema.TypeList,
@@ -210,7 +241,7 @@ func resourceTencentCloudTeoSecurityPolicy() *schema.Resource {
"switch": {
Type: schema.TypeString,
Required: true,
- Description: "Whether to host the rules' configuration.- on: Enable.- off: Disable.",
+ Description: "Whether to host the rules' configuration.- `on`: Enable.- `off`: Disable.",
},
"block_rule_ids": {
Type: schema.TypeSet,
@@ -244,7 +275,7 @@ func resourceTencentCloudTeoSecurityPolicy() *schema.Resource {
Type: schema.TypeString,
Optional: true,
Computed: true,
- Description: "Valid values:- smart_status_close: disabled.- smart_status_open: blocked.- smart_status_observe: observed.",
+ Description: "Valid values:- `smart_status_close`: disabled.- `smart_status_open`: blocked.- `smart_status_observe`: observed.",
},
},
},
@@ -262,12 +293,14 @@ func resourceTencentCloudTeoSecurityPolicy() *schema.Resource {
Schema: map[string]*schema.Schema{
"switch": {
Type: schema.TypeString,
- Required: true,
- Description: "- on: Enable.- off: Disable.",
+ Optional: true,
+ Computed: true,
+ Description: "- `on`: Enable.- `off`: Disable.",
},
"user_rules": {
Type: schema.TypeList,
- Required: true,
+ Optional: true,
+ Computed: true,
Description: "Custom configuration.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
@@ -304,12 +337,13 @@ func resourceTencentCloudTeoSecurityPolicy() *schema.Resource {
"punish_time_unit": {
Type: schema.TypeString,
Required: true,
- Description: "Time unit of the punish time. Valid values: `second`,`minutes`,`hour`.",
+ Description: "Time unit of the punish time. Valid values: `second`, `minutes`, `hour`.",
},
"rule_status": {
Type: schema.TypeString,
- Required: true,
- Description: "Status of the rule.",
+ Optional: true,
+ Computed: true,
+ Description: "Status of the rule. Valid values: `on`, `off`, `hour`.",
},
"freq_fields": {
Type: schema.TypeSet,
@@ -328,22 +362,22 @@ func resourceTencentCloudTeoSecurityPolicy() *schema.Resource {
"match_from": {
Type: schema.TypeString,
Required: true,
- Description: "Matching field.",
+ Description: "Items to match. Valid values:- `host`: Host of the request.- `sip`: Client IP.- `ua`: User-Agent.- `cookie`: Session cookie.- `cgi`: CGI script.- `xff`: XFF extension header.- `url`: URL of the request.- `accept`: Accept encoding of the request.- `method`: HTTP method of the request.- `header`: HTTP header of the request.- `sip_proto`: Network protocol of the request.",
},
"match_param": {
Type: schema.TypeString,
Required: true,
- Description: "Matching string.",
+ Description: "Parameter for match item. For example, when match from header, match parameter can be set to a header key.",
},
"operator": {
Type: schema.TypeString,
Required: true,
- Description: "Matching operator.",
+ Description: "Valid values:- `equal`: string equal.- `not_equal`: string not equal.- `include`: string include.- `not_include`: string not include.- `match`: ip match.- `not_match`: ip not match.- `include_area`: area include.- `is_empty`: field existed but empty.- `not_exists`: field is not existed.- `regexp`: regex match.- `len_gt`: value greater than.- `len_lt`: value less than.- `len_eq`: value equal.- `match_prefix`: string prefix match.- `match_suffix`: string suffix match.- `wildcard`: wildcard match.",
},
"match_content": {
Type: schema.TypeString,
Required: true,
- Description: "Matching content.",
+ Description: "Content to match.",
},
},
},
@@ -351,7 +385,7 @@ func resourceTencentCloudTeoSecurityPolicy() *schema.Resource {
"rule_priority": {
Type: schema.TypeInt,
Required: true,
- Description: "Priority of the rule.",
+ Description: "Priority of the rule. Valid value range: 1-100.",
},
"update_time": {
Type: schema.TypeString,
@@ -365,49 +399,58 @@ func resourceTencentCloudTeoSecurityPolicy() *schema.Resource {
Type: schema.TypeList,
MaxItems: 1,
Optional: true,
- Description: "Default Template.Note: This field may return null, indicating that no valid value can be obtained.",
+ Computed: true,
+ Description: "Default Template. Note: This field may return null, indicating that no valid value can be obtained.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"mode": {
Type: schema.TypeString,
Optional: true,
- Description: "Template Name.Note: This field may return null, indicating that no valid value can be obtained.",
+ Computed: true,
+ Description: "Template Name. Note: This field may return null, indicating that no valid value can be obtained.",
},
"detail": {
Type: schema.TypeList,
MaxItems: 1,
Optional: true,
+ Computed: true,
Description: "Detail of the template.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"mode": {
Type: schema.TypeString,
Optional: true,
- Description: "Template Name.Note: This field may return null, indicating that no valid value can be obtained.",
+ Computed: true,
+ Description: "Template Name. Note: This field may return null, indicating that no valid value can be obtained.",
},
"id": {
Type: schema.TypeInt,
Optional: true,
- Description: "Template ID.Note: This field may return null, indicating that no valid value can be obtained.",
+ Computed: true,
+ Description: "Template ID. Note: This field may return null, indicating that no valid value can be obtained.",
},
"action": {
Type: schema.TypeString,
Optional: true,
+ Computed: true,
Description: "Action to take.",
},
"punish_time": {
Type: schema.TypeInt,
Optional: true,
+ Computed: true,
Description: "Punish time.",
},
"threshold": {
Type: schema.TypeInt,
Optional: true,
+ Computed: true,
Description: "Threshold.",
},
"period": {
Type: schema.TypeInt,
Optional: true,
+ Computed: true,
Description: "Period.",
},
},
@@ -426,7 +469,7 @@ func resourceTencentCloudTeoSecurityPolicy() *schema.Resource {
"switch": {
Type: schema.TypeString,
Optional: true,
- Description: "- on: Enable.- off: Disable.",
+ Description: "- `on`: Enable.- `off`: Disable.",
},
"action": {
Type: schema.TypeString,
@@ -450,11 +493,12 @@ func resourceTencentCloudTeoSecurityPolicy() *schema.Resource {
"switch": {
Type: schema.TypeString,
Required: true,
- Description: "- on: Enable.- off: Disable.",
+ Description: "- `on`: Enable.- `off`: Disable.",
},
"user_rules": {
Type: schema.TypeList,
- Required: true,
+ Optional: true,
+ Computed: true,
Description: "Custom configuration.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
@@ -476,7 +520,7 @@ func resourceTencentCloudTeoSecurityPolicy() *schema.Resource {
"rule_status": {
Type: schema.TypeString,
Required: true,
- Description: "Status of the rule.",
+ Description: "Status of the rule. Valid values: `on`, `off`.",
},
"conditions": {
Type: schema.TypeList,
@@ -487,22 +531,22 @@ func resourceTencentCloudTeoSecurityPolicy() *schema.Resource {
"match_from": {
Type: schema.TypeString,
Required: true,
- Description: "Matching field.",
+ Description: "Items to match. Valid values:- `host`: Host of the request.- `sip`: Client IP.- `ua`: User-Agent.- `cookie`: Session cookie.- `cgi`: CGI script.- `xff`: XFF extension header.- `url`: URL of the request.- `accept`: Accept encoding of the request.- `method`: HTTP method of the request.- `header`: HTTP header of the request.- `sip_proto`: Network protocol of the request.",
},
"match_param": {
Type: schema.TypeString,
Required: true,
- Description: "Matching string.",
+ Description: "Parameter for match item. For example, when match from header, match parameter can be set to a header key.",
},
"operator": {
Type: schema.TypeString,
Required: true,
- Description: "Matching operator.",
+ Description: "Valid values:- `equal`: string equal.- `not_equal`: string not equal.- `include`: string include.- `not_include`: string not include.- `match`: ip match.- `not_match`: ip not match.- `include_area`: area include.- `is_empty`: field existed but empty.- `not_exists`: field is not existed.- `regexp`: regex match.- `len_gt`: value greater than.- `len_lt`: value less than.- `len_eq`: value equal.- `match_prefix`: string prefix match.- `match_suffix`: string suffix match.- `wildcard`: wildcard match.",
},
"match_content": {
Type: schema.TypeString,
Required: true,
- Description: "Matching content.",
+ Description: "Content to match.",
},
},
},
@@ -530,6 +574,7 @@ func resourceTencentCloudTeoSecurityPolicy() *schema.Resource {
"name": {
Type: schema.TypeString,
Optional: true,
+ Computed: true,
Description: "Name of the custom response page.",
},
"page_id": {
@@ -564,18 +609,20 @@ func resourceTencentCloudTeoSecurityPolicy() *schema.Resource {
"switch": {
Type: schema.TypeString,
Optional: true,
- Description: "- on: Enable.- off: Disable.",
+ Computed: true,
+ Description: "- `on`: Enable.- `off`: Disable.",
},
"managed_rule": {
Type: schema.TypeList,
MaxItems: 1,
Optional: true,
+ Computed: true,
Description: "Preset rules.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"rule_id": {
Type: schema.TypeInt,
- Required: true,
+ Computed: true,
Description: "Rule ID.",
},
"action": {
@@ -660,12 +707,13 @@ func resourceTencentCloudTeoSecurityPolicy() *schema.Resource {
Type: schema.TypeList,
MaxItems: 1,
Optional: true,
+ Computed: true,
Description: "Portrait rule.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"rule_id": {
Type: schema.TypeInt,
- Optional: true,
+ Computed: true,
Description: "Rule ID.",
},
"alg_managed_ids": {
@@ -703,7 +751,7 @@ func resourceTencentCloudTeoSecurityPolicy() *schema.Resource {
"switch": {
Type: schema.TypeString,
Optional: true,
- Description: "- on: Enable.- off: Disable.",
+ Description: "- `on`: Enable.- `off`: Disable.",
},
},
},
@@ -712,13 +760,14 @@ func resourceTencentCloudTeoSecurityPolicy() *schema.Resource {
Type: schema.TypeList,
MaxItems: 1,
Optional: true,
+ Computed: true,
Description: "Bot intelligent rule configuration.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"switch": {
Type: schema.TypeString,
Optional: true,
- Description: "- on: Enable.- off: Disable.",
+ Description: "- `on`: Enable.- `off`: Disable.",
},
"items": {
Type: schema.TypeList,
@@ -756,7 +805,7 @@ func resourceTencentCloudTeoSecurityPolicy() *schema.Resource {
"web_switch": {
Type: schema.TypeString,
Optional: true,
- Description: "- on: Enable.- off: Disable.",
+ Description: "- `on`: Enable.- `off`: Disable.",
},
},
},
@@ -772,11 +821,13 @@ func resourceTencentCloudTeoSecurityPolicy() *schema.Resource {
"switch": {
Type: schema.TypeString,
Optional: true,
- Description: "- on: Enable.- off: Disable.",
+ Computed: true,
+ Description: "- `on`: Enable.- `off`: Disable.",
},
"rules": {
Type: schema.TypeList,
Optional: true,
+ Computed: true,
Description: "Rules list.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
@@ -797,14 +848,215 @@ func resourceTencentCloudTeoSecurityPolicy() *schema.Resource {
},
"rule_id": {
Type: schema.TypeInt,
- Optional: true,
+ Computed: true,
+ Description: "Rule ID.",
+ },
+ "update_time": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Last modification date.",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ "except_config": {
+ Type: schema.TypeList,
+ MaxItems: 1,
+ Optional: true,
+ Computed: true,
+ Description: "Exception rule configuration.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "switch": {
+ Type: schema.TypeString,
+ Optional: true,
+ Computed: true,
+ Description: "- `on`: Enable.- `off`: Disable.",
+ },
+ "except_user_rules": {
+ Type: schema.TypeList,
+ Optional: true,
+ Computed: true,
+ Description: "Exception rules.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "rule_id": {
+ Type: schema.TypeInt,
+ Computed: true,
Description: "Rule ID.",
},
+ "rule_name": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Rule name.",
+ },
+ "action": {
+ Type: schema.TypeString,
+ Optional: true,
+ Computed: true,
+ Description: "Action to take. Valid values: `skip`.",
+ },
+ "rule_status": {
+ Type: schema.TypeString,
+ Optional: true,
+ Computed: true,
+ Description: "Status of the rule. Valid values:- `on`: Enabled.- `off`: Disabled.",
+ },
"update_time": {
Type: schema.TypeString,
Computed: true,
Description: "Last modification date.",
},
+ "rule_priority": {
+ Type: schema.TypeInt,
+ Optional: true,
+ Computed: true,
+ Description: "Priority of the rule. Valid value range: 0-100.",
+ },
+ "except_user_rule_conditions": {
+ Type: schema.TypeList,
+ Optional: true,
+ Computed: true,
+ Description: "Conditions of the rule.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "match_from": {
+ Type: schema.TypeString,
+ Optional: true,
+ Computed: true,
+ Description: "Items to match. Valid values:- `host`: Host of the request.- `sip`: Client IP.- `ua`: User-Agent.- `cookie`: Session cookie.- `cgi`: CGI script.- `xff`: XFF extension header.- `url`: URL of the request.- `accept`: Accept encoding of the request.- `method`: HTTP method of the request.- `header`: HTTP header of the request.- `sip_proto`: Network protocol of the request.",
+ },
+ "match_param": {
+ Type: schema.TypeString,
+ Optional: true,
+ Computed: true,
+ Description: "Parameter for match item. For example, when match from header, match parameter can be set to a header key.",
+ },
+ "operator": {
+ Type: schema.TypeString,
+ Optional: true,
+ Computed: true,
+ Description: "Valid values:- `equal`: string equal.- `not_equal`: string not equal.- `include`: string include.- `not_include`: string not include.- `match`: ip match.- `not_match`: ip not match.- `include_area`: area include.- `is_empty`: field existed but empty.- `not_exists`: field is not existed.- `regexp`: regex match.- `len_gt`: value greater than.- `len_lt`: value less than.- `len_eq`: value equal.- `match_prefix`: string prefix match.- `match_suffix`: string suffix match.- `wildcard`: wildcard match.",
+ },
+ "match_content": {
+ Type: schema.TypeString,
+ Optional: true,
+ Computed: true,
+ Description: "Content to match.",
+ },
+ },
+ },
+ },
+ "except_user_rule_scope": {
+ Type: schema.TypeList,
+ MaxItems: 1,
+ Optional: true,
+ Computed: true,
+ Description: "Scope of the rule in effect.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "modules": {
+ Type: schema.TypeSet,
+ Elem: &schema.Schema{
+ Type: schema.TypeString,
+ },
+ Optional: true,
+ Computed: true,
+ Description: "Modules in which the rule take effect. Valid values: `waf`.",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ "drop_page_config": {
+ Type: schema.TypeList,
+ MaxItems: 1,
+ Optional: true,
+ Computed: true,
+ Description: "Custom drop page configuration.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "switch": {
+ Type: schema.TypeString,
+ Optional: true,
+ Computed: true,
+ Description: "- `on`: Enable.- `off`: Disable.",
+ },
+ "waf_drop_page_detail": {
+ Type: schema.TypeList,
+ MaxItems: 1,
+ Optional: true,
+ Computed: true,
+ Description: "Custom error page of WAF rules.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "page_id": {
+ Type: schema.TypeInt,
+ Optional: true,
+ Computed: true,
+ Description: "ID of the custom error page. when set to 0, use system default error page.",
+ },
+ "status_code": {
+ Type: schema.TypeInt,
+ Optional: true,
+ Computed: true,
+ Description: "HTTP status code to use. Valid range: 100-600.",
+ },
+ "name": {
+ Type: schema.TypeString,
+ Optional: true,
+ Computed: true,
+ Description: "File name or URL.",
+ },
+ "type": {
+ Type: schema.TypeString,
+ Optional: true,
+ Computed: true,
+ Description: "Type of the custom error page. Valid values: `file`, `url`.",
+ },
+ },
+ },
+ },
+ "acl_drop_page_detail": {
+ Type: schema.TypeList,
+ MaxItems: 1,
+ Optional: true,
+ Computed: true,
+ Description: "Custom error page of ACL rules.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "page_id": {
+ Type: schema.TypeInt,
+ Optional: true,
+ Computed: true,
+ Description: "ID of the custom error page. when set to 0, use system default error page.",
+ },
+ "status_code": {
+ Type: schema.TypeInt,
+ Optional: true,
+ Computed: true,
+ Description: "HTTP status code to use. Valid range: 100-600.",
+ },
+ "name": {
+ Type: schema.TypeString,
+ Optional: true,
+ Computed: true,
+ Description: "File name or URL.",
+ },
+ "type": {
+ Type: schema.TypeString,
+ Optional: true,
+ Computed: true,
+ Description: "Type of the custom error page. Valid values: `file`, `url`.",
+ },
},
},
},
@@ -823,8 +1075,11 @@ func resourceTencentCloudTeoSecurityPolicyCreate(d *schema.ResourceData, meta in
defer inconsistentCheck(d, meta)()
var (
- zoneId string
- entity string
+ logId = getLogId(contextNil)
+ service = TeoService{client: meta.(*TencentCloudClient).apiV3Conn}
+ ctx = context.WithValue(context.TODO(), logIdKey, logId)
+ zoneId string
+ entity string
)
if v, ok := d.GetOk("zone_id"); ok {
@@ -835,8 +1090,62 @@ func resourceTencentCloudTeoSecurityPolicyCreate(d *schema.ResourceData, meta in
entity = v.(string)
}
+ var ddosPolicy *teo.DescribeZoneDDoSPolicyResponseParams
+ err := resource.Retry(readRetryTimeout, func() *resource.RetryError {
+ results, e := service.DescribeTeoZoneDDoSPolicyByFilter(ctx, map[string]interface{}{
+ "zone_id": zoneId,
+ })
+ if e != nil {
+ return retryError(e)
+ }
+ ddosPolicy = results
+ return nil
+ })
+ if err != nil {
+ log.Printf("[CRITAL]%s read Teo planInfo failed, reason:%+v", logId, err)
+ return err
+ }
+
+ if len(ddosPolicy.ShieldAreas) > 0 {
+ outer:
+ for _, areas := range ddosPolicy.ShieldAreas {
+ for _, host := range areas.DDoSHosts {
+ if host.Host != nil && *host.Host == entity && host.SecurityType != nil && *host.SecurityType != "on" {
+ request := teo.NewModifyDDoSPolicyHostRequest()
+ request.ZoneId = &zoneId
+ request.Host = &entity
+ request.PolicyId = areas.PolicyId
+ request.SecurityType = helper.String("on")
+ request.AccelerateType = helper.String("on")
+
+ err = resource.Retry(writeRetryTimeout, func() *resource.RetryError {
+ result, e := meta.(*TencentCloudClient).apiV3Conn.UseTeoClient().ModifyDDoSPolicyHost(request)
+ if e != nil {
+ return 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 teo securityPolicy failed, reason:%+v", logId, err)
+ return err
+ }
+ break outer
+ }
+ }
+ }
+ }
+
d.SetId(zoneId + FILED_SP + entity)
- return resourceTencentCloudTeoSecurityPolicyUpdate(d, meta)
+ err = resourceTencentCloudTeoSecurityPolicyUpdate(d, meta)
+ if err != nil {
+ log.Printf("[CRITAL]%s create teo ddosPolicy failed, reason:%+v", logId, err)
+ return err
+ }
+ return resourceTencentCloudTeoSecurityPolicyRead(d, meta)
}
func resourceTencentCloudTeoSecurityPolicyRead(d *schema.ResourceData, meta interface{}) error {
@@ -863,48 +1172,43 @@ func resourceTencentCloudTeoSecurityPolicyRead(d *schema.ResourceData, meta inte
if securityPolicy == nil {
d.SetId("")
- return fmt.Errorf("resource `securityPolicy` %s does not exist", d.Id())
+ return fmt.Errorf("resource `securityPolicy` %s does not exist", entity)
}
- if securityPolicy.ZoneId != nil {
- _ = d.Set("zone_id", securityPolicy.ZoneId)
- }
-
- if securityPolicy.Entity != nil {
- _ = d.Set("entity", securityPolicy.Entity)
- }
+ _ = d.Set("zone_id", zoneId)
+ _ = d.Set("entity", entity)
- if securityPolicy.Config != nil {
+ if securityPolicy.SecurityConfig != nil {
configMap := map[string]interface{}{}
- if securityPolicy.Config.WafConfig != nil {
+ if securityPolicy.SecurityConfig.WafConfig != nil {
wafConfigMap := map[string]interface{}{}
- if securityPolicy.Config.WafConfig.Switch != nil {
- wafConfigMap["switch"] = securityPolicy.Config.WafConfig.Switch
+ if securityPolicy.SecurityConfig.WafConfig.Switch != nil {
+ wafConfigMap["switch"] = securityPolicy.SecurityConfig.WafConfig.Switch
}
- if securityPolicy.Config.WafConfig.Level != nil {
- wafConfigMap["level"] = securityPolicy.Config.WafConfig.Level
+ if securityPolicy.SecurityConfig.WafConfig.Level != nil {
+ wafConfigMap["level"] = securityPolicy.SecurityConfig.WafConfig.Level
}
- if securityPolicy.Config.WafConfig.Mode != nil {
- wafConfigMap["mode"] = securityPolicy.Config.WafConfig.Mode
+ if securityPolicy.SecurityConfig.WafConfig.Mode != nil {
+ wafConfigMap["mode"] = securityPolicy.SecurityConfig.WafConfig.Mode
}
- if securityPolicy.Config.WafConfig.WafRules != nil {
+ if securityPolicy.SecurityConfig.WafConfig.WafRule != nil {
wafRulesMap := map[string]interface{}{}
- if securityPolicy.Config.WafConfig.WafRules.Switch != nil {
- wafRulesMap["switch"] = securityPolicy.Config.WafConfig.WafRules.Switch
+ if securityPolicy.SecurityConfig.WafConfig.WafRule.Switch != nil {
+ wafRulesMap["switch"] = securityPolicy.SecurityConfig.WafConfig.WafRule.Switch
}
- if securityPolicy.Config.WafConfig.WafRules.BlockRuleIDs != nil {
- wafRulesMap["block_rule_ids"] = securityPolicy.Config.WafConfig.WafRules.BlockRuleIDs
+ if securityPolicy.SecurityConfig.WafConfig.WafRule.BlockRuleIDs != nil {
+ wafRulesMap["block_rule_ids"] = securityPolicy.SecurityConfig.WafConfig.WafRule.BlockRuleIDs
}
- if securityPolicy.Config.WafConfig.WafRules.ObserveRuleIDs != nil {
- wafRulesMap["observe_rule_ids"] = securityPolicy.Config.WafConfig.WafRules.ObserveRuleIDs
+ if securityPolicy.SecurityConfig.WafConfig.WafRule.ObserveRuleIDs != nil {
+ wafRulesMap["observe_rule_ids"] = securityPolicy.SecurityConfig.WafConfig.WafRule.ObserveRuleIDs
}
wafConfigMap["waf_rules"] = []interface{}{wafRulesMap}
}
- if securityPolicy.Config.WafConfig.AiRule != nil {
+ if securityPolicy.SecurityConfig.WafConfig.AiRule != nil {
aiRuleMap := map[string]interface{}{}
- if securityPolicy.Config.WafConfig.AiRule.Mode != nil {
- aiRuleMap["mode"] = securityPolicy.Config.WafConfig.AiRule.Mode
+ if securityPolicy.SecurityConfig.WafConfig.AiRule.Mode != nil {
+ aiRuleMap["mode"] = securityPolicy.SecurityConfig.WafConfig.AiRule.Mode
}
wafConfigMap["ai_rule"] = []interface{}{aiRuleMap}
@@ -912,14 +1216,14 @@ func resourceTencentCloudTeoSecurityPolicyRead(d *schema.ResourceData, meta inte
configMap["waf_config"] = []interface{}{wafConfigMap}
}
- if securityPolicy.Config.RateLimitConfig != nil {
+ if securityPolicy.SecurityConfig.RateLimitConfig != nil {
rateLimitConfigMap := map[string]interface{}{}
- if securityPolicy.Config.RateLimitConfig.Switch != nil {
- rateLimitConfigMap["switch"] = securityPolicy.Config.RateLimitConfig.Switch
+ if securityPolicy.SecurityConfig.RateLimitConfig.Switch != nil {
+ rateLimitConfigMap["switch"] = securityPolicy.SecurityConfig.RateLimitConfig.Switch
}
- if securityPolicy.Config.RateLimitConfig.UserRules != nil {
+ if securityPolicy.SecurityConfig.RateLimitConfig.RateLimitUserRules != nil {
userRulesList := []interface{}{}
- for _, userRules := range securityPolicy.Config.RateLimitConfig.UserRules {
+ for _, userRules := range securityPolicy.SecurityConfig.RateLimitConfig.RateLimitUserRules {
userRulesMap := map[string]interface{}{}
if userRules.RuleID != nil {
userRulesMap["rule_id"] = userRules.RuleID
@@ -948,9 +1252,9 @@ func resourceTencentCloudTeoSecurityPolicyRead(d *schema.ResourceData, meta inte
if userRules.FreqFields != nil {
userRulesMap["freq_fields"] = userRules.FreqFields
}
- if userRules.Conditions != nil {
+ if userRules.AclConditions != nil {
conditionsList := []interface{}{}
- for _, conditions := range userRules.Conditions {
+ for _, conditions := range userRules.AclConditions {
conditionsMap := map[string]interface{}{}
if conditions.MatchFrom != nil {
conditionsMap["match_from"] = conditions.MatchFrom
@@ -980,30 +1284,30 @@ func resourceTencentCloudTeoSecurityPolicyRead(d *schema.ResourceData, meta inte
}
rateLimitConfigMap["user_rules"] = userRulesList
}
- if securityPolicy.Config.RateLimitConfig.Template != nil {
+ if securityPolicy.SecurityConfig.RateLimitConfig.RateLimitTemplate != nil {
templateMap := map[string]interface{}{}
- if securityPolicy.Config.RateLimitConfig.Template.Mode != nil {
- templateMap["mode"] = securityPolicy.Config.RateLimitConfig.Template.Mode
+ if securityPolicy.SecurityConfig.RateLimitConfig.RateLimitTemplate.Mode != nil {
+ templateMap["mode"] = securityPolicy.SecurityConfig.RateLimitConfig.RateLimitTemplate.Mode
}
- if securityPolicy.Config.RateLimitConfig.Template.Detail != nil {
+ if securityPolicy.SecurityConfig.RateLimitConfig.RateLimitTemplate.RateLimitTemplateDetail != nil {
detailMap := map[string]interface{}{}
- if securityPolicy.Config.RateLimitConfig.Template.Detail.Mode != nil {
- detailMap["mode"] = securityPolicy.Config.RateLimitConfig.Template.Detail.Mode
+ if securityPolicy.SecurityConfig.RateLimitConfig.RateLimitTemplate.RateLimitTemplateDetail != nil {
+ detailMap["mode"] = securityPolicy.SecurityConfig.RateLimitConfig.RateLimitTemplate.RateLimitTemplateDetail.Mode
}
- if securityPolicy.Config.RateLimitConfig.Template.Detail.ID != nil {
- detailMap["id"] = securityPolicy.Config.RateLimitConfig.Template.Detail.ID
+ if securityPolicy.SecurityConfig.RateLimitConfig.RateLimitTemplate.RateLimitTemplateDetail.ID != nil {
+ detailMap["id"] = securityPolicy.SecurityConfig.RateLimitConfig.RateLimitTemplate.RateLimitTemplateDetail.ID
}
- if securityPolicy.Config.RateLimitConfig.Template.Detail.Action != nil {
- detailMap["action"] = securityPolicy.Config.RateLimitConfig.Template.Detail.Action
+ if securityPolicy.SecurityConfig.RateLimitConfig.RateLimitTemplate.RateLimitTemplateDetail.Action != nil {
+ detailMap["action"] = securityPolicy.SecurityConfig.RateLimitConfig.RateLimitTemplate.RateLimitTemplateDetail.Action
}
- if securityPolicy.Config.RateLimitConfig.Template.Detail.PunishTime != nil {
- detailMap["punish_time"] = securityPolicy.Config.RateLimitConfig.Template.Detail.PunishTime
+ if securityPolicy.SecurityConfig.RateLimitConfig.RateLimitTemplate.RateLimitTemplateDetail.PunishTime != nil {
+ detailMap["punish_time"] = securityPolicy.SecurityConfig.RateLimitConfig.RateLimitTemplate.RateLimitTemplateDetail.PunishTime
}
- if securityPolicy.Config.RateLimitConfig.Template.Detail.Threshold != nil {
- detailMap["threshold"] = securityPolicy.Config.RateLimitConfig.Template.Detail.Threshold
+ if securityPolicy.SecurityConfig.RateLimitConfig.RateLimitTemplate.RateLimitTemplateDetail.Threshold != nil {
+ detailMap["threshold"] = securityPolicy.SecurityConfig.RateLimitConfig.RateLimitTemplate.RateLimitTemplateDetail.Threshold
}
- if securityPolicy.Config.RateLimitConfig.Template.Detail.Period != nil {
- detailMap["period"] = securityPolicy.Config.RateLimitConfig.Template.Detail.Period
+ if securityPolicy.SecurityConfig.RateLimitConfig.RateLimitTemplate.RateLimitTemplateDetail.Period != nil {
+ detailMap["period"] = securityPolicy.SecurityConfig.RateLimitConfig.RateLimitTemplate.RateLimitTemplateDetail.Period
}
templateMap["detail"] = []interface{}{detailMap}
@@ -1011,13 +1315,13 @@ func resourceTencentCloudTeoSecurityPolicyRead(d *schema.ResourceData, meta inte
rateLimitConfigMap["template"] = []interface{}{templateMap}
}
- if securityPolicy.Config.RateLimitConfig.Intelligence != nil {
+ if securityPolicy.SecurityConfig.RateLimitConfig.RateLimitIntelligence != nil {
intelligenceMap := map[string]interface{}{}
- if securityPolicy.Config.RateLimitConfig.Intelligence.Switch != nil {
- intelligenceMap["switch"] = securityPolicy.Config.RateLimitConfig.Intelligence.Switch
+ if securityPolicy.SecurityConfig.RateLimitConfig.RateLimitIntelligence.Switch != nil {
+ intelligenceMap["switch"] = securityPolicy.SecurityConfig.RateLimitConfig.RateLimitIntelligence.Switch
}
- if securityPolicy.Config.RateLimitConfig.Intelligence.Action != nil {
- intelligenceMap["action"] = securityPolicy.Config.RateLimitConfig.Intelligence.Action
+ if securityPolicy.SecurityConfig.RateLimitConfig.RateLimitIntelligence.Action != nil {
+ intelligenceMap["action"] = securityPolicy.SecurityConfig.RateLimitConfig.RateLimitIntelligence.Action
}
rateLimitConfigMap["intelligence"] = []interface{}{intelligenceMap}
@@ -1025,14 +1329,14 @@ func resourceTencentCloudTeoSecurityPolicyRead(d *schema.ResourceData, meta inte
configMap["rate_limit_config"] = []interface{}{rateLimitConfigMap}
}
- if securityPolicy.Config.AclConfig != nil {
+ if securityPolicy.SecurityConfig.AclConfig != nil {
aclConfigMap := map[string]interface{}{}
- if securityPolicy.Config.AclConfig.Switch != nil {
- aclConfigMap["switch"] = securityPolicy.Config.AclConfig.Switch
+ if securityPolicy.SecurityConfig.AclConfig.Switch != nil {
+ aclConfigMap["switch"] = securityPolicy.SecurityConfig.AclConfig.Switch
}
- if securityPolicy.Config.AclConfig.UserRules != nil {
+ if securityPolicy.SecurityConfig.AclConfig.AclUserRules != nil {
userRulesList := []interface{}{}
- for _, userRules := range securityPolicy.Config.AclConfig.UserRules {
+ for _, userRules := range securityPolicy.SecurityConfig.AclConfig.AclUserRules {
userRulesMap := map[string]interface{}{}
if userRules.RuleID != nil {
userRulesMap["rule_id"] = userRules.RuleID
@@ -1046,9 +1350,9 @@ func resourceTencentCloudTeoSecurityPolicyRead(d *schema.ResourceData, meta inte
if userRules.RuleStatus != nil {
userRulesMap["rule_status"] = userRules.RuleStatus
}
- if userRules.Conditions != nil {
+ if userRules.AclConditions != nil {
conditionsList := []interface{}{}
- for _, conditions := range userRules.Conditions {
+ for _, conditions := range userRules.AclConditions {
conditionsMap := map[string]interface{}{}
if conditions.MatchFrom != nil {
conditionsMap["match_from"] = conditions.MatchFrom
@@ -1099,86 +1403,68 @@ func resourceTencentCloudTeoSecurityPolicyRead(d *schema.ResourceData, meta inte
configMap["acl_config"] = []interface{}{aclConfigMap}
}
- if securityPolicy.Config.BotConfig != nil {
+ if securityPolicy.SecurityConfig.BotConfig != nil {
botConfigMap := map[string]interface{}{}
- if securityPolicy.Config.BotConfig.Switch != nil {
- botConfigMap["switch"] = securityPolicy.Config.BotConfig.Switch
+ if securityPolicy.SecurityConfig.BotConfig.Switch != nil {
+ botConfigMap["switch"] = securityPolicy.SecurityConfig.BotConfig.Switch
}
- if securityPolicy.Config.BotConfig.ManagedRule != nil {
+ if securityPolicy.SecurityConfig.BotConfig.BotManagedRule != nil {
managedRuleMap := map[string]interface{}{}
- if securityPolicy.Config.BotConfig.ManagedRule.RuleID != nil {
- managedRuleMap["rule_id"] = securityPolicy.Config.BotConfig.ManagedRule.RuleID
+ if securityPolicy.SecurityConfig.BotConfig.BotManagedRule.RuleID != nil {
+ managedRuleMap["rule_id"] = securityPolicy.SecurityConfig.BotConfig.BotManagedRule.RuleID
}
- if securityPolicy.Config.BotConfig.ManagedRule.Action != nil {
- managedRuleMap["action"] = securityPolicy.Config.BotConfig.ManagedRule.Action
+ if securityPolicy.SecurityConfig.BotConfig.BotManagedRule.Action != nil {
+ managedRuleMap["action"] = securityPolicy.SecurityConfig.BotConfig.BotManagedRule.Action
}
- if securityPolicy.Config.BotConfig.ManagedRule.PunishTime != nil {
- managedRuleMap["punish_time"] = securityPolicy.Config.BotConfig.ManagedRule.PunishTime
+ if securityPolicy.SecurityConfig.BotConfig.BotManagedRule.TransManagedIds != nil {
+ managedRuleMap["trans_managed_ids"] = securityPolicy.SecurityConfig.BotConfig.BotManagedRule.TransManagedIds
}
- if securityPolicy.Config.BotConfig.ManagedRule.PunishTimeUnit != nil {
- managedRuleMap["punish_time_unit"] = securityPolicy.Config.BotConfig.ManagedRule.PunishTimeUnit
+ if securityPolicy.SecurityConfig.BotConfig.BotManagedRule.AlgManagedIds != nil {
+ managedRuleMap["alg_managed_ids"] = securityPolicy.SecurityConfig.BotConfig.BotManagedRule.AlgManagedIds
}
- if securityPolicy.Config.BotConfig.ManagedRule.Name != nil {
- managedRuleMap["name"] = securityPolicy.Config.BotConfig.ManagedRule.Name
+ if securityPolicy.SecurityConfig.BotConfig.BotManagedRule.CapManagedIds != nil {
+ managedRuleMap["cap_managed_ids"] = securityPolicy.SecurityConfig.BotConfig.BotManagedRule.CapManagedIds
}
- if securityPolicy.Config.BotConfig.ManagedRule.PageId != nil {
- managedRuleMap["page_id"] = securityPolicy.Config.BotConfig.ManagedRule.PageId
+ if securityPolicy.SecurityConfig.BotConfig.BotManagedRule.MonManagedIds != nil {
+ managedRuleMap["mon_managed_ids"] = securityPolicy.SecurityConfig.BotConfig.BotManagedRule.MonManagedIds
}
- if securityPolicy.Config.BotConfig.ManagedRule.RedirectUrl != nil {
- managedRuleMap["redirect_url"] = securityPolicy.Config.BotConfig.ManagedRule.RedirectUrl
- }
- if securityPolicy.Config.BotConfig.ManagedRule.ResponseCode != nil {
- managedRuleMap["response_code"] = securityPolicy.Config.BotConfig.ManagedRule.ResponseCode
- }
- if securityPolicy.Config.BotConfig.ManagedRule.TransManagedIds != nil {
- managedRuleMap["trans_managed_ids"] = securityPolicy.Config.BotConfig.ManagedRule.TransManagedIds
- }
- if securityPolicy.Config.BotConfig.ManagedRule.AlgManagedIds != nil {
- managedRuleMap["alg_managed_ids"] = securityPolicy.Config.BotConfig.ManagedRule.AlgManagedIds
- }
- if securityPolicy.Config.BotConfig.ManagedRule.CapManagedIds != nil {
- managedRuleMap["cap_managed_ids"] = securityPolicy.Config.BotConfig.ManagedRule.CapManagedIds
- }
- if securityPolicy.Config.BotConfig.ManagedRule.MonManagedIds != nil {
- managedRuleMap["mon_managed_ids"] = securityPolicy.Config.BotConfig.ManagedRule.MonManagedIds
- }
- if securityPolicy.Config.BotConfig.ManagedRule.DropManagedIds != nil {
- managedRuleMap["drop_managed_ids"] = securityPolicy.Config.BotConfig.ManagedRule.DropManagedIds
+ if securityPolicy.SecurityConfig.BotConfig.BotManagedRule.DropManagedIds != nil {
+ managedRuleMap["drop_managed_ids"] = securityPolicy.SecurityConfig.BotConfig.BotManagedRule.DropManagedIds
}
botConfigMap["managed_rule"] = []interface{}{managedRuleMap}
}
- if securityPolicy.Config.BotConfig.PortraitRule != nil {
+ if securityPolicy.SecurityConfig.BotConfig.BotPortraitRule != nil {
portraitRuleMap := map[string]interface{}{}
- if securityPolicy.Config.BotConfig.PortraitRule.RuleID != nil {
- portraitRuleMap["rule_id"] = securityPolicy.Config.BotConfig.PortraitRule.RuleID
+ if securityPolicy.SecurityConfig.BotConfig.BotPortraitRule.RuleID != nil {
+ portraitRuleMap["rule_id"] = securityPolicy.SecurityConfig.BotConfig.BotPortraitRule.RuleID
}
- if securityPolicy.Config.BotConfig.PortraitRule.AlgManagedIds != nil {
- portraitRuleMap["alg_managed_ids"] = securityPolicy.Config.BotConfig.PortraitRule.AlgManagedIds
+ if securityPolicy.SecurityConfig.BotConfig.BotPortraitRule.AlgManagedIds != nil {
+ portraitRuleMap["alg_managed_ids"] = securityPolicy.SecurityConfig.BotConfig.BotPortraitRule.AlgManagedIds
}
- if securityPolicy.Config.BotConfig.PortraitRule.CapManagedIds != nil {
- portraitRuleMap["cap_managed_ids"] = securityPolicy.Config.BotConfig.PortraitRule.CapManagedIds
+ if securityPolicy.SecurityConfig.BotConfig.BotPortraitRule.CapManagedIds != nil {
+ portraitRuleMap["cap_managed_ids"] = securityPolicy.SecurityConfig.BotConfig.BotPortraitRule.CapManagedIds
}
- if securityPolicy.Config.BotConfig.PortraitRule.MonManagedIds != nil {
- portraitRuleMap["mon_managed_ids"] = securityPolicy.Config.BotConfig.PortraitRule.MonManagedIds
+ if securityPolicy.SecurityConfig.BotConfig.BotPortraitRule.MonManagedIds != nil {
+ portraitRuleMap["mon_managed_ids"] = securityPolicy.SecurityConfig.BotConfig.BotPortraitRule.MonManagedIds
}
- if securityPolicy.Config.BotConfig.PortraitRule.DropManagedIds != nil {
- portraitRuleMap["drop_managed_ids"] = securityPolicy.Config.BotConfig.PortraitRule.DropManagedIds
+ if securityPolicy.SecurityConfig.BotConfig.BotPortraitRule.DropManagedIds != nil {
+ portraitRuleMap["drop_managed_ids"] = securityPolicy.SecurityConfig.BotConfig.BotPortraitRule.DropManagedIds
}
- if securityPolicy.Config.BotConfig.PortraitRule.Switch != nil {
- portraitRuleMap["switch"] = securityPolicy.Config.BotConfig.PortraitRule.Switch
+ if securityPolicy.SecurityConfig.BotConfig.BotPortraitRule.Switch != nil {
+ portraitRuleMap["switch"] = securityPolicy.SecurityConfig.BotConfig.BotPortraitRule.Switch
}
botConfigMap["portrait_rule"] = []interface{}{portraitRuleMap}
}
- if securityPolicy.Config.BotConfig.IntelligenceRule != nil {
+ if securityPolicy.SecurityConfig.BotConfig.IntelligenceRule != nil {
intelligenceRuleMap := map[string]interface{}{}
- if securityPolicy.Config.BotConfig.IntelligenceRule.Switch != nil {
- intelligenceRuleMap["switch"] = securityPolicy.Config.BotConfig.IntelligenceRule.Switch
+ if securityPolicy.SecurityConfig.BotConfig.IntelligenceRule.Switch != nil {
+ intelligenceRuleMap["switch"] = securityPolicy.SecurityConfig.BotConfig.IntelligenceRule.Switch
}
- if securityPolicy.Config.BotConfig.IntelligenceRule.Items != nil {
+ if securityPolicy.SecurityConfig.BotConfig.IntelligenceRule.IntelligenceRuleItems != nil {
itemsList := []interface{}{}
- for _, items := range securityPolicy.Config.BotConfig.IntelligenceRule.Items {
+ for _, items := range securityPolicy.SecurityConfig.BotConfig.IntelligenceRule.IntelligenceRuleItems {
itemsMap := map[string]interface{}{}
if items.Label != nil {
itemsMap["label"] = items.Label
@@ -1197,22 +1483,22 @@ func resourceTencentCloudTeoSecurityPolicyRead(d *schema.ResourceData, meta inte
configMap["bot_config"] = []interface{}{botConfigMap}
}
- if securityPolicy.Config.SwitchConfig != nil {
+ if securityPolicy.SecurityConfig.SwitchConfig != nil {
switchConfigMap := map[string]interface{}{}
- if securityPolicy.Config.SwitchConfig.WebSwitch != nil {
- switchConfigMap["web_switch"] = securityPolicy.Config.SwitchConfig.WebSwitch
+ if securityPolicy.SecurityConfig.SwitchConfig.WebSwitch != nil {
+ switchConfigMap["web_switch"] = securityPolicy.SecurityConfig.SwitchConfig.WebSwitch
}
configMap["switch_config"] = []interface{}{switchConfigMap}
}
- if securityPolicy.Config.IpTableConfig != nil {
+ if securityPolicy.SecurityConfig.IpTableConfig != nil {
ipTableConfigMap := map[string]interface{}{}
- if securityPolicy.Config.IpTableConfig.Switch != nil {
- ipTableConfigMap["switch"] = securityPolicy.Config.IpTableConfig.Switch
+ if securityPolicy.SecurityConfig.IpTableConfig.Switch != nil {
+ ipTableConfigMap["switch"] = securityPolicy.SecurityConfig.IpTableConfig.Switch
}
- if securityPolicy.Config.IpTableConfig.Rules != nil {
+ if securityPolicy.SecurityConfig.IpTableConfig.IpTableRules != nil {
rulesList := []interface{}{}
- for _, rules := range securityPolicy.Config.IpTableConfig.Rules {
+ for _, rules := range securityPolicy.SecurityConfig.IpTableConfig.IpTableRules {
rulesMap := map[string]interface{}{}
if rules.Action != nil {
rulesMap["action"] = rules.Action
@@ -1237,6 +1523,112 @@ func resourceTencentCloudTeoSecurityPolicyRead(d *schema.ResourceData, meta inte
configMap["ip_table_config"] = []interface{}{ipTableConfigMap}
}
+ if securityPolicy.SecurityConfig.ExceptConfig != nil {
+ exceptConfigMap := map[string]interface{}{}
+ if securityPolicy.SecurityConfig.ExceptConfig.Switch != nil {
+ exceptConfigMap["switch"] = securityPolicy.SecurityConfig.ExceptConfig.Switch
+ }
+ if securityPolicy.SecurityConfig.ExceptConfig.ExceptUserRules != nil {
+ exceptUserRulesList := []interface{}{}
+ for _, exceptUserRules := range securityPolicy.SecurityConfig.ExceptConfig.ExceptUserRules {
+ exceptUserRulesMap := map[string]interface{}{}
+ if exceptUserRules.RuleID != nil {
+ exceptUserRulesMap["rule_id"] = exceptUserRules.RuleID
+ }
+ if exceptUserRules.RuleName != nil {
+ exceptUserRulesMap["rule_name"] = exceptUserRules.RuleName
+ }
+ if exceptUserRules.Action != nil {
+ exceptUserRulesMap["action"] = exceptUserRules.Action
+ }
+ if exceptUserRules.RuleStatus != nil {
+ exceptUserRulesMap["rule_status"] = exceptUserRules.RuleStatus
+ }
+ if exceptUserRules.UpdateTime != nil {
+ exceptUserRulesMap["update_time"] = exceptUserRules.UpdateTime
+ }
+ if exceptUserRules.RulePriority != nil {
+ exceptUserRulesMap["rule_priority"] = exceptUserRules.RulePriority
+ }
+ if exceptUserRules.ExceptUserRuleConditions != nil {
+ exceptUserRuleConditionsList := []interface{}{}
+ for _, exceptUserRuleConditions := range exceptUserRules.ExceptUserRuleConditions {
+ exceptUserRuleConditionsMap := map[string]interface{}{}
+ if exceptUserRuleConditions.MatchFrom != nil {
+ exceptUserRuleConditionsMap["match_from"] = exceptUserRuleConditions.MatchFrom
+ }
+ if exceptUserRuleConditions.MatchParam != nil {
+ exceptUserRuleConditionsMap["match_param"] = exceptUserRuleConditions.MatchParam
+ }
+ if exceptUserRuleConditions.Operator != nil {
+ exceptUserRuleConditionsMap["operator"] = exceptUserRuleConditions.Operator
+ }
+ if exceptUserRuleConditions.MatchContent != nil {
+ exceptUserRuleConditionsMap["match_content"] = exceptUserRuleConditions.MatchContent
+ }
+
+ exceptUserRuleConditionsList = append(exceptUserRuleConditionsList, exceptUserRuleConditionsMap)
+ }
+ exceptUserRulesMap["except_user_rule_conditions"] = exceptUserRuleConditionsList
+ }
+ if exceptUserRules.ExceptUserRuleScope != nil {
+ exceptUserRuleScopeMap := map[string]interface{}{}
+ if exceptUserRules.ExceptUserRuleScope.Modules != nil {
+ exceptUserRuleScopeMap["modules"] = exceptUserRules.ExceptUserRuleScope.Modules
+ }
+
+ exceptUserRulesMap["except_user_rule_scope"] = []interface{}{exceptUserRuleScopeMap}
+ }
+
+ exceptUserRulesList = append(exceptUserRulesList, exceptUserRulesMap)
+ }
+ exceptConfigMap["except_user_rules"] = exceptUserRulesList
+ }
+
+ configMap["except_config"] = []interface{}{exceptConfigMap}
+ }
+ if securityPolicy.SecurityConfig.DropPageConfig != nil {
+ dropPageConfigMap := map[string]interface{}{}
+ if securityPolicy.SecurityConfig.DropPageConfig.Switch != nil {
+ dropPageConfigMap["switch"] = securityPolicy.SecurityConfig.DropPageConfig.Switch
+ }
+ if securityPolicy.SecurityConfig.DropPageConfig.WafDropPageDetail != nil {
+ wafDropPageDetailMap := map[string]interface{}{}
+ if securityPolicy.SecurityConfig.DropPageConfig.WafDropPageDetail.PageId != nil {
+ wafDropPageDetailMap["page_id"] = securityPolicy.SecurityConfig.DropPageConfig.WafDropPageDetail.PageId
+ }
+ if securityPolicy.SecurityConfig.DropPageConfig.WafDropPageDetail.StatusCode != nil {
+ wafDropPageDetailMap["status_code"] = securityPolicy.SecurityConfig.DropPageConfig.WafDropPageDetail.StatusCode
+ }
+ if securityPolicy.SecurityConfig.DropPageConfig.WafDropPageDetail.Name != nil {
+ wafDropPageDetailMap["name"] = securityPolicy.SecurityConfig.DropPageConfig.WafDropPageDetail.Name
+ }
+ if securityPolicy.SecurityConfig.DropPageConfig.WafDropPageDetail.Type != nil {
+ wafDropPageDetailMap["type"] = securityPolicy.SecurityConfig.DropPageConfig.WafDropPageDetail.Type
+ }
+
+ dropPageConfigMap["waf_drop_page_detail"] = []interface{}{wafDropPageDetailMap}
+ }
+ if securityPolicy.SecurityConfig.DropPageConfig.AclDropPageDetail != nil {
+ aclDropPageDetailMap := map[string]interface{}{}
+ if securityPolicy.SecurityConfig.DropPageConfig.AclDropPageDetail.PageId != nil {
+ aclDropPageDetailMap["page_id"] = securityPolicy.SecurityConfig.DropPageConfig.AclDropPageDetail.PageId
+ }
+ if securityPolicy.SecurityConfig.DropPageConfig.AclDropPageDetail.StatusCode != nil {
+ aclDropPageDetailMap["status_code"] = securityPolicy.SecurityConfig.DropPageConfig.AclDropPageDetail.StatusCode
+ }
+ if securityPolicy.SecurityConfig.DropPageConfig.AclDropPageDetail.Name != nil {
+ aclDropPageDetailMap["name"] = securityPolicy.SecurityConfig.DropPageConfig.AclDropPageDetail.Name
+ }
+ if securityPolicy.SecurityConfig.DropPageConfig.AclDropPageDetail.Type != nil {
+ aclDropPageDetailMap["type"] = securityPolicy.SecurityConfig.DropPageConfig.AclDropPageDetail.Type
+ }
+
+ dropPageConfigMap["acl_drop_page_detail"] = []interface{}{aclDropPageDetailMap}
+ }
+
+ configMap["drop_page_config"] = []interface{}{dropPageConfigMap}
+ }
_ = d.Set("config", []interface{}{configMap})
}
@@ -1262,378 +1654,465 @@ func resourceTencentCloudTeoSecurityPolicyUpdate(d *schema.ResourceData, meta in
request.ZoneId = &zoneId
request.Entity = &entity
- if dMap, ok := helper.InterfacesHeadMap(d, "config"); ok {
- securityConfig := teo.SecurityConfig{}
- if WafConfigMap, ok := helper.InterfaceToMap(dMap, "waf_config"); ok {
- wafConfig := teo.WafConfig{}
- if v, ok := WafConfigMap["switch"]; ok {
- wafConfig.Switch = helper.String(v.(string))
- }
- if v, ok := WafConfigMap["level"]; ok {
- wafConfig.Level = helper.String(v.(string))
- }
- if v, ok := WafConfigMap["mode"]; ok {
- wafConfig.Mode = helper.String(v.(string))
- }
- if WafRulesMap, ok := helper.InterfaceToMap(WafConfigMap, "waf_rules"); ok {
- wafRule := teo.WafRule{}
- if v, ok := WafRulesMap["switch"]; ok {
- wafRule.Switch = helper.String(v.(string))
- }
- if v, ok := WafRulesMap["block_rule_ids"]; ok {
- blockRuleIDsSet := v.(*schema.Set).List()
- for i := range blockRuleIDsSet {
- blockRuleIDs := blockRuleIDsSet[i].(int)
- wafRule.BlockRuleIDs = append(wafRule.BlockRuleIDs, helper.IntInt64(blockRuleIDs))
+ if d.HasChange("zone_id") {
+ if old, _ := d.GetChange("zone_id"); old.(string) != "" {
+ return fmt.Errorf("`zone_id` do not support change now.")
+ }
+ }
+
+ if d.HasChange("entity") {
+ if old, _ := d.GetChange("entity"); old.(string) != "" {
+ return fmt.Errorf("`entity` do not support change now.")
+ }
+ }
+
+ if d.HasChange("config") {
+ if dMap, ok := helper.InterfacesHeadMap(d, "config"); ok {
+ securityConfig := teo.SecurityConfig{}
+ if WafConfigMap, ok := helper.InterfaceToMap(dMap, "waf_config"); ok {
+ wafConfig := teo.WafConfig{}
+ if v, ok := WafConfigMap["switch"]; ok {
+ wafConfig.Switch = helper.String(v.(string))
+ }
+ if v, ok := WafConfigMap["level"]; ok {
+ wafConfig.Level = helper.String(v.(string))
+ }
+ if v, ok := WafConfigMap["mode"]; ok {
+ wafConfig.Mode = helper.String(v.(string))
+ }
+ if WafRulesMap, ok := helper.InterfaceToMap(WafConfigMap, "waf_rules"); ok {
+ wafRule := teo.WafRule{}
+ if v, ok := WafRulesMap["switch"]; ok {
+ wafRule.Switch = helper.String(v.(string))
+ }
+ if v, ok := WafRulesMap["block_rule_ids"]; ok {
+ blockRuleIDsSet := v.(*schema.Set).List()
+ for i := range blockRuleIDsSet {
+ blockRuleIDs := blockRuleIDsSet[i].(int)
+ wafRule.BlockRuleIDs = append(wafRule.BlockRuleIDs, helper.IntInt64(blockRuleIDs))
+ }
}
+ if v, ok := WafRulesMap["observe_rule_ids"]; ok {
+ observeRuleIDsSet := v.(*schema.Set).List()
+ for i := range observeRuleIDsSet {
+ observeRuleIDs := observeRuleIDsSet[i].(int)
+ wafRule.ObserveRuleIDs = append(wafRule.ObserveRuleIDs, helper.IntInt64(observeRuleIDs))
+ }
+ }
+ wafConfig.WafRule = &wafRule
}
- if v, ok := WafRulesMap["observe_rule_ids"]; ok {
- observeRuleIDsSet := v.(*schema.Set).List()
- for i := range observeRuleIDsSet {
- observeRuleIDs := observeRuleIDsSet[i].(int)
- wafRule.ObserveRuleIDs = append(wafRule.ObserveRuleIDs, helper.IntInt64(observeRuleIDs))
+ if AiRuleMap, ok := helper.InterfaceToMap(WafConfigMap, "ai_rule"); ok {
+ aiRule := teo.AiRule{}
+ if v, ok := AiRuleMap["mode"]; ok {
+ aiRule.Mode = helper.String(v.(string))
}
+ wafConfig.AiRule = &aiRule
}
- wafConfig.WafRules = &wafRule
+ securityConfig.WafConfig = &wafConfig
}
- if AiRuleMap, ok := helper.InterfaceToMap(WafConfigMap, "ai_rule"); ok {
- aiRule := teo.AiRule{}
- if v, ok := AiRuleMap["mode"]; ok {
- aiRule.Mode = helper.String(v.(string))
+ if RateLimitConfigMap, ok := helper.InterfaceToMap(dMap, "rate_limit_config"); ok {
+ rateLimitConfig := teo.RateLimitConfig{}
+ if v, ok := RateLimitConfigMap["switch"]; ok {
+ rateLimitConfig.Switch = helper.String(v.(string))
}
- wafConfig.AiRule = &aiRule
- }
- securityConfig.WafConfig = &wafConfig
- }
- if RateLimitConfigMap, ok := helper.InterfaceToMap(dMap, "rate_limit_config"); ok {
- rateLimitConfig := teo.RateLimitConfig{}
- if v, ok := RateLimitConfigMap["switch"]; ok {
- rateLimitConfig.Switch = helper.String(v.(string))
- }
- if v, ok := RateLimitConfigMap["user_rules"]; ok {
- for _, item := range v.([]interface{}) {
- UserRulesMap := item.(map[string]interface{})
- rateLimitUserRule := teo.RateLimitUserRule{}
- if v, ok := UserRulesMap["rule_name"]; ok {
- rateLimitUserRule.RuleName = helper.String(v.(string))
- }
- if v, ok := UserRulesMap["threshold"]; ok {
- rateLimitUserRule.Threshold = helper.IntInt64(v.(int))
- }
- if v, ok := UserRulesMap["period"]; ok {
- rateLimitUserRule.Period = helper.IntInt64(v.(int))
- }
- if v, ok := UserRulesMap["action"]; ok {
- rateLimitUserRule.Action = helper.String(v.(string))
- }
- if v, ok := UserRulesMap["punish_time"]; ok {
- rateLimitUserRule.PunishTime = helper.IntInt64(v.(int))
- }
- if v, ok := UserRulesMap["punish_time_unit"]; ok {
- rateLimitUserRule.PunishTimeUnit = helper.String(v.(string))
- }
- if v, ok := UserRulesMap["rule_status"]; ok {
- rateLimitUserRule.RuleStatus = helper.String(v.(string))
- }
- if v, ok := UserRulesMap["freq_fields"]; ok {
- freqFieldsSet := v.(*schema.Set).List()
- for i := range freqFieldsSet {
- freqFields := freqFieldsSet[i].(string)
- rateLimitUserRule.FreqFields = append(rateLimitUserRule.FreqFields, &freqFields)
+ if v, ok := RateLimitConfigMap["user_rules"]; ok {
+ for _, item := range v.([]interface{}) {
+ UserRulesMap := item.(map[string]interface{})
+ rateLimitUserRule := teo.RateLimitUserRule{}
+ if v, ok := UserRulesMap["rule_name"]; ok {
+ rateLimitUserRule.RuleName = helper.String(v.(string))
}
- }
- if v, ok := UserRulesMap["conditions"]; ok {
- for _, item := range v.([]interface{}) {
- ConditionsMap := item.(map[string]interface{})
- aCLCondition := teo.ACLCondition{}
- if v, ok := ConditionsMap["match_from"]; ok {
- aCLCondition.MatchFrom = helper.String(v.(string))
- }
- if v, ok := ConditionsMap["match_param"]; ok {
- aCLCondition.MatchParam = helper.String(v.(string))
- }
- if v, ok := ConditionsMap["operator"]; ok {
- aCLCondition.Operator = helper.String(v.(string))
+ if v, ok := UserRulesMap["threshold"]; ok {
+ rateLimitUserRule.Threshold = helper.IntInt64(v.(int))
+ }
+ if v, ok := UserRulesMap["period"]; ok {
+ rateLimitUserRule.Period = helper.IntInt64(v.(int))
+ }
+ if v, ok := UserRulesMap["action"]; ok {
+ rateLimitUserRule.Action = helper.String(v.(string))
+ }
+ if v, ok := UserRulesMap["punish_time"]; ok {
+ rateLimitUserRule.PunishTime = helper.IntInt64(v.(int))
+ }
+ if v, ok := UserRulesMap["punish_time_unit"]; ok {
+ rateLimitUserRule.PunishTimeUnit = helper.String(v.(string))
+ }
+ if v, ok := UserRulesMap["rule_status"]; ok {
+ rateLimitUserRule.RuleStatus = helper.String(v.(string))
+ }
+ if v, ok := UserRulesMap["freq_fields"]; ok {
+ freqFieldsSet := v.(*schema.Set).List()
+ for i := range freqFieldsSet {
+ freqFields := freqFieldsSet[i].(string)
+ rateLimitUserRule.FreqFields = append(rateLimitUserRule.FreqFields, &freqFields)
}
- if v, ok := ConditionsMap["match_content"]; ok {
- aCLCondition.MatchContent = helper.String(v.(string))
+ }
+ if v, ok := UserRulesMap["conditions"]; ok {
+ for _, item := range v.([]interface{}) {
+ ConditionsMap := item.(map[string]interface{})
+ aCLCondition := teo.AclCondition{}
+ if v, ok := ConditionsMap["match_from"]; ok {
+ aCLCondition.MatchParam = helper.String(v.(string))
+ }
+ if v, ok := ConditionsMap["match_param"]; ok {
+ aCLCondition.MatchParam = helper.String(v.(string))
+ }
+ if v, ok := ConditionsMap["operator"]; ok {
+ aCLCondition.Operator = helper.String(v.(string))
+ }
+ if v, ok := ConditionsMap["match_content"]; ok {
+ aCLCondition.MatchContent = helper.String(v.(string))
+ }
+ rateLimitUserRule.AclConditions = append(rateLimitUserRule.AclConditions, &aCLCondition)
}
- rateLimitUserRule.Conditions = append(rateLimitUserRule.Conditions, &aCLCondition)
}
+ if v, ok := UserRulesMap["rule_priority"]; ok {
+ rateLimitUserRule.RulePriority = helper.IntInt64(v.(int))
+ }
+ rateLimitConfig.RateLimitUserRules = append(rateLimitConfig.RateLimitUserRules, &rateLimitUserRule)
}
- if v, ok := UserRulesMap["rule_priority"]; ok {
- rateLimitUserRule.RulePriority = helper.IntInt64(v.(int))
- }
- rateLimitConfig.UserRules = append(rateLimitConfig.UserRules, &rateLimitUserRule)
- }
- }
- if TemplateMap, ok := helper.InterfaceToMap(RateLimitConfigMap, "template"); ok {
- rateLimitTemplate := teo.RateLimitTemplate{}
- if v, ok := TemplateMap["mode"]; ok {
- rateLimitTemplate.Mode = helper.String(v.(string))
}
- if DetailMap, ok := helper.InterfaceToMap(TemplateMap, "detail"); ok {
- rateLimitTemplateDetail := teo.RateLimitTemplateDetail{}
- if v, ok := DetailMap["mode"]; ok {
- rateLimitTemplateDetail.Mode = helper.String(v.(string))
+ if TemplateMap, ok := helper.InterfaceToMap(RateLimitConfigMap, "template"); ok {
+ rateLimitTemplate := teo.RateLimitTemplate{}
+ if v, ok := TemplateMap["mode"]; ok {
+ rateLimitTemplate.Mode = helper.String(v.(string))
}
- if v, ok := DetailMap["id"]; ok {
- rateLimitTemplateDetail.ID = helper.IntInt64(v.(int))
- }
- if v, ok := DetailMap["action"]; ok {
- rateLimitTemplateDetail.Action = helper.String(v.(string))
- }
- if v, ok := DetailMap["punish_time"]; ok {
- rateLimitTemplateDetail.PunishTime = helper.IntInt64(v.(int))
+ if DetailMap, ok := helper.InterfaceToMap(TemplateMap, "detail"); ok {
+ rateLimitTemplateDetail := teo.RateLimitTemplateDetail{}
+ if v, ok := DetailMap["mode"]; ok {
+ rateLimitTemplateDetail.Mode = helper.String(v.(string))
+ }
+ if v, ok := DetailMap["id"]; ok {
+ rateLimitTemplateDetail.ID = helper.IntInt64(v.(int))
+ }
+ if v, ok := DetailMap["action"]; ok {
+ rateLimitTemplateDetail.Action = helper.String(v.(string))
+ }
+ if v, ok := DetailMap["punish_time"]; ok {
+ rateLimitTemplateDetail.PunishTime = helper.IntInt64(v.(int))
+ }
+ if v, ok := DetailMap["threshold"]; ok {
+ rateLimitTemplateDetail.Threshold = helper.IntInt64(v.(int))
+ }
+ if v, ok := DetailMap["period"]; ok {
+ rateLimitTemplateDetail.Period = helper.IntInt64(v.(int))
+ }
+ rateLimitTemplate.RateLimitTemplateDetail = &rateLimitTemplateDetail
}
- if v, ok := DetailMap["threshold"]; ok {
- rateLimitTemplateDetail.Threshold = helper.IntInt64(v.(int))
+ rateLimitConfig.RateLimitTemplate = &rateLimitTemplate
+ }
+ if IntelligenceMap, ok := helper.InterfaceToMap(RateLimitConfigMap, "intelligence"); ok {
+ rateLimitIntelligence := teo.RateLimitIntelligence{}
+ if v, ok := IntelligenceMap["switch"]; ok {
+ rateLimitIntelligence.Switch = helper.String(v.(string))
}
- if v, ok := DetailMap["period"]; ok {
- rateLimitTemplateDetail.Period = helper.IntInt64(v.(int))
+ if v, ok := IntelligenceMap["action"]; ok {
+ rateLimitIntelligence.Action = helper.String(v.(string))
}
- rateLimitTemplate.Detail = &rateLimitTemplateDetail
+ rateLimitConfig.RateLimitIntelligence = &rateLimitIntelligence
}
- rateLimitConfig.Template = &rateLimitTemplate
+ securityConfig.RateLimitConfig = &rateLimitConfig
}
- if IntelligenceMap, ok := helper.InterfaceToMap(RateLimitConfigMap, "intelligence"); ok {
- rateLimitIntelligence := teo.RateLimitIntelligence{}
- if v, ok := IntelligenceMap["switch"]; ok {
- rateLimitIntelligence.Switch = helper.String(v.(string))
+ if AclConfigMap, ok := helper.InterfaceToMap(dMap, "acl_config"); ok {
+ aclConfig := teo.AclConfig{}
+ if v, ok := AclConfigMap["switch"]; ok {
+ aclConfig.Switch = helper.String(v.(string))
}
- if v, ok := IntelligenceMap["action"]; ok {
- rateLimitIntelligence.Action = helper.String(v.(string))
+ if v, ok := AclConfigMap["user_rules"]; ok {
+ for _, item := range v.([]interface{}) {
+ UserRulesMap := item.(map[string]interface{})
+ aCLUserRule := teo.AclUserRule{}
+ if v, ok := UserRulesMap["rule_name"]; ok {
+ aCLUserRule.RuleName = helper.String(v.(string))
+ }
+ if v, ok := UserRulesMap["action"]; ok {
+ aCLUserRule.Action = helper.String(v.(string))
+ }
+ if v, ok := UserRulesMap["rule_status"]; ok {
+ aCLUserRule.RuleStatus = helper.String(v.(string))
+ }
+ if v, ok := UserRulesMap["conditions"]; ok {
+ for _, item := range v.([]interface{}) {
+ ConditionsMap := item.(map[string]interface{})
+ aCLCondition := teo.AclCondition{}
+ if v, ok := ConditionsMap["match_from"]; ok {
+ aCLCondition.MatchFrom = helper.String(v.(string))
+ }
+ if v, ok := ConditionsMap["match_param"]; ok {
+ aCLCondition.MatchParam = helper.String(v.(string))
+ }
+ if v, ok := ConditionsMap["operator"]; ok {
+ aCLCondition.Operator = helper.String(v.(string))
+ }
+ if v, ok := ConditionsMap["match_content"]; ok {
+ aCLCondition.MatchContent = helper.String(v.(string))
+ }
+ aCLUserRule.AclConditions = append(aCLUserRule.AclConditions, &aCLCondition)
+ }
+ }
+ if v, ok := UserRulesMap["rule_priority"]; ok {
+ aCLUserRule.RulePriority = helper.IntInt64(v.(int))
+ }
+ if v, ok := UserRulesMap["punish_time"]; ok {
+ aCLUserRule.PunishTime = helper.IntInt64(v.(int))
+ }
+ if v, ok := UserRulesMap["punish_time_unit"]; ok {
+ aCLUserRule.PunishTimeUnit = helper.String(v.(string))
+ }
+ if v, ok := UserRulesMap["name"]; ok {
+ aCLUserRule.Name = helper.String(v.(string))
+ }
+ if v, ok := UserRulesMap["page_id"]; ok {
+ aCLUserRule.PageId = helper.IntInt64(v.(int))
+ }
+ if v, ok := UserRulesMap["redirect_url"]; ok {
+ aCLUserRule.RedirectUrl = helper.String(v.(string))
+ }
+ if v, ok := UserRulesMap["response_code"]; ok {
+ aCLUserRule.ResponseCode = helper.IntInt64(v.(int))
+ }
+ aclConfig.AclUserRules = append(aclConfig.AclUserRules, &aCLUserRule)
+ }
}
- rateLimitConfig.Intelligence = &rateLimitIntelligence
- }
- securityConfig.RateLimitConfig = &rateLimitConfig
- }
- if AclConfigMap, ok := helper.InterfaceToMap(dMap, "acl_config"); ok {
- aclConfig := teo.AclConfig{}
- if v, ok := AclConfigMap["switch"]; ok {
- aclConfig.Switch = helper.String(v.(string))
+ securityConfig.AclConfig = &aclConfig
}
- if v, ok := AclConfigMap["user_rules"]; ok {
- for _, item := range v.([]interface{}) {
- UserRulesMap := item.(map[string]interface{})
- aCLUserRule := teo.ACLUserRule{}
- if v, ok := UserRulesMap["rule_name"]; ok {
- aCLUserRule.RuleName = helper.String(v.(string))
- }
- if v, ok := UserRulesMap["action"]; ok {
- aCLUserRule.Action = helper.String(v.(string))
- }
- if v, ok := UserRulesMap["rule_status"]; ok {
- aCLUserRule.RuleStatus = helper.String(v.(string))
- }
- if v, ok := UserRulesMap["conditions"]; ok {
- for _, item := range v.([]interface{}) {
- ConditionsMap := item.(map[string]interface{})
- aCLCondition := teo.ACLCondition{}
- if v, ok := ConditionsMap["match_from"]; ok {
- aCLCondition.MatchFrom = helper.String(v.(string))
- }
- if v, ok := ConditionsMap["match_param"]; ok {
- aCLCondition.MatchParam = helper.String(v.(string))
- }
- if v, ok := ConditionsMap["operator"]; ok {
- aCLCondition.Operator = helper.String(v.(string))
- }
- if v, ok := ConditionsMap["match_content"]; ok {
- aCLCondition.MatchContent = helper.String(v.(string))
- }
- aCLUserRule.Conditions = append(aCLUserRule.Conditions, &aCLCondition)
+ if BotConfigMap, ok := helper.InterfaceToMap(dMap, "bot_config"); ok {
+ botConfig := teo.BotConfig{}
+ if v, ok := BotConfigMap["switch"]; ok {
+ botConfig.Switch = helper.String(v.(string))
+ }
+ if ManagedRuleMap, ok := helper.InterfaceToMap(BotConfigMap, "managed_rule"); ok {
+ botManagedRule := teo.BotManagedRule{}
+ if v, ok := ManagedRuleMap["rule_id"]; ok && v.(int) != 0 {
+ botManagedRule.RuleID = helper.IntInt64(v.(int))
+ }
+ if v, ok := ManagedRuleMap["action"]; ok {
+ botManagedRule.Action = helper.String(v.(string))
+ }
+ if v, ok := ManagedRuleMap["trans_managed_ids"]; ok {
+ transManagedIdsSet := v.(*schema.Set).List()
+ for i := range transManagedIdsSet {
+ transManagedIds := transManagedIdsSet[i].(int)
+ botManagedRule.TransManagedIds = append(botManagedRule.TransManagedIds, helper.IntInt64(transManagedIds))
}
}
- if v, ok := UserRulesMap["rule_priority"]; ok {
- aCLUserRule.RulePriority = helper.IntInt64(v.(int))
+ if v, ok := ManagedRuleMap["alg_managed_ids"]; ok {
+ algManagedIdsSet := v.(*schema.Set).List()
+ for i := range algManagedIdsSet {
+ algManagedIds := algManagedIdsSet[i].(int)
+ botManagedRule.AlgManagedIds = append(botManagedRule.AlgManagedIds, helper.IntInt64(algManagedIds))
+ }
}
- if v, ok := UserRulesMap["punish_time"]; ok {
- aCLUserRule.PunishTime = helper.IntInt64(v.(int))
+ if v, ok := ManagedRuleMap["cap_managed_ids"]; ok {
+ capManagedIdsSet := v.(*schema.Set).List()
+ for i := range capManagedIdsSet {
+ capManagedIds := capManagedIdsSet[i].(int)
+ botManagedRule.CapManagedIds = append(botManagedRule.CapManagedIds, helper.IntInt64(capManagedIds))
+ }
}
- if v, ok := UserRulesMap["punish_time_unit"]; ok {
- aCLUserRule.PunishTimeUnit = helper.String(v.(string))
+ if v, ok := ManagedRuleMap["mon_managed_ids"]; ok {
+ monManagedIdsSet := v.(*schema.Set).List()
+ for i := range monManagedIdsSet {
+ monManagedIds := monManagedIdsSet[i].(int)
+ botManagedRule.MonManagedIds = append(botManagedRule.MonManagedIds, helper.IntInt64(monManagedIds))
+ }
}
- if v, ok := UserRulesMap["name"]; ok {
- aCLUserRule.Name = helper.String(v.(string))
+ if v, ok := ManagedRuleMap["drop_managed_ids"]; ok {
+ dropManagedIdsSet := v.(*schema.Set).List()
+ for i := range dropManagedIdsSet {
+ dropManagedIds := dropManagedIdsSet[i].(int)
+ botManagedRule.DropManagedIds = append(botManagedRule.DropManagedIds, helper.IntInt64(dropManagedIds))
+ }
}
- if v, ok := UserRulesMap["page_id"]; ok {
- aCLUserRule.PageId = helper.IntInt64(v.(int))
+ botConfig.BotManagedRule = &botManagedRule
+ }
+ if PortraitRuleMap, ok := helper.InterfaceToMap(BotConfigMap, "portrait_rule"); ok {
+ botPortraitRule := teo.BotPortraitRule{}
+ if v, ok := PortraitRuleMap["rule_id"]; ok && v.(int) != 0 {
+ botPortraitRule.RuleID = helper.IntInt64(v.(int))
}
- if v, ok := UserRulesMap["redirect_url"]; ok {
- aCLUserRule.RedirectUrl = helper.String(v.(string))
+ if v, ok := PortraitRuleMap["alg_managed_ids"]; ok {
+ algManagedIdsSet := v.(*schema.Set).List()
+ for i := range algManagedIdsSet {
+ algManagedIds := algManagedIdsSet[i].(int)
+ botPortraitRule.AlgManagedIds = append(botPortraitRule.AlgManagedIds, helper.IntInt64(algManagedIds))
+ }
}
- if v, ok := UserRulesMap["response_code"]; ok {
- aCLUserRule.ResponseCode = helper.IntInt64(v.(int))
+ if v, ok := PortraitRuleMap["cap_managed_ids"]; ok {
+ capManagedIdsSet := v.(*schema.Set).List()
+ for i := range capManagedIdsSet {
+ capManagedIds := capManagedIdsSet[i].(int)
+ botPortraitRule.CapManagedIds = append(botPortraitRule.CapManagedIds, helper.IntInt64(capManagedIds))
+ }
}
- aclConfig.UserRules = append(aclConfig.UserRules, &aCLUserRule)
- }
- }
- securityConfig.AclConfig = &aclConfig
- }
- if BotConfigMap, ok := helper.InterfaceToMap(dMap, "bot_config"); ok {
- botConfig := teo.BotConfig{}
- if v, ok := BotConfigMap["switch"]; ok {
- botConfig.Switch = helper.String(v.(string))
- }
- if ManagedRuleMap, ok := helper.InterfaceToMap(BotConfigMap, "managed_rule"); ok {
- botManagedRule := teo.BotManagedRule{}
- if v, ok := ManagedRuleMap["rule_id"]; ok {
- botManagedRule.RuleID = helper.IntInt64(v.(int))
- }
- if v, ok := ManagedRuleMap["action"]; ok {
- botManagedRule.Action = helper.String(v.(string))
- }
- if v, ok := ManagedRuleMap["punish_time"]; ok {
- botManagedRule.PunishTime = helper.IntInt64(v.(int))
- }
- if v, ok := ManagedRuleMap["punish_time_unit"]; ok {
- botManagedRule.PunishTimeUnit = helper.String(v.(string))
- }
- if v, ok := ManagedRuleMap["name"]; ok {
- botManagedRule.Name = helper.String(v.(string))
- }
- if v, ok := ManagedRuleMap["page_id"]; ok {
- botManagedRule.PageId = helper.IntInt64(v.(int))
- }
- if v, ok := ManagedRuleMap["redirect_url"]; ok {
- botManagedRule.RedirectUrl = helper.String(v.(string))
- }
- if v, ok := ManagedRuleMap["response_code"]; ok {
- botManagedRule.ResponseCode = helper.IntInt64(v.(int))
- }
- if v, ok := ManagedRuleMap["trans_managed_ids"]; ok {
- transManagedIdsSet := v.(*schema.Set).List()
- for i := range transManagedIdsSet {
- transManagedIds := transManagedIdsSet[i].(int)
- botManagedRule.TransManagedIds = append(botManagedRule.TransManagedIds, helper.IntInt64(transManagedIds))
+ if v, ok := PortraitRuleMap["mon_managed_ids"]; ok {
+ monManagedIdsSet := v.(*schema.Set).List()
+ for i := range monManagedIdsSet {
+ monManagedIds := monManagedIdsSet[i].(int)
+ botPortraitRule.MonManagedIds = append(botPortraitRule.MonManagedIds, helper.IntInt64(monManagedIds))
+ }
}
- }
- if v, ok := ManagedRuleMap["alg_managed_ids"]; ok {
- algManagedIdsSet := v.(*schema.Set).List()
- for i := range algManagedIdsSet {
- algManagedIds := algManagedIdsSet[i].(int)
- botManagedRule.AlgManagedIds = append(botManagedRule.AlgManagedIds, helper.IntInt64(algManagedIds))
+ if v, ok := PortraitRuleMap["drop_managed_ids"]; ok {
+ dropManagedIdsSet := v.(*schema.Set).List()
+ for i := range dropManagedIdsSet {
+ dropManagedIds := dropManagedIdsSet[i].(int)
+ botPortraitRule.DropManagedIds = append(botPortraitRule.DropManagedIds, helper.IntInt64(dropManagedIds))
+ }
}
- }
- if v, ok := ManagedRuleMap["cap_managed_ids"]; ok {
- capManagedIdsSet := v.(*schema.Set).List()
- for i := range capManagedIdsSet {
- capManagedIds := capManagedIdsSet[i].(int)
- botManagedRule.CapManagedIds = append(botManagedRule.CapManagedIds, helper.IntInt64(capManagedIds))
+ if v, ok := PortraitRuleMap["switch"]; ok {
+ botPortraitRule.Switch = helper.String(v.(string))
}
+ botConfig.BotPortraitRule = &botPortraitRule
}
- if v, ok := ManagedRuleMap["mon_managed_ids"]; ok {
- monManagedIdsSet := v.(*schema.Set).List()
- for i := range monManagedIdsSet {
- monManagedIds := monManagedIdsSet[i].(int)
- botManagedRule.MonManagedIds = append(botManagedRule.MonManagedIds, helper.IntInt64(monManagedIds))
+ if IntelligenceRuleMap, ok := helper.InterfaceToMap(BotConfigMap, "intelligence_rule"); ok {
+ intelligenceRule := teo.IntelligenceRule{}
+ if v, ok := IntelligenceRuleMap["switch"]; ok {
+ intelligenceRule.Switch = helper.String(v.(string))
}
- }
- if v, ok := ManagedRuleMap["drop_managed_ids"]; ok {
- dropManagedIdsSet := v.(*schema.Set).List()
- for i := range dropManagedIdsSet {
- dropManagedIds := dropManagedIdsSet[i].(int)
- botManagedRule.DropManagedIds = append(botManagedRule.DropManagedIds, helper.IntInt64(dropManagedIds))
+ if v, ok := IntelligenceRuleMap["items"]; ok {
+ for _, item := range v.([]interface{}) {
+ ItemsMap := item.(map[string]interface{})
+ intelligenceRuleItem := teo.IntelligenceRuleItem{}
+ if v, ok := ItemsMap["label"]; ok {
+ intelligenceRuleItem.Label = helper.String(v.(string))
+ }
+ if v, ok := ItemsMap["action"]; ok {
+ intelligenceRuleItem.Action = helper.String(v.(string))
+ }
+ intelligenceRule.IntelligenceRuleItems = append(intelligenceRule.IntelligenceRuleItems, &intelligenceRuleItem)
+ }
}
+ botConfig.IntelligenceRule = &intelligenceRule
}
- botConfig.ManagedRule = &botManagedRule
+ securityConfig.BotConfig = &botConfig
}
- if PortraitRuleMap, ok := helper.InterfaceToMap(BotConfigMap, "portrait_rule"); ok {
- botPortraitRule := teo.BotPortraitRule{}
- if v, ok := PortraitRuleMap["rule_id"]; ok {
- botPortraitRule.RuleID = helper.IntInt64(v.(int))
+ if SwitchConfigMap, ok := helper.InterfaceToMap(dMap, "switch_config"); ok {
+ switchConfig := teo.SwitchConfig{}
+ if v, ok := SwitchConfigMap["web_switch"]; ok {
+ switchConfig.WebSwitch = helper.String(v.(string))
}
- if v, ok := PortraitRuleMap["alg_managed_ids"]; ok {
- algManagedIdsSet := v.(*schema.Set).List()
- for i := range algManagedIdsSet {
- algManagedIds := algManagedIdsSet[i].(int)
- botPortraitRule.AlgManagedIds = append(botPortraitRule.AlgManagedIds, helper.IntInt64(algManagedIds))
- }
- }
- if v, ok := PortraitRuleMap["cap_managed_ids"]; ok {
- capManagedIdsSet := v.(*schema.Set).List()
- for i := range capManagedIdsSet {
- capManagedIds := capManagedIdsSet[i].(int)
- botPortraitRule.CapManagedIds = append(botPortraitRule.CapManagedIds, helper.IntInt64(capManagedIds))
- }
- }
- if v, ok := PortraitRuleMap["mon_managed_ids"]; ok {
- monManagedIdsSet := v.(*schema.Set).List()
- for i := range monManagedIdsSet {
- monManagedIds := monManagedIdsSet[i].(int)
- botPortraitRule.MonManagedIds = append(botPortraitRule.MonManagedIds, helper.IntInt64(monManagedIds))
- }
+ securityConfig.SwitchConfig = &switchConfig
+ }
+ if IpTableConfigMap, ok := helper.InterfaceToMap(dMap, "ip_table_config"); ok {
+ ipTableConfig := teo.IpTableConfig{}
+ if v, ok := IpTableConfigMap["switch"]; ok {
+ ipTableConfig.Switch = helper.String(v.(string))
}
- if v, ok := PortraitRuleMap["drop_managed_ids"]; ok {
- dropManagedIdsSet := v.(*schema.Set).List()
- for i := range dropManagedIdsSet {
- dropManagedIds := dropManagedIdsSet[i].(int)
- botPortraitRule.DropManagedIds = append(botPortraitRule.DropManagedIds, helper.IntInt64(dropManagedIds))
+ if v, ok := IpTableConfigMap["rules"]; ok {
+ for _, item := range v.([]interface{}) {
+ RulesMap := item.(map[string]interface{})
+ ipTableRule := teo.IpTableRule{}
+ if v, ok := RulesMap["action"]; ok {
+ ipTableRule.Action = helper.String(v.(string))
+ }
+ if v, ok := RulesMap["match_from"]; ok {
+ ipTableRule.MatchFrom = helper.String(v.(string))
+ }
+ if v, ok := RulesMap["match_content"]; ok {
+ ipTableRule.MatchContent = helper.String(v.(string))
+ }
+ if v, ok := RulesMap["rule_id"]; ok && v.(int) != 0 {
+ ipTableRule.RuleID = helper.IntInt64(v.(int))
+ }
+ ipTableConfig.IpTableRules = append(ipTableConfig.IpTableRules, &ipTableRule)
}
}
- if v, ok := PortraitRuleMap["switch"]; ok {
- botPortraitRule.Switch = helper.String(v.(string))
- }
- botConfig.PortraitRule = &botPortraitRule
+ securityConfig.IpTableConfig = &ipTableConfig
}
- if IntelligenceRuleMap, ok := helper.InterfaceToMap(BotConfigMap, "intelligence_rule"); ok {
- intelligenceRule := teo.IntelligenceRule{}
- if v, ok := IntelligenceRuleMap["switch"]; ok {
- intelligenceRule.Switch = helper.String(v.(string))
+ if ExceptConfigMap, ok := helper.InterfaceToMap(dMap, "except_config"); ok {
+ exceptConfig := teo.ExceptConfig{}
+ if v, ok := ExceptConfigMap["switch"]; ok {
+ exceptConfig.Switch = helper.String(v.(string))
}
- if v, ok := IntelligenceRuleMap["items"]; ok {
+ if v, ok := ExceptConfigMap["except_user_rules"]; ok {
for _, item := range v.([]interface{}) {
- ItemsMap := item.(map[string]interface{})
- intelligenceRuleItem := teo.IntelligenceRuleItem{}
- if v, ok := ItemsMap["label"]; ok {
- intelligenceRuleItem.Label = helper.String(v.(string))
+ ExceptUserRulesMap := item.(map[string]interface{})
+ exceptUserRule := teo.ExceptUserRule{}
+ if v, ok := ExceptUserRulesMap["action"]; ok {
+ exceptUserRule.Action = helper.String(v.(string))
}
- if v, ok := ItemsMap["action"]; ok {
- intelligenceRuleItem.Action = helper.String(v.(string))
+ if v, ok := ExceptUserRulesMap["rule_status"]; ok {
+ exceptUserRule.RuleStatus = helper.String(v.(string))
+ }
+ if v, ok := ExceptUserRulesMap["rule_priority"]; ok {
+ exceptUserRule.RulePriority = helper.IntInt64(v.(int))
+ }
+ if v, ok := ExceptUserRulesMap["except_user_rule_conditions"]; ok {
+ for _, item := range v.([]interface{}) {
+ ExceptUserRuleConditionsMap := item.(map[string]interface{})
+ exceptUserRuleCondition := teo.ExceptUserRuleCondition{}
+ if v, ok := ExceptUserRuleConditionsMap["match_from"]; ok {
+ exceptUserRuleCondition.MatchFrom = helper.String(v.(string))
+ }
+ if v, ok := ExceptUserRuleConditionsMap["match_param"]; ok {
+ exceptUserRuleCondition.MatchParam = helper.String(v.(string))
+ }
+ if v, ok := ExceptUserRuleConditionsMap["operator"]; ok {
+ exceptUserRuleCondition.Operator = helper.String(v.(string))
+ }
+ if v, ok := ExceptUserRuleConditionsMap["match_content"]; ok {
+ exceptUserRuleCondition.MatchContent = helper.String(v.(string))
+ }
+ exceptUserRule.ExceptUserRuleConditions = append(exceptUserRule.ExceptUserRuleConditions, &exceptUserRuleCondition)
+ }
}
- intelligenceRule.Items = append(intelligenceRule.Items, &intelligenceRuleItem)
+ if ExceptUserRuleScopeMap, ok := helper.InterfaceToMap(ExceptUserRulesMap, "except_user_rule_scope"); ok {
+ exceptUserRuleScope := teo.ExceptUserRuleScope{}
+ if v, ok := ExceptUserRuleScopeMap["modules"]; ok {
+ modulesSet := v.(*schema.Set).List()
+ for i := range modulesSet {
+ modules := modulesSet[i].(string)
+ exceptUserRuleScope.Modules = append(exceptUserRuleScope.Modules, &modules)
+ }
+ }
+ exceptUserRule.ExceptUserRuleScope = &exceptUserRuleScope
+ }
+ exceptConfig.ExceptUserRules = append(exceptConfig.ExceptUserRules, &exceptUserRule)
}
}
- botConfig.IntelligenceRule = &intelligenceRule
- }
- securityConfig.BotConfig = &botConfig
- }
- if SwitchConfigMap, ok := helper.InterfaceToMap(dMap, "switch_config"); ok {
- switchConfig := teo.SwitchConfig{}
- if v, ok := SwitchConfigMap["web_switch"]; ok {
- switchConfig.WebSwitch = helper.String(v.(string))
+ securityConfig.ExceptConfig = &exceptConfig
}
- securityConfig.SwitchConfig = &switchConfig
- }
- if IpTableConfigMap, ok := helper.InterfaceToMap(dMap, "ip_table_config"); ok {
- ipTableConfig := teo.IpTableConfig{}
- if v, ok := IpTableConfigMap["switch"]; ok {
- ipTableConfig.Switch = helper.String(v.(string))
- }
- if v, ok := IpTableConfigMap["rules"]; ok {
- for _, item := range v.([]interface{}) {
- RulesMap := item.(map[string]interface{})
- ipTableRule := teo.IpTableRule{}
- if v, ok := RulesMap["action"]; ok {
- ipTableRule.Action = helper.String(v.(string))
+ if DropPageConfigMap, ok := helper.InterfaceToMap(dMap, "drop_page_config"); ok {
+ dropPageConfig := teo.DropPageConfig{}
+ if v, ok := DropPageConfigMap["switch"]; ok {
+ dropPageConfig.Switch = helper.String(v.(string))
+ }
+ if WafDropPageDetailMap, ok := helper.InterfaceToMap(DropPageConfigMap, "waf_drop_page_detail"); ok {
+ dropPageDetail := teo.DropPageDetail{}
+ if v, ok := WafDropPageDetailMap["page_id"]; ok {
+ dropPageDetail.PageId = helper.IntInt64(v.(int))
}
- if v, ok := RulesMap["match_from"]; ok {
- ipTableRule.MatchFrom = helper.String(v.(string))
+ if v, ok := WafDropPageDetailMap["status_code"]; ok {
+ dropPageDetail.StatusCode = helper.IntInt64(v.(int))
}
- if v, ok := RulesMap["match_content"]; ok {
- ipTableRule.MatchContent = helper.String(v.(string))
+ if v, ok := WafDropPageDetailMap["name"]; ok {
+ dropPageDetail.Name = helper.String(v.(string))
}
- if v, ok := RulesMap["rule_id"]; ok {
- ipTableRule.RuleID = helper.IntInt64(v.(int))
+ if v, ok := WafDropPageDetailMap["type"]; ok {
+ dropPageDetail.Type = helper.String(v.(string))
}
- ipTableConfig.Rules = append(ipTableConfig.Rules, &ipTableRule)
+ dropPageConfig.WafDropPageDetail = &dropPageDetail
}
+ if AclDropPageDetailMap, ok := helper.InterfaceToMap(DropPageConfigMap, "acl_drop_page_detail"); ok {
+ dropPageDetail := teo.DropPageDetail{}
+ if v, ok := AclDropPageDetailMap["page_id"]; ok {
+ dropPageDetail.PageId = helper.IntInt64(v.(int))
+ }
+ if v, ok := AclDropPageDetailMap["status_code"]; ok {
+ dropPageDetail.StatusCode = helper.IntInt64(v.(int))
+ }
+ if v, ok := AclDropPageDetailMap["name"]; ok {
+ dropPageDetail.Name = helper.String(v.(string))
+ }
+ if v, ok := AclDropPageDetailMap["type"]; ok {
+ dropPageDetail.Type = helper.String(v.(string))
+ }
+ dropPageConfig.AclDropPageDetail = &dropPageDetail
+ }
+ securityConfig.DropPageConfig = &dropPageConfig
}
- securityConfig.IpTableConfig = &ipTableConfig
+ request.SecurityConfig = &securityConfig
}
-
- request.Config = &securityConfig
}
err := resource.Retry(writeRetryTimeout, func() *resource.RetryError {
diff --git a/tencentcloud/resource_tc_teo_zone.go b/tencentcloud/resource_tc_teo_zone.go
index e8f8a401b8..58d2b4edb5 100644
--- a/tencentcloud/resource_tc_teo_zone.go
+++ b/tencentcloud/resource_tc_teo_zone.go
@@ -5,17 +5,26 @@ Example Usage
```hcl
resource "tencentcloud_teo_zone" "zone" {
- name = "sfurnace.work"
- plan_type = "ent_cm_with_bot"
- type = "full"
- paused = false
+ zone_name = "toutiao2.com"
+ plan_type = "sta"
+ type = "full"
+ paused = false
+# vanity_name_servers {
+# switch = ""
+# servers = ""
+#
+# }
cname_speed_up = "enabled"
-
- # vanity_name_servers {
- # switch = "on"
- # servers = ["2.2.2.2"]
- # }
+# tags {
+# tag_key = ""
+# tag_value = ""
+#
+# }
+ tags = {
+ "createdBy" = "terraform"
+ }
}
+
```
Import
@@ -28,13 +37,12 @@ package tencentcloud
import (
"context"
- "errors"
"fmt"
"log"
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
- teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220106"
+ teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901"
"github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"
)
@@ -48,7 +56,13 @@ func resourceTencentCloudTeoZone() *schema.Resource {
State: schema.ImportStatePassthrough,
},
Schema: map[string]*schema.Schema{
- "name": {
+ "zone_id": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Site ID.",
+ },
+
+ "zone_name": {
Type: schema.TypeString,
Required: true,
Description: "Site name.",
@@ -60,13 +74,19 @@ func resourceTencentCloudTeoZone() *schema.Resource {
Description: "Plan type of the zone. See details in data source `zone_available_plans`.",
},
+ "area": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Acceleration area of the zone. Valid values: `mainland`, `overseas`.",
+ },
+
"original_name_servers": {
Type: schema.TypeSet,
Elem: &schema.Schema{
Type: schema.TypeString,
},
Computed: true,
- Description: "List of name servers used.",
+ Description: "Name server used by the site.",
},
"name_servers": {
@@ -75,20 +95,20 @@ func resourceTencentCloudTeoZone() *schema.Resource {
Type: schema.TypeString,
},
Computed: true,
- Description: "List of name servers assigned to users by Tencent Cloud.",
+ Description: "List of name servers assigned by Tencent Cloud.",
},
"status": {
Type: schema.TypeString,
Computed: true,
- Description: "Site status.",
+ Description: "Site status. Valid values:- `active`: NS is switched.- `pending`: NS is not switched.- `moved`: NS is moved.- `deactivated`: this site is blocked.",
},
"type": {
Type: schema.TypeString,
Optional: true,
Computed: true,
- Description: "Specifies how the site is connected to EdgeOne.",
+ Description: "Specifies how the site is connected to EdgeOne.- `full`: The site is connected via NS.- `partial`: The site is connected via CNAME.",
},
"paused": {
@@ -114,14 +134,13 @@ func resourceTencentCloudTeoZone() *schema.Resource {
Type: schema.TypeList,
MaxItems: 1,
Optional: true,
- Computed: true,
- Description: "User-defined name server information.",
+ Description: "User-defined name server information. Note: This field may return null, indicating that no valid value can be obtained.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"switch": {
Type: schema.TypeString,
Required: true,
- Description: "Whether to enable the custom name server.",
+ Description: "Whether to enable the custom name server.- `on`: Enable.- `off`: Disable.",
},
"servers": {
Type: schema.TypeSet,
@@ -129,7 +148,6 @@ func resourceTencentCloudTeoZone() *schema.Resource {
Type: schema.TypeString,
},
Optional: true,
- Computed: true,
Description: "List of custom name servers.",
},
},
@@ -139,7 +157,7 @@ func resourceTencentCloudTeoZone() *schema.Resource {
"vanity_name_servers_ips": {
Type: schema.TypeList,
Computed: true,
- Description: "User-defined name server IP information.",
+ Description: "User-defined name server IP information. Note: This field may return null, indicating that no valid value can be obtained.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"name": {
@@ -160,13 +178,87 @@ func resourceTencentCloudTeoZone() *schema.Resource {
Type: schema.TypeString,
Optional: true,
Computed: true,
- Description: "Specifies whether to enable CNAME acceleration, enabled: Enable; disabled: Disable.",
+ Description: "Specifies whether CNAME acceleration is enabled. Valid values: `enabled`, `disabled`.",
},
"cname_status": {
Type: schema.TypeString,
Computed: true,
- Description: "Ownership verification status of the site when it accesses via CNAME.",
+ Description: "Ownership verification status of the site when it accesses via CNAME.- `finished`: The site is verified.- `pending`: The site is waiting for verification.",
+ },
+
+ "resources": {
+ Type: schema.TypeList,
+ Computed: true,
+ Description: "Billing resources of the zone.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "id": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Resource ID.",
+ },
+ "create_time": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Resource creation date.",
+ },
+ "pay_mode": {
+ Type: schema.TypeInt,
+ Computed: true,
+ Description: "Resource pay mode. Valid values:- `0`: post pay mode.",
+ },
+ "enable_time": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Enable time of the resource.",
+ },
+ "expire_time": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Expire time of the resource.",
+ },
+ "status": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Status of the resource. Valid values: `normal`, `isolated`, `destroyed`.",
+ },
+ "sv": {
+ Type: schema.TypeList,
+ Computed: true,
+ Description: "Price inquiry parameters.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "key": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Parameter Key.",
+ },
+ "value": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Parameter Value.",
+ },
+ },
+ },
+ },
+ "auto_renew_flag": {
+ Type: schema.TypeInt,
+ Computed: true,
+ Description: "Whether to automatically renew. Valid values:- `0`: Default.- `1`: Enable automatic renewal.- `2`: Disable automatic renewal.",
+ },
+ "plan_id": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Associated plan ID.",
+ },
+ "area": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Valid values: `mainland`, `overseas`.",
+ },
+ },
+ },
},
"tags": {
@@ -174,11 +266,6 @@ func resourceTencentCloudTeoZone() *schema.Resource {
Optional: true,
Description: "Tag description list.",
},
- "area": {
- Type: schema.TypeString,
- Computed: true,
- Description: "Acceleration area of the zone. Valid values: `mainland`, `overseas`.",
- },
},
}
}
@@ -192,70 +279,75 @@ func resourceTencentCloudTeoZoneCreate(d *schema.ResourceData, meta interface{})
var (
request = teo.NewCreateZoneRequest()
response *teo.CreateZoneResponse
+ zoneId string
+ zoneName string
+ planType string
)
- if v, ok := d.GetOk("name"); ok {
- request.Name = helper.String(v.(string))
+ if v, ok := d.GetOk("zone_name"); ok {
+ zoneName = v.(string)
+ request.ZoneName = &zoneName
+ }
+
+ if v, ok := d.GetOk("plan_type"); ok {
+ planType = v.(string)
}
- if v, ok := d.GetOk("type"); ok {
+ if v, _ := d.GetOk("type"); v != nil {
request.Type = helper.String(v.(string))
}
- if dMap, ok := helper.InterfacesHeadMap(d, "vanity_name_servers"); ok {
- vanityNameServers := teo.VanityNameServers{}
- if v, ok := dMap["switch"]; ok {
- vanityNameServers.Switch = helper.String(v.(string))
- }
- if v, ok := dMap["servers"]; ok {
- serversSet := v.(*schema.Set).List()
- for i := range serversSet {
- servers := serversSet[i].(string)
- vanityNameServers.Servers = append(vanityNameServers.Servers, &servers)
+ err := resource.Retry(writeRetryTimeout, func() *resource.RetryError {
+ result, e := meta.(*TencentCloudClient).apiV3Conn.UseTeoClient().CreateZone(request)
+ if e != nil {
+ if isExpectError(e, []string{"ResourceInUse", "ResourceInUse.Others"}) {
+ return resource.NonRetryableError(e)
}
+ return retryError(e)
+ } else {
+ log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
+ logId, request.GetAction(), request.ToJsonString(), result.ToJsonString())
}
- }
-
- result, e := meta.(*TencentCloudClient).apiV3Conn.UseTeoClient().CreateZone(request)
- if e != nil {
- return 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
+ response = result
+ return nil
+ })
- if response == nil || response.Response == nil || response.Response.Id == nil {
- return errors.New("CreateZone create teo zone failed")
+ if err != nil {
+ log.Printf("[CRITAL]%s create teo zone failed, reason:%+v", logId, err)
+ return err
}
- zoneId := *response.Response.Id
-
- var planRequest = teo.NewCreatePlanForZoneRequest()
- planRequest.ZoneId = &zoneId
- if v, ok := d.GetOk("plan_type"); ok {
- planRequest.PlanType = helper.String(v.(string))
- }
+ zoneId = *response.Response.ZoneId
+ d.SetId(zoneId)
- resultPlan, err := meta.(*TencentCloudClient).apiV3Conn.UseTeoClient().CreatePlanForZone(planRequest)
- if e != nil {
- log.Printf("[CRITAL]%s create teo zone plan failed, reason:%+v", logId, e)
- return err
- } else {
- log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
- logId, request.GetAction(), request.ToJsonString(), resultPlan.ToJsonString())
+ if zoneId != "" {
+ var planRequest = teo.NewCreatePlanForZoneRequest()
+ planRequest.ZoneId = &zoneId
+ planRequest.PlanType = &planType
+ planErr := resource.Retry(writeRetryTimeout, func() *resource.RetryError {
+ result, e := meta.(*TencentCloudClient).apiV3Conn.UseTeoClient().CreatePlanForZone(planRequest)
+ if e != nil {
+ return 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 planErr != nil {
+ log.Printf("[CRITAL]%s create teo zone failed, reason:%+v", logId, planErr)
+ return planErr
+ }
}
ctx := context.WithValue(context.TODO(), logIdKey, logId)
if tags := helper.GetTags(d, "tags"); len(tags) > 0 {
tagService := TagService{client: meta.(*TencentCloudClient).apiV3Conn}
- region := meta.(*TencentCloudClient).apiV3Conn.Region
- resourceName := fmt.Sprintf("qcs::teo:%s:uin/:zone/%s", region, zoneId)
+ resourceName := fmt.Sprintf("qcs::teo::uin/:zone/%s", zoneName)
if err := tagService.ModifyTags(ctx, resourceName, tags, nil); err != nil {
return err
}
}
- d.SetId(zoneId)
return resourceTencentCloudTeoZoneRead(d, meta)
}
@@ -281,12 +373,16 @@ func resourceTencentCloudTeoZoneRead(d *schema.ResourceData, meta interface{}) e
return fmt.Errorf("resource `zone` %s does not exist", zoneId)
}
- if zone.Id != nil {
- _ = d.Set("id", zone.Id)
+ if zone.ZoneId != nil {
+ _ = d.Set("zone_id", zone.ZoneId)
+ }
+
+ if zone.ZoneName != nil {
+ _ = d.Set("zone_name", zone.ZoneName)
}
- if zone.Name != nil {
- _ = d.Set("name", zone.Name)
+ if zone.Area != nil {
+ _ = d.Set("area", zone.Area)
}
if zone.OriginalNameServers != nil {
@@ -353,18 +449,70 @@ func resourceTencentCloudTeoZoneRead(d *schema.ResourceData, meta interface{}) e
_ = d.Set("cname_status", zone.CnameStatus)
}
+ if zone.Resources != nil {
+ resourcesList := []interface{}{}
+ for _, resources := range zone.Resources {
+ resourcesMap := map[string]interface{}{}
+ if resources.Id != nil {
+ resourcesMap["id"] = resources.Id
+ }
+ if resources.CreateTime != nil {
+ resourcesMap["create_time"] = resources.CreateTime
+ }
+ if resources.PayMode != nil {
+ resourcesMap["pay_mode"] = resources.PayMode
+ }
+ if resources.EnableTime != nil {
+ resourcesMap["enable_time"] = resources.EnableTime
+ }
+ if resources.ExpireTime != nil {
+ resourcesMap["expire_time"] = resources.ExpireTime
+ }
+ if resources.Status != nil {
+ resourcesMap["status"] = resources.Status
+ }
+ if resources.Sv != nil {
+ svList := []interface{}{}
+ for _, sv := range resources.Sv {
+ svMap := map[string]interface{}{}
+ if sv.Key != nil {
+ svMap["key"] = sv.Key
+ }
+ if sv.Value != nil {
+ svMap["value"] = sv.Value
+ }
+
+ svList = append(svList, svMap)
+ }
+ resourcesMap["sv"] = svList
+ }
+ if resources.AutoRenewFlag != nil {
+ resourcesMap["auto_renew_flag"] = resources.AutoRenewFlag
+ }
+ if resources.PlanId != nil {
+ resourcesMap["plan_id"] = resources.PlanId
+ }
+ if resources.Area != nil {
+ resourcesMap["area"] = resources.Area
+ }
+
+ resourcesList = append(resourcesList, resourcesMap)
+ }
+ _ = d.Set("resources", resourcesList)
+ }
+
+ if zone.Area != nil {
+ _ = d.Set("area", zone.Area)
+ }
+
tcClient := meta.(*TencentCloudClient).apiV3Conn
tagService := &TagService{client: tcClient}
- tags, err := tagService.DescribeResourceTags(ctx, "teo", "zone", tcClient.Region, d.Id())
+ tags, err := tagService.DescribeResourceTags(ctx, "teo", "zone", "", *zone.ZoneName)
if err != nil {
return err
}
_ = d.Set("tags", tags)
- if zone.Area != nil {
- _ = d.Set("area", zone.Area)
- }
-
return nil
}
@@ -377,10 +525,16 @@ func resourceTencentCloudTeoZoneUpdate(d *schema.ResourceData, meta interface{})
request := teo.NewModifyZoneRequest()
- request.Id = helper.String(d.Id())
+ zoneId := d.Id()
+ request.ZoneId = &zoneId
+
+ if d.HasChange("zone_name") {
+ return fmt.Errorf("`zone_name` do not support change now.")
+ }
- if d.HasChange("name") {
- return fmt.Errorf("`name` do not support change now.")
+ if d.HasChange("plan_type") {
+ log.Printf("[WARN] change `plan_type` is not supported now.")
+ _ = d.Set("plan_type", d.Get("plan_type"))
}
if d.HasChange("type") {
@@ -418,59 +572,41 @@ func resourceTencentCloudTeoZoneUpdate(d *schema.ResourceData, meta interface{})
})
if err != nil {
+ log.Printf("[CRITAL]%s create teo zone failed, reason:%+v", logId, err)
return err
}
- if d.HasChange("tags") {
- tcClient := meta.(*TencentCloudClient).apiV3Conn
- tagService := &TagService{client: tcClient}
- oldTags, newTags := d.GetChange("tags")
- replaceTags, deleteTags := diffTags(oldTags.(map[string]interface{}), newTags.(map[string]interface{}))
- resourceName := BuildTagResourceName("teo", "zone", tcClient.Region, d.Id())
- if err := tagService.ModifyTags(ctx, resourceName, replaceTags, deleteTags); err != nil {
- return err
+ if d.HasChange("paused") {
+ if v := d.Get("paused"); v != nil {
+ req := teo.NewModifyZoneStatusRequest()
+ req.ZoneId, req.Paused = &zoneId, helper.Bool(v.(bool))
+ _, e := meta.(*TencentCloudClient).apiV3Conn.UseTeoClient().ModifyZoneStatus(req)
+ if e != nil {
+ log.Printf("[CRITAL]%s modify zone status failed, reason:%+v", logId, err)
+ return err
+ }
}
}
if d.HasChange("cname_speed_up") {
- requestCnameSpeedUp := teo.NewModifyZoneCnameSpeedUpRequest()
- requestCnameSpeedUp.Id = helper.String(d.Id())
if v, ok := d.GetOk("cname_speed_up"); ok {
- requestCnameSpeedUp.Status = helper.String(v.(string))
- }
- err := resource.Retry(writeRetryTimeout, func() *resource.RetryError {
- result, e := meta.(*TencentCloudClient).apiV3Conn.UseTeoClient().ModifyZoneCnameSpeedUp(requestCnameSpeedUp)
+ req := teo.NewModifyZoneCnameSpeedUpRequest()
+ req.ZoneId, req.Status = &zoneId, helper.String(v.(string))
+ _, e := meta.(*TencentCloudClient).apiV3Conn.UseTeoClient().ModifyZoneCnameSpeedUp(req)
if e != nil {
- return retryError(e)
- } else {
- log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
- logId, request.GetAction(), request.ToJsonString(), result.ToJsonString())
+ log.Printf("[CRITAL]%s modify zone cname_speed_up failed, reason:%+v", logId, err)
+ return err
}
- return nil
- })
-
- if err != nil {
- return err
}
}
- if d.HasChange("paused") {
- requestPaused := teo.NewModifyZoneStatusRequest()
- requestPaused.Id = helper.String(d.Id())
- v, _ := d.GetOk("paused")
- requestPaused.Paused = helper.Bool(v.(bool))
- err := resource.Retry(writeRetryTimeout, func() *resource.RetryError {
- result, e := meta.(*TencentCloudClient).apiV3Conn.UseTeoClient().ModifyZoneStatus(requestPaused)
- if e != nil {
- return 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 {
+ if d.HasChange("tags") {
+ tcClient := meta.(*TencentCloudClient).apiV3Conn
+ tagService := &TagService{client: tcClient}
+ oldTags, newTags := d.GetChange("tags")
+ replaceTags, deleteTags := diffTags(oldTags.(map[string]interface{}), newTags.(map[string]interface{}))
+ resourceName := BuildTagResourceName("teo", "zone", "", d.Get("zone_name").(string))
+ if err := tagService.ModifyTags(ctx, resourceName, replaceTags, deleteTags); err != nil {
return err
}
}
diff --git a/tencentcloud/resource_tc_teo_zone_setting.go b/tencentcloud/resource_tc_teo_zone_setting.go
index 16e71131f5..63962818e8 100644
--- a/tencentcloud/resource_tc_teo_zone_setting.go
+++ b/tencentcloud/resource_tc_teo_zone_setting.go
@@ -5,11 +5,12 @@ Example Usage
```hcl
resource "tencentcloud_teo_zone_setting" "zone_setting" {
- zone_id = tencentcloud_teo_zone.zone.id
+ zone_id = "zone-297z8rf93cfw"
cache {
+
follow_origin {
- switch = "off"
+ switch = "on"
}
no_cache {
@@ -18,13 +19,13 @@ resource "tencentcloud_teo_zone_setting" "zone_setting" {
}
cache_key {
- full_url_cache = "off"
- ignore_case = "on"
+ full_url_cache = "on"
+ ignore_case = "off"
query_string {
- action = "excludeCustom"
- switch = "on"
- value = ["test", "apple"]
+ action = "includeCustom"
+ switch = "off"
+ value = []
}
}
@@ -38,18 +39,24 @@ resource "tencentcloud_teo_zone_setting" "zone_setting" {
}
compression {
- switch = "off"
+ algorithms = [
+ "brotli",
+ "gzip",
+ ]
+ switch = "on"
}
force_redirect {
redirect_status_code = 302
- switch = "on"
+ switch = "off"
}
https {
http2 = "on"
ocsp_stapling = "off"
tls_version = [
+ "TLSv1",
+ "TLSv1.1",
"TLSv1.2",
"TLSv1.3",
]
@@ -62,17 +69,23 @@ resource "tencentcloud_teo_zone_setting" "zone_setting" {
}
}
+ ipv6 {
+ switch = "off"
+ }
+
max_age {
- follow_origin = "off"
- max_age_time = 600
+ follow_origin = "on"
+ max_age_time = 0
}
offline_cache {
- switch = "off"
+ switch = "on"
}
origin {
+ backup_origins = []
origin_pull_protocol = "follow"
+ origins = []
}
post_max_size {
@@ -81,11 +94,11 @@ resource "tencentcloud_teo_zone_setting" "zone_setting" {
}
quic {
- switch = "on"
+ switch = "off"
}
smart_routing {
- switch = "on"
+ switch = "off"
}
upstream_http2 {
@@ -101,9 +114,9 @@ resource "tencentcloud_teo_zone_setting" "zone_setting" {
```
Import
-teo zone_setting can be imported using the id, e.g.
+teo zone_setting can be imported using the zone_id, e.g.
```
-$ terraform import tencentcloud_teo_zone_setting.zone_setting zone_id
+$ terraform import tencentcloud_teo_zone_setting.zone_setting zone-297z8rf93cfw#
```
*/
package tencentcloud
@@ -112,10 +125,11 @@ import (
"context"
"fmt"
"log"
+ "time"
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
- teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220106"
+ teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901"
"github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"
)
@@ -132,9 +146,16 @@ func resourceTencentCloudTeoZoneSetting() *schema.Resource {
"zone_id": {
Type: schema.TypeString,
Required: true,
+ ForceNew: true,
Description: "Site ID.",
},
+ "area": {
+ Type: schema.TypeString,
+ Computed: true,
+ Description: "Acceleration area of the zone. Valid values: `mainland`, `overseas`.",
+ },
+
"cache": {
Type: schema.TypeList,
MaxItems: 1,
@@ -148,26 +169,26 @@ func resourceTencentCloudTeoZoneSetting() *schema.Resource {
MaxItems: 1,
Optional: true,
Computed: true,
- Description: "Cache configuration.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "Cache configuration. Note: This field may return null, indicating that no valid value can be obtained.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"switch": {
Type: schema.TypeString,
Optional: true,
Computed: true,
- Description: "Cache configuration switch.- on: Enable.- off: Disable.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "Cache configuration switch.- `on`: Enable.- `off`: Disable. Note: This field may return null, indicating that no valid value can be obtained.",
},
"cache_time": {
Type: schema.TypeInt,
Optional: true,
Computed: true,
- Description: "Cache expiration time settings.Unit: second. The maximum value is 365 days.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "Cache expiration time settings.Unit: second. The maximum value is 365 days. Note: This field may return null, indicating that no valid value can be obtained.",
},
"ignore_cache_control": {
Type: schema.TypeString,
Optional: true,
Computed: true,
- Description: "Specifies whether to enable force cache.- on: Enable.- off: Disable.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "Specifies whether to enable force cache.- `on`: Enable.- `off`: Disable. Note: This field may return null, indicating that no valid value can be obtained.",
},
},
},
@@ -177,14 +198,14 @@ func resourceTencentCloudTeoZoneSetting() *schema.Resource {
MaxItems: 1,
Optional: true,
Computed: true,
- Description: "No-cache configuration.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "No-cache configuration. Note: This field may return null, indicating that no valid value can be obtained.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"switch": {
Type: schema.TypeString,
Optional: true,
Computed: true,
- Description: "Whether to cache the configuration.- on: Do not cache.- off: Cache.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "Whether to cache the configuration.- `on`: Do not cache.- `off`: Cache. Note: This field may return null, indicating that no valid value can be obtained.",
},
},
},
@@ -194,13 +215,14 @@ func resourceTencentCloudTeoZoneSetting() *schema.Resource {
MaxItems: 1,
Optional: true,
Computed: true,
- Description: "Follows the origin server configuration.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "Follows the origin server configuration. Note: This field may return null, indicating that no valid value can be obtained.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"switch": {
Type: schema.TypeString,
- Required: true,
- Description: "According to the configuration switch of the origin site, the values are: on: open; off: off.",
+ Optional: true,
+ Computed: true,
+ Description: "Specifies whether to follow the origin server configuration.- `on`: Enable.- `off`: Disable. Note: This field may return null, indicating that no valid value can be obtained.",
},
},
},
@@ -220,29 +242,29 @@ func resourceTencentCloudTeoZoneSetting() *schema.Resource {
"full_url_cache": {
Type: schema.TypeString,
Optional: true,
- Description: "Specifies whether to enable full-path cache.- on: Enable full-path cache (i.e., disable Ignore Query String).- off: Disable full-path cache (i.e., enable Ignore Query String).Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "Specifies whether to enable full-path cache.- `on`: Enable full-path cache (i.e., disable Ignore Query String).- `off`: Disable full-path cache (i.e., enable Ignore Query String). Note: This field may return null, indicating that no valid value can be obtained.",
},
"ignore_case": {
Type: schema.TypeString,
Optional: true,
- Description: "Specifies whether the cache key is case-sensitive.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "Specifies whether the cache key is case-sensitive. Note: This field may return null, indicating that no valid value can be obtained.",
},
"query_string": {
Type: schema.TypeList,
MaxItems: 1,
Optional: true,
- Description: "Request parameter contained in CacheKey.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "Request parameter contained in CacheKey. Note: This field may return null, indicating that no valid value can be obtained.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"switch": {
Type: schema.TypeString,
Required: true,
- Description: "Whether to use QueryString as part of CacheKey.- on: Enable.- off: Disable.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "Whether to use QueryString as part of CacheKey.- `on`: Enable.- `off`: Disable. Note: This field may return null, indicating that no valid value can be obtained.",
},
"action": {
Type: schema.TypeString,
Optional: true,
- Description: "- includeCustom: Include the specified query strings.- excludeCustom: Exclude the specified query strings.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "- `includeCustom`: Include the specified query strings.- `excludeCustom`: Exclude the specified query strings. Note: This field may return null, indicating that no valid value can be obtained.",
},
"value": {
Type: schema.TypeSet,
@@ -250,7 +272,7 @@ func resourceTencentCloudTeoZoneSetting() *schema.Resource {
Type: schema.TypeString,
},
Optional: true,
- Description: "Array of query strings used/excluded.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "Array of query strings used/excluded. Note: This field may return null, indicating that no valid value can be obtained.",
},
},
},
@@ -270,12 +292,12 @@ func resourceTencentCloudTeoZoneSetting() *schema.Resource {
"max_age_time": {
Type: schema.TypeInt,
Optional: true,
- Description: "Specifies the max age of the cache (in seconds). The maximum value is 365 days.Note: the value 0 means not to cache.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "Specifies the max age of the cache (in seconds). The maximum value is 365 days. Note: the value 0 means not to cache. Note: This field may return null, indicating that no valid value can be obtained.",
},
"follow_origin": {
Type: schema.TypeString,
Optional: true,
- Description: "Specifies whether to follow the max cache age of the origin server.- on: Enable.- off: Disable.If it's on, MaxAgeTime is ignored.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "Specifies whether to follow the max cache age of the origin server.- `on`: Enable.- `off`: Disable.If it's on, MaxAgeTime is ignored. Note: This field may return null, indicating that no valid value can be obtained.",
},
},
},
@@ -292,7 +314,7 @@ func resourceTencentCloudTeoZoneSetting() *schema.Resource {
"switch": {
Type: schema.TypeString,
Required: true,
- Description: "Whether to enable offline cache.- on: Enable.- off: Disable.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "Whether to enable offline cache.- `on`: Enable.- `off`: Disable. Note: This field may return null, indicating that no valid value can be obtained.",
},
},
},
@@ -309,7 +331,7 @@ func resourceTencentCloudTeoZoneSetting() *schema.Resource {
"switch": {
Type: schema.TypeString,
Required: true,
- Description: "Whether to enable QUIC.- on: Enable.- off: Disable.",
+ Description: "Whether to enable QUIC.- `on`: Enable.- `off`: Disable.",
},
},
},
@@ -326,12 +348,12 @@ func resourceTencentCloudTeoZoneSetting() *schema.Resource {
"switch": {
Type: schema.TypeString,
Required: true,
- Description: "Specifies whether to enable custom setting of the maximum file size.- on: Enable. You can set a custom max size.- off: Disable. In this case, the max size defaults to 32 MB.",
+ Description: "Specifies whether to enable custom setting of the maximum file size.- `on`: Enable. You can set a custom max size.- `off`: Disable. In this case, the max size defaults to 32 MB.",
},
"max_size": {
Type: schema.TypeInt,
Optional: true,
- Description: "Maximum size. Value range: 1-500 MB.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "Maximum size. Value range: 1-500 MB. Note: This field may return null, indicating that no valid value can be obtained.",
},
},
},
@@ -348,7 +370,16 @@ func resourceTencentCloudTeoZoneSetting() *schema.Resource {
"switch": {
Type: schema.TypeString,
Required: true,
- Description: "Whether to enable Smart compression.- on: Enable.- off: Disable.",
+ Description: "Whether to enable Smart compression.- `on`: Enable.- `off`: Disable.",
+ },
+ "algorithms": {
+ Type: schema.TypeSet,
+ Elem: &schema.Schema{
+ Type: schema.TypeString,
+ },
+ Optional: true,
+ Computed: true,
+ Description: "Compression algorithms to select. Valid values: `brotli`, `gzip`.",
},
},
},
@@ -365,7 +396,7 @@ func resourceTencentCloudTeoZoneSetting() *schema.Resource {
"switch": {
Type: schema.TypeString,
Required: true,
- Description: "Whether to enable HTTP2 origin-pull.- on: Enable.- off: Disable.",
+ Description: "Whether to enable HTTP2 origin-pull.- `on`: Enable.- `off`: Disable.",
},
},
},
@@ -382,12 +413,12 @@ func resourceTencentCloudTeoZoneSetting() *schema.Resource {
"switch": {
Type: schema.TypeString,
Required: true,
- Description: "Whether to enable force redirect.- on: Enable.- off: Disable.",
+ Description: "Whether to enable force redirect.- `on`: Enable.- `off`: Disable.",
},
"redirect_status_code": {
Type: schema.TypeInt,
Optional: true,
- Description: "Redirection status code.- 301- 302Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "Redirection status code.- 301- 302 Note: This field may return null, indicating that no valid value can be obtained.",
},
},
},
@@ -404,12 +435,12 @@ func resourceTencentCloudTeoZoneSetting() *schema.Resource {
"http2": {
Type: schema.TypeString,
Optional: true,
- Description: "HTTP2 configuration switch.- on: Enable.- off: Disable.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "HTTP2 configuration switch.- `on`: Enable.- `off`: Disable. Note: This field may return null, indicating that no valid value can be obtained.",
},
"ocsp_stapling": {
Type: schema.TypeString,
Optional: true,
- Description: "OCSP configuration switch.- on: Enable.- off: Disable.It is disabled by default. Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "OCSP configuration switch.- `on`: Enable.- `off`: Disable.It is disabled by default. Note: This field may return null, indicating that no valid value can be obtained.",
},
"tls_version": {
Type: schema.TypeSet,
@@ -417,34 +448,34 @@ func resourceTencentCloudTeoZoneSetting() *schema.Resource {
Type: schema.TypeString,
},
Optional: true,
- Description: "TLS version settings. Valid values: `TLSv1`, `TLSV1.1`, `TLSV1.2`, and `TLSv1.3`.Only consecutive versions can be enabled at the same time.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "TLS version settings. Valid values: `TLSv1`, `TLSV1.1`, `TLSV1.2`, and `TLSv1.3`.Only consecutive versions can be enabled at the same time. Note: This field may return null, indicating that no valid value can be obtained.",
},
"hsts": {
Type: schema.TypeList,
MaxItems: 1,
Optional: true,
- Description: "HSTS Configuration.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "HSTS Configuration. Note: This field may return null, indicating that no valid value can be obtained.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"switch": {
Type: schema.TypeString,
Required: true,
- Description: "- on: Enable.- off: Disable.",
+ Description: "- `on`: Enable.- `off`: Disable.",
},
"max_age": {
Type: schema.TypeInt,
Optional: true,
- Description: "MaxAge value.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "MaxAge value in seconds, should be no more than 1 day. Note: This field may return null, indicating that no valid value can be obtained.",
},
"include_sub_domains": {
Type: schema.TypeString,
Optional: true,
- Description: "Specifies whether to include subdomain names. Valid values: `on` and `off`.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "Specifies whether to include subdomain names. Valid values: `on` and `off`. Note: This field may return null, indicating that no valid value can be obtained.",
},
"preload": {
Type: schema.TypeString,
Optional: true,
- Description: "Specifies whether to preload. Valid values: `on` and `off`.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "Specifies whether to preload. Valid values: `on` and `off`. Note: This field may return null, indicating that no valid value can be obtained.",
},
},
},
@@ -461,11 +492,35 @@ func resourceTencentCloudTeoZoneSetting() *schema.Resource {
Description: "Origin server configuration.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
+ "origins": {
+ Type: schema.TypeSet,
+ Elem: &schema.Schema{
+ Type: schema.TypeString,
+ },
+ Optional: true,
+ Computed: true,
+ Description: "Origin sites list. Note: This field may return null, indicating that no valid value can be obtained.",
+ },
+ "backup_origins": {
+ Type: schema.TypeSet,
+ Elem: &schema.Schema{
+ Type: schema.TypeString,
+ },
+ Optional: true,
+ Computed: true,
+ Description: "Backup origin sites list. Note: This field may return null, indicating that no valid value can be obtained.",
+ },
"origin_pull_protocol": {
Type: schema.TypeString,
Optional: true,
Computed: true,
- Description: "Origin-pull protocol.- http: Switch HTTPS requests to HTTP.- follow: Follow the protocol of the request.- https: Switch HTTP requests to HTTPS. This only supports port 443 on the origin server.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "Origin-pull protocol.- `http`: Switch HTTPS requests to HTTP.- `follow`: Follow the protocol of the request.- `https`: Switch HTTP requests to HTTPS. This only supports port 443 on the origin server. Note: This field may return null, indicating that no valid value can be obtained.",
+ },
+ "cos_private_access": {
+ Type: schema.TypeString,
+ Optional: true,
+ Computed: true,
+ Description: "Whether access private cos bucket is allowed when `OriginType` is cos. Note: This field may return null, indicating that no valid value can be obtained.",
},
},
},
@@ -482,7 +537,7 @@ func resourceTencentCloudTeoZoneSetting() *schema.Resource {
"switch": {
Type: schema.TypeString,
Required: true,
- Description: "Whether to enable smart acceleration.- on: Enable.- off: Disable.",
+ Description: "Whether to enable smart acceleration.- `on`: Enable.- `off`: Disable.",
},
},
},
@@ -521,12 +576,12 @@ func resourceTencentCloudTeoZoneSetting() *schema.Resource {
"switch": {
Type: schema.TypeString,
Required: true,
- Description: "Specifies whether to enable client IP header.- on: Enable.- off: Disable.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "Specifies whether to enable client IP header.- `on`: Enable.- `off`: Disable. Note: This field may return null, indicating that no valid value can be obtained.",
},
"header_name": {
Type: schema.TypeString,
Optional: true,
- Description: "Name of the origin-pull client IP request header.Note: This field may return null, indicating that no valid value can be obtained.",
+ Description: "Name of the origin-pull client IP request header. Note: This field may return null, indicating that no valid value can be obtained.",
},
},
},
@@ -543,12 +598,29 @@ func resourceTencentCloudTeoZoneSetting() *schema.Resource {
"switch": {
Type: schema.TypeString,
Required: true,
- Description: "Specifies whether to enable cache prefresh.- on: Enable.- off: Disable.",
+ Description: "Specifies whether to enable cache prefresh.- `on`: Enable.- `off`: Disable.",
},
"percent": {
Type: schema.TypeInt,
Optional: true,
- Description: "Percentage of cache time before try to prefresh. Value range: 1-99.",
+ Description: "Percentage of cache time before try to prefresh. Valid value range: 1-99.",
+ },
+ },
+ },
+ },
+
+ "ipv6": {
+ Type: schema.TypeList,
+ MaxItems: 1,
+ Optional: true,
+ Computed: true,
+ Description: "IPv6 access configuration.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "switch": {
+ Type: schema.TypeString,
+ Required: true,
+ Description: "- `on`: Enable.- `off`: Disable.",
},
},
},
@@ -561,16 +633,20 @@ func resourceTencentCloudTeoZoneSettingCreate(d *schema.ResourceData, meta inter
defer logElapsed("resource.tencentcloud_teo_zone_setting.create")()
defer inconsistentCheck(d, meta)()
- var (
- zoneId string
- )
+ logId := getLogId(contextNil)
+ var zoneId string
if v, ok := d.GetOk("zone_id"); ok {
zoneId = v.(string)
}
d.SetId(zoneId)
- return resourceTencentCloudTeoZoneSettingUpdate(d, meta)
+ err := resourceTencentCloudTeoZoneSettingUpdate(d, meta)
+ if err != nil {
+ log.Printf("[CRITAL]%s create teo zoneSetting failed, reason:%+v", logId, err)
+ return err
+ }
+ return resourceTencentCloudTeoZoneSettingRead(d, meta)
}
func resourceTencentCloudTeoZoneSettingRead(d *schema.ResourceData, meta interface{}) error {
@@ -595,38 +671,40 @@ func resourceTencentCloudTeoZoneSettingRead(d *schema.ResourceData, meta interfa
return fmt.Errorf("resource `zoneSetting` %s does not exist", zoneId)
}
- if zoneSetting.ZoneId != nil {
- _ = d.Set("zone_id", zoneSetting.ZoneId)
+ _ = d.Set("zone_id", zoneId)
+
+ if zoneSetting.Area != nil {
+ _ = d.Set("area", zoneSetting.Area)
}
- if zoneSetting.Cache != nil {
+ if zoneSetting.CacheConfig != nil {
cacheMap := map[string]interface{}{}
- if zoneSetting.Cache.Cache != nil {
+ if zoneSetting.CacheConfig.Cache != nil {
cacheMap := map[string]interface{}{}
- if zoneSetting.Cache.Cache.Switch != nil {
- cacheMap["switch"] = zoneSetting.Cache.Cache.Switch
+ if zoneSetting.CacheConfig.Cache.Switch != nil {
+ cacheMap["switch"] = zoneSetting.CacheConfig.Cache.Switch
}
- if zoneSetting.Cache.Cache.CacheTime != nil {
- cacheMap["cache_time"] = zoneSetting.Cache.Cache.CacheTime
+ if zoneSetting.CacheConfig.Cache.CacheTime != nil {
+ cacheMap["cache_time"] = zoneSetting.CacheConfig.Cache.CacheTime
}
- if zoneSetting.Cache.Cache.IgnoreCacheControl != nil {
- cacheMap["ignore_cache_control"] = zoneSetting.Cache.Cache.IgnoreCacheControl
+ if zoneSetting.CacheConfig.Cache.IgnoreCacheControl != nil {
+ cacheMap["ignore_cache_control"] = zoneSetting.CacheConfig.Cache.IgnoreCacheControl
}
cacheMap["cache"] = []interface{}{cacheMap}
}
- if zoneSetting.Cache.NoCache != nil {
+ if zoneSetting.CacheConfig.NoCache != nil {
noCacheMap := map[string]interface{}{}
- if zoneSetting.Cache.NoCache.Switch != nil {
- noCacheMap["switch"] = zoneSetting.Cache.NoCache.Switch
+ if zoneSetting.CacheConfig.NoCache.Switch != nil {
+ noCacheMap["switch"] = zoneSetting.CacheConfig.NoCache.Switch
}
cacheMap["no_cache"] = []interface{}{noCacheMap}
}
- if zoneSetting.Cache.FollowOrigin != nil {
+ if zoneSetting.CacheConfig.FollowOrigin != nil {
followOriginMap := map[string]interface{}{}
- if zoneSetting.Cache.FollowOrigin.Switch != nil {
- followOriginMap["switch"] = zoneSetting.Cache.FollowOrigin.Switch
+ if zoneSetting.CacheConfig.FollowOrigin.Switch != nil {
+ followOriginMap["switch"] = zoneSetting.CacheConfig.FollowOrigin.Switch
}
cacheMap["follow_origin"] = []interface{}{followOriginMap}
@@ -708,6 +786,9 @@ func resourceTencentCloudTeoZoneSettingRead(d *schema.ResourceData, meta interfa
if zoneSetting.Compression.Switch != nil {
compressionMap["switch"] = zoneSetting.Compression.Switch
}
+ if zoneSetting.Compression.Algorithms != nil {
+ compressionMap["algorithms"] = zoneSetting.Compression.Algorithms
+ }
_ = d.Set("compression", []interface{}{compressionMap})
}
@@ -767,9 +848,18 @@ func resourceTencentCloudTeoZoneSettingRead(d *schema.ResourceData, meta interfa
if zoneSetting.Origin != nil {
originMap := map[string]interface{}{}
+ if zoneSetting.Origin.Origins != nil {
+ originMap["origins"] = zoneSetting.Origin.Origins
+ }
+ if zoneSetting.Origin.BackupOrigins != nil {
+ originMap["backup_origins"] = zoneSetting.Origin.BackupOrigins
+ }
if zoneSetting.Origin.OriginPullProtocol != nil {
originMap["origin_pull_protocol"] = zoneSetting.Origin.OriginPullProtocol
}
+ if zoneSetting.Origin.CosPrivateAccess != nil {
+ originMap["cos_private_access"] = zoneSetting.Origin.CosPrivateAccess
+ }
_ = d.Set("origin", []interface{}{originMap})
}
@@ -819,6 +909,14 @@ func resourceTencentCloudTeoZoneSettingRead(d *schema.ResourceData, meta interfa
_ = d.Set("cache_prefresh", []interface{}{cachePrefreshMap})
}
+ if zoneSetting.Ipv6 != nil {
+ ipv6Map := map[string]interface{}{}
+ if zoneSetting.Ipv6.Switch != nil {
+ ipv6Map["switch"] = zoneSetting.Ipv6.Switch
+ }
+
+ _ = d.Set("ipv6", []interface{}{ipv6Map})
+ }
return nil
}
@@ -827,242 +925,299 @@ func resourceTencentCloudTeoZoneSettingUpdate(d *schema.ResourceData, meta inter
defer inconsistentCheck(d, meta)()
logId := getLogId(contextNil)
+ request := teo.NewModifyZoneSettingRequest()
- var (
- request = teo.NewModifyZoneSettingRequest()
- )
-
- if v, ok := d.GetOk("zone_id"); ok {
- request.ZoneId = helper.String(v.(string))
- }
-
- if dMap, ok := helper.InterfacesHeadMap(d, "cache"); ok {
- cacheConfig := teo.CacheConfig{}
- if CacheMap, ok := helper.InterfaceToMap(dMap, "cache"); ok {
- cacheConfigCache := teo.CacheConfigCache{}
- if v, ok := CacheMap["switch"]; ok {
- cacheConfigCache.Switch = helper.String(v.(string))
- }
- if v, ok := CacheMap["cache_time"]; ok {
- cacheConfigCache.CacheTime = helper.IntInt64(v.(int))
- }
- if v, ok := CacheMap["ignore_cache_control"]; ok {
- cacheConfigCache.IgnoreCacheControl = helper.String(v.(string))
+ zoneId := d.Id()
+ request.ZoneId = &zoneId
+
+ if d.HasChange("cache") {
+ if dMap, ok := helper.InterfacesHeadMap(d, "cache"); ok {
+ cacheConfig := teo.CacheConfig{}
+ if CacheMap, ok := helper.InterfaceToMap(dMap, "cache"); ok {
+ cacheConfigCache := teo.Cache{}
+ if v, ok := CacheMap["switch"]; ok && v != "" {
+ cacheConfigCache.Switch = helper.String(v.(string))
+ }
+ if v, ok := CacheMap["cache_time"]; ok {
+ cacheConfigCache.CacheTime = helper.IntInt64(v.(int))
+ }
+ if v, ok := CacheMap["ignore_cache_control"]; ok && v != "" {
+ cacheConfigCache.IgnoreCacheControl = helper.String(v.(string))
+ }
+ cacheConfig.Cache = &cacheConfigCache
}
- cacheConfig.Cache = &cacheConfigCache
- }
- if NoCacheMap, ok := helper.InterfaceToMap(dMap, "no_cache"); ok {
- cacheConfigNoCache := teo.CacheConfigNoCache{}
- if v, ok := NoCacheMap["switch"]; ok {
- cacheConfigNoCache.Switch = helper.String(v.(string))
+ if NoCacheMap, ok := helper.InterfaceToMap(dMap, "no_cache"); ok {
+ cacheConfigNoCache := teo.NoCache{}
+ if v, ok := NoCacheMap["switch"]; ok && v != "" {
+ cacheConfigNoCache.Switch = helper.String(v.(string))
+ }
+ cacheConfig.NoCache = &cacheConfigNoCache
}
- cacheConfig.NoCache = &cacheConfigNoCache
- }
- if FollowOriginMap, ok := helper.InterfaceToMap(dMap, "follow_origin"); ok {
- cacheConfigFollowOrigin := teo.CacheConfigFollowOrigin{}
- if v, ok := FollowOriginMap["switch"]; ok {
- cacheConfigFollowOrigin.Switch = helper.String(v.(string))
+ if FollowOriginMap, ok := helper.InterfaceToMap(dMap, "follow_origin"); ok {
+ cacheConfigFollowOrigin := teo.FollowOrigin{}
+ if v, ok := FollowOriginMap["switch"]; ok && v != "" {
+ cacheConfigFollowOrigin.Switch = helper.String(v.(string))
+ }
+ cacheConfig.FollowOrigin = &cacheConfigFollowOrigin
}
- cacheConfig.FollowOrigin = &cacheConfigFollowOrigin
+ request.CacheConfig = &cacheConfig
}
-
- request.Cache = &cacheConfig
}
- if dMap, ok := helper.InterfacesHeadMap(d, "cache_key"); ok {
- cacheKey := teo.CacheKey{}
- if v, ok := dMap["full_url_cache"]; ok {
- cacheKey.FullUrlCache = helper.String(v.(string))
- }
- if v, ok := dMap["ignore_case"]; ok {
- cacheKey.IgnoreCase = helper.String(v.(string))
- }
- if QueryStringMap, ok := helper.InterfaceToMap(dMap, "query_string"); ok {
- queryString := teo.QueryString{}
- if v, ok := QueryStringMap["switch"]; ok {
- queryString.Switch = helper.String(v.(string))
+ if d.HasChange("cache_key") {
+ if dMap, ok := helper.InterfacesHeadMap(d, "cache_key"); ok {
+ cacheKey := teo.CacheKey{}
+ if v, ok := dMap["full_url_cache"]; ok && v != "" {
+ cacheKey.FullUrlCache = helper.String(v.(string))
}
- if v, ok := QueryStringMap["action"]; ok {
- queryString.Action = helper.String(v.(string))
+ if v, ok := dMap["ignore_case"]; ok && v != "" {
+ cacheKey.IgnoreCase = helper.String(v.(string))
}
- if v, ok := QueryStringMap["value"]; ok {
- valueSet := v.(*schema.Set).List()
- for i := range valueSet {
- value := valueSet[i].(string)
- queryString.Value = append(queryString.Value, &value)
+ if QueryStringMap, ok := helper.InterfaceToMap(dMap, "query_string"); ok {
+ queryString := teo.QueryString{}
+ if v, ok := QueryStringMap["switch"]; ok && v != "" {
+ queryString.Switch = helper.String(v.(string))
+ }
+ if v, ok := QueryStringMap["action"]; ok && v != "" {
+ queryString.Action = helper.String(v.(string))
}
+ if v, ok := QueryStringMap["value"]; ok && v != "" {
+ valueSet := v.(*schema.Set).List()
+ for i := range valueSet {
+ value := valueSet[i].(string)
+ queryString.Value = append(queryString.Value, &value)
+ }
+ }
+ cacheKey.QueryString = &queryString
}
- cacheKey.QueryString = &queryString
+ request.CacheKey = &cacheKey
}
-
- request.CacheKey = &cacheKey
}
- if dMap, ok := helper.InterfacesHeadMap(d, "max_age"); ok {
- maxAge := teo.MaxAge{}
- if v, ok := dMap["max_age_time"]; ok {
- maxAge.MaxAgeTime = helper.IntInt64(v.(int))
- }
- if v, ok := dMap["follow_origin"]; ok {
- maxAge.FollowOrigin = helper.String(v.(string))
+ if d.HasChange("max_age") {
+ if dMap, ok := helper.InterfacesHeadMap(d, "max_age"); ok {
+ maxAge := teo.MaxAge{}
+ if v, ok := dMap["max_age_time"]; ok {
+ maxAge.MaxAgeTime = helper.IntInt64(v.(int))
+ }
+ if v, ok := dMap["follow_origin"]; ok && v != "" {
+ maxAge.FollowOrigin = helper.String(v.(string))
+ }
+ request.MaxAge = &maxAge
}
-
- request.MaxAge = &maxAge
}
- if dMap, ok := helper.InterfacesHeadMap(d, "offline_cache"); ok {
- offlineCache := teo.OfflineCache{}
- if v, ok := dMap["switch"]; ok {
- offlineCache.Switch = helper.String(v.(string))
+ if d.HasChange("offline_cache") {
+ if dMap, ok := helper.InterfacesHeadMap(d, "offline_cache"); ok {
+ offlineCache := teo.OfflineCache{}
+ if v, ok := dMap["switch"]; ok && v != "" {
+ offlineCache.Switch = helper.String(v.(string))
+ }
+ request.OfflineCache = &offlineCache
}
-
- request.OfflineCache = &offlineCache
}
- if dMap, ok := helper.InterfacesHeadMap(d, "quic"); ok {
- quic := teo.Quic{}
- if v, ok := dMap["switch"]; ok {
- quic.Switch = helper.String(v.(string))
+ if d.HasChange("quic") {
+ if dMap, ok := helper.InterfacesHeadMap(d, "quic"); ok {
+ quic := teo.Quic{}
+ if v, ok := dMap["switch"]; ok && v != "" {
+ quic.Switch = helper.String(v.(string))
+ }
+ request.Quic = &quic
}
-
- request.Quic = &quic
}
- if dMap, ok := helper.InterfacesHeadMap(d, "post_max_size"); ok {
- postMaxSize := teo.PostMaxSize{}
- if v, ok := dMap["switch"]; ok {
- postMaxSize.Switch = helper.String(v.(string))
- }
- if v, ok := dMap["max_size"]; ok {
- postMaxSize.MaxSize = helper.IntInt64(v.(int))
+ if d.HasChange("post_max_size") {
+ if dMap, ok := helper.InterfacesHeadMap(d, "post_max_size"); ok {
+ postMaxSize := teo.PostMaxSize{}
+ if v, ok := dMap["switch"]; ok && v != "" {
+ postMaxSize.Switch = helper.String(v.(string))
+ }
+ if v, ok := dMap["max_size"]; ok {
+ postMaxSize.MaxSize = helper.IntInt64(v.(int))
+ }
+ request.PostMaxSize = &postMaxSize
}
-
- request.PostMaxSize = &postMaxSize
}
- if dMap, ok := helper.InterfacesHeadMap(d, "compression"); ok {
- compression := teo.Compression{}
- if v, ok := dMap["switch"]; ok {
- compression.Switch = helper.String(v.(string))
+ if d.HasChange("compression") {
+ if dMap, ok := helper.InterfacesHeadMap(d, "compression"); ok {
+ compression := teo.Compression{}
+ if v, ok := dMap["switch"]; ok && v != "" {
+ compression.Switch = helper.String(v.(string))
+ }
+ if v, ok := dMap["algorithms"]; ok {
+ algorithmsSet := v.(*schema.Set).List()
+ for i := range algorithmsSet {
+ algorithms := algorithmsSet[i].(string)
+ compression.Algorithms = append(compression.Algorithms, &algorithms)
+ }
+ }
+ request.Compression = &compression
}
-
- request.Compression = &compression
}
- if dMap, ok := helper.InterfacesHeadMap(d, "upstream_http2"); ok {
- upstreamHttp2 := teo.UpstreamHttp2{}
- if v, ok := dMap["switch"]; ok {
- upstreamHttp2.Switch = helper.String(v.(string))
+ if d.HasChange("upstream_http2") {
+ if dMap, ok := helper.InterfacesHeadMap(d, "upstream_http2"); ok {
+ upstreamHttp2 := teo.UpstreamHttp2{}
+ if v, ok := dMap["switch"]; ok && v != "" {
+ upstreamHttp2.Switch = helper.String(v.(string))
+ }
+ request.UpstreamHttp2 = &upstreamHttp2
}
-
- request.UpstreamHttp2 = &upstreamHttp2
}
- if dMap, ok := helper.InterfacesHeadMap(d, "force_redirect"); ok {
- forceRedirect := teo.ForceRedirect{}
- if v, ok := dMap["switch"]; ok {
- forceRedirect.Switch = helper.String(v.(string))
- }
- if v, ok := dMap["redirect_status_code"]; ok {
- forceRedirect.RedirectStatusCode = helper.IntInt64(v.(int))
+ if d.HasChange("force_redirect") {
+ if dMap, ok := helper.InterfacesHeadMap(d, "force_redirect"); ok {
+ forceRedirect := teo.ForceRedirect{}
+ if v, ok := dMap["switch"]; ok && v != "" {
+ forceRedirect.Switch = helper.String(v.(string))
+ }
+ if v, ok := dMap["redirect_status_code"]; ok {
+ forceRedirect.RedirectStatusCode = helper.IntInt64(v.(int))
+ }
+ request.ForceRedirect = &forceRedirect
}
-
- request.ForceRedirect = &forceRedirect
}
- if dMap, ok := helper.InterfacesHeadMap(d, "https"); ok {
- https := teo.Https{}
- if v, ok := dMap["http2"]; ok {
- https.Http2 = helper.String(v.(string))
- }
- if v, ok := dMap["ocsp_stapling"]; ok {
- https.OcspStapling = helper.String(v.(string))
- }
- if v, ok := dMap["tls_version"]; ok {
- tlsVersionSet := v.(*schema.Set).List()
- for i := range tlsVersionSet {
- tlsVersion := tlsVersionSet[i].(string)
- https.TlsVersion = append(https.TlsVersion, &tlsVersion)
+ if d.HasChange("https") {
+ if dMap, ok := helper.InterfacesHeadMap(d, "https"); ok {
+ https := teo.Https{}
+ if v, ok := dMap["http2"]; ok && v != "" {
+ https.Http2 = helper.String(v.(string))
}
+ if v, ok := dMap["ocsp_stapling"]; ok && v != "" {
+ https.OcspStapling = helper.String(v.(string))
+ }
+ if v, ok := dMap["tls_version"]; ok {
+ tlsVersionSet := v.(*schema.Set).List()
+ for i := range tlsVersionSet {
+ tlsVersion := tlsVersionSet[i].(string)
+ https.TlsVersion = append(https.TlsVersion, &tlsVersion)
+ }
+ }
+ if HstsMap, ok := helper.InterfaceToMap(dMap, "hsts"); ok {
+ hsts := teo.Hsts{}
+ if v, ok := HstsMap["switch"]; ok && v != "" {
+ hsts.Switch = helper.String(v.(string))
+ }
+ if v, ok := HstsMap["max_age"]; ok {
+ hsts.MaxAge = helper.IntInt64(v.(int))
+ }
+ if v, ok := HstsMap["include_sub_domains"]; ok && v != "" {
+ hsts.IncludeSubDomains = helper.String(v.(string))
+ }
+ if v, ok := HstsMap["preload"]; ok && v != "" {
+ hsts.Preload = helper.String(v.(string))
+ }
+ https.Hsts = &hsts
+ }
+
+ request.Https = &https
}
- if HstsMap, ok := helper.InterfaceToMap(dMap, "hsts"); ok {
- hsts := teo.Hsts{}
- if v, ok := HstsMap["switch"]; ok {
- hsts.Switch = helper.String(v.(string))
+
+ }
+
+ if d.HasChange("origin") {
+ if dMap, ok := helper.InterfacesHeadMap(d, "origin"); ok {
+ origin := teo.Origin{}
+ if v, ok := dMap["origins"]; ok {
+ originsSet := v.(*schema.Set).List()
+ for i := range originsSet {
+ origins := originsSet[i].(string)
+ origin.Origins = append(origin.Origins, &origins)
+ }
}
- if v, ok := HstsMap["max_age"]; ok {
- hsts.MaxAge = helper.IntInt64(v.(int))
+ if v, ok := dMap["backup_origins"]; ok {
+ backupOriginsSet := v.(*schema.Set).List()
+ for i := range backupOriginsSet {
+ backupOrigins := backupOriginsSet[i].(string)
+ origin.BackupOrigins = append(origin.BackupOrigins, &backupOrigins)
+ }
}
- if v, ok := HstsMap["include_sub_domains"]; ok {
- hsts.IncludeSubDomains = helper.String(v.(string))
+ if v, ok := dMap["origin_pull_protocol"]; ok && v != "" {
+ origin.OriginPullProtocol = helper.String(v.(string))
}
- if v, ok := HstsMap["preload"]; ok {
- hsts.Preload = helper.String(v.(string))
+ if v, ok := dMap["cos_private_access"]; ok && v != "" {
+ origin.CosPrivateAccess = helper.String(v.(string))
}
- https.Hsts = &hsts
+
+ request.Origin = &origin
}
- request.Https = &https
}
- if dMap, ok := helper.InterfacesHeadMap(d, "origin"); ok {
- origin := teo.Origin{}
- if v, ok := dMap["origin_pull_protocol"]; ok {
- origin.OriginPullProtocol = helper.String(v.(string))
+ if d.HasChange("smart_routing") {
+ if dMap, ok := helper.InterfacesHeadMap(d, "smart_routing"); ok {
+ smartRouting := teo.SmartRouting{}
+ if v, ok := dMap["switch"]; ok && v != "" {
+ smartRouting.Switch = helper.String(v.(string))
+ }
+
+ request.SmartRouting = &smartRouting
}
- request.Origin = &origin
}
- if dMap, ok := helper.InterfacesHeadMap(d, "smart_routing"); ok {
- smartRouting := teo.SmartRouting{}
- if v, ok := dMap["switch"]; ok {
- smartRouting.Switch = helper.String(v.(string))
+ if d.HasChange("web_socket") {
+ if dMap, ok := helper.InterfacesHeadMap(d, "web_socket"); ok {
+ webSocket := teo.WebSocket{}
+ if v, ok := dMap["switch"]; ok && v != "" {
+ webSocket.Switch = helper.String(v.(string))
+ }
+ if v, ok := dMap["timeout"]; ok {
+ webSocket.Timeout = helper.IntInt64(v.(int))
+ }
+
+ request.WebSocket = &webSocket
}
- request.SmartRouting = &smartRouting
}
- if dMap, ok := helper.InterfacesHeadMap(d, "web_socket"); ok {
- webSocket := teo.WebSocket{}
- if v, ok := dMap["switch"]; ok {
- webSocket.Switch = helper.String(v.(string))
- }
- if v, ok := dMap["timeout"]; ok {
- webSocket.Timeout = helper.IntInt64(v.(int))
+ if d.HasChange("client_ip_header") {
+ if dMap, ok := helper.InterfacesHeadMap(d, "client_ip_header"); ok {
+ clientIp := teo.ClientIpHeader{}
+ if v, ok := dMap["switch"]; ok && v != "" {
+ clientIp.Switch = helper.String(v.(string))
+ }
+ if v, ok := dMap["header_name"]; ok && v != "" {
+ clientIp.HeaderName = helper.String(v.(string))
+ }
+
+ request.ClientIpHeader = &clientIp
}
- request.WebSocket = &webSocket
}
- if dMap, ok := helper.InterfacesHeadMap(d, "client_ip_header"); ok {
- clientIp := teo.ClientIp{}
- if v, ok := dMap["switch"]; ok {
- clientIp.Switch = helper.String(v.(string))
- }
- if v, ok := dMap["header_name"]; ok {
- clientIp.HeaderName = helper.String(v.(string))
+ if d.HasChange("cache_prefresh") {
+ if dMap, ok := helper.InterfacesHeadMap(d, "cache_prefresh"); ok {
+ cachePrefresh := teo.CachePrefresh{}
+ if v, ok := dMap["switch"]; ok && v != "" {
+ cachePrefresh.Switch = helper.String(v.(string))
+ }
+ if v, ok := dMap["percent"]; ok {
+ cachePrefresh.Percent = helper.IntInt64(v.(int))
+ }
+
+ request.CachePrefresh = &cachePrefresh
}
- request.ClientIpHeader = &clientIp
}
- if dMap, ok := helper.InterfacesHeadMap(d, "cache_prefresh"); ok {
- cachePrefresh := teo.CachePrefresh{}
- if v, ok := dMap["switch"]; ok {
- cachePrefresh.Switch = helper.String(v.(string))
- }
- if v, ok := dMap["percent"]; ok {
- cachePrefresh.Percent = helper.IntInt64(v.(int))
+ if d.HasChange("ipv6") {
+ if dMap, ok := helper.InterfacesHeadMap(d, "ipv6"); ok {
+ ipv6 := teo.Ipv6{}
+ if v, ok := dMap["switch"]; ok && v != "" {
+ ipv6.Switch = helper.String(v.(string))
+ }
+ request.Ipv6 = &ipv6
}
-
- request.CachePrefresh = &cachePrefresh
}
- err := resource.Retry(writeRetryTimeout, func() *resource.RetryError {
+ err := resource.Retry(15*time.Second, func() *resource.RetryError {
result, e := meta.(*TencentCloudClient).apiV3Conn.UseTeoClient().ModifyZoneSetting(request)
if e != nil {
- return retryError(e)
+ return retryError(e, "InvalidParameter.ZoneNotFound")
} else {
log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
logId, request.GetAction(), request.ToJsonString(), result.ToJsonString())
@@ -1071,10 +1226,9 @@ func resourceTencentCloudTeoZoneSettingUpdate(d *schema.ResourceData, meta inter
})
if err != nil {
- log.Printf("[CRITAL]%s create teo zoneSetting failed, reason:%+v", logId, err)
+ log.Printf("[CRITAL]%s read teo zoneSetting failed, reason:%+v", logId, err)
return err
}
-
return resourceTencentCloudTeoZoneSettingRead(d, meta)
}
diff --git a/tencentcloud/service_tencentcloud_teo.go b/tencentcloud/service_tencentcloud_teo.go
index e224a2ef20..3dc9c3e2b3 100644
--- a/tencentcloud/service_tencentcloud_teo.go
+++ b/tencentcloud/service_tencentcloud_teo.go
@@ -2,12 +2,12 @@ package tencentcloud
import (
"context"
+ "fmt"
"log"
- "strconv"
"github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"
- teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220106"
+ teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901"
"github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/connectivity"
"github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/ratelimit"
)
@@ -16,10 +16,10 @@ type TeoService struct {
client *connectivity.TencentCloudClient
}
-func (me *TeoService) DescribeTeoZone(ctx context.Context, zoneId string) (zone *teo.DescribeZoneDetailsResponseParams, errRet error) {
+func (me *TeoService) DescribeTeoZone(ctx context.Context, zoneId string) (zone *teo.Zone, errRet error) {
var (
logId = getLogId(ctx)
- request = teo.NewDescribeZoneDetailsRequest()
+ request = teo.NewDescribeZonesRequest()
)
defer func() {
@@ -28,19 +28,49 @@ func (me *TeoService) DescribeTeoZone(ctx context.Context, zoneId string) (zone
logId, "query object", request.ToJsonString(), errRet.Error())
}
}()
- request.Id = &zoneId
- response, err := me.client.UseTeoClient().DescribeZoneDetails(request)
- if err != nil {
- log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
- logId, request.GetAction(), request.ToJsonString(), err.Error())
- errRet = err
+ request.Filters = append(
+ request.Filters,
+ &teo.AdvancedFilter{
+ Name: helper.String("zone-id"),
+ Values: []*string{&zoneId},
+ },
+ )
+ ratelimit.Check(request.GetAction())
+
+ var offset int64 = 0
+ var pageSize int64 = 100
+ instances := make([]*teo.Zone, 0)
+
+ for {
+ request.Offset = &offset
+ request.Limit = &pageSize
+ ratelimit.Check(request.GetAction())
+ response, err := me.client.UseTeoClient().DescribeZones(request)
+ if err != nil {
+ log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
+ logId, request.GetAction(), request.ToJsonString(), err.Error())
+ errRet = err
+ return
+ }
+ log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
+ logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())
+
+ if response == nil || len(response.Response.Zones) < 1 {
+ break
+ }
+ instances = append(instances, response.Response.Zones...)
+ if len(response.Response.Zones) < int(pageSize) {
+ break
+ }
+ offset += pageSize
+ }
+
+ if len(instances) < 1 {
return
}
- log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
- logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())
+ zone = instances[0]
- zone = response.Response
return
}
@@ -48,7 +78,7 @@ func (me *TeoService) DeleteTeoZoneById(ctx context.Context, zoneId string) (err
logId := getLogId(ctx)
request := teo.NewDeleteZoneRequest()
- request.Id = &zoneId
+ request.ZoneId = &zoneId
defer func() {
if errRet != nil {
@@ -69,7 +99,8 @@ func (me *TeoService) DeleteTeoZoneById(ctx context.Context, zoneId string) (err
return
}
-func (me *TeoService) DescribeTeoDnsRecord(ctx context.Context, zoneId, name string) (dnsRecord *teo.DnsRecord, errRet error) {
+func (me *TeoService) DescribeTeoDnsRecord(ctx context.Context, zoneId, name string) (dnsRecord *teo.DnsRecord,
+ errRet error) {
var (
logId = getLogId(ctx)
request = teo.NewDescribeDnsRecordsRequest()
@@ -85,15 +116,19 @@ func (me *TeoService) DescribeTeoDnsRecord(ctx context.Context, zoneId, name str
request.ZoneId = &zoneId
request.Filters = append(
request.Filters,
- &teo.DnsRecordFilter{
- Name: helper.String("name"),
+ &teo.AdvancedFilter{
+ Name: helper.String("record-id"),
Values: []*string{&name},
+ Fuzzy: helper.Bool(false),
},
)
+ request.Match = helper.String("all")
+ request.Order = helper.String("created_on")
+ request.Direction = helper.String("desc")
ratelimit.Check(request.GetAction())
var offset int64 = 0
- var pageSize int64 = 100
+ var pageSize int64 = 10
instances := make([]*teo.DnsRecord, 0)
for {
@@ -110,11 +145,11 @@ func (me *TeoService) DescribeTeoDnsRecord(ctx context.Context, zoneId, name str
log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())
- if response == nil || len(response.Response.Records) < 1 {
+ if response == nil || len(response.Response.DnsRecords) < 1 {
break
}
- instances = append(instances, response.Response.Records...)
- if len(response.Response.Records) < int(pageSize) {
+ instances = append(instances, response.Response.DnsRecords...)
+ if len(response.Response.DnsRecords) < int(pageSize) {
break
}
offset += pageSize
@@ -133,8 +168,9 @@ func (me *TeoService) DeleteTeoDnsRecordById(ctx context.Context, zoneId, dnsRec
logId := getLogId(ctx)
request := teo.NewDeleteDnsRecordsRequest()
- request.Ids = []*string{&dnsRecordId}
+
request.ZoneId = &zoneId
+ request.DnsRecordIds = []*string{&dnsRecordId}
defer func() {
if errRet != nil {
@@ -155,10 +191,11 @@ func (me *TeoService) DeleteTeoDnsRecordById(ctx context.Context, zoneId, dnsRec
return
}
-func (me *TeoService) DescribeTeoLoadBalancing(ctx context.Context, zoneId string, loadBalancingId string) (loadBalancing *teo.DescribeLoadBalancingDetailResponseParams, errRet error) {
+func (me *TeoService) DescribeTeoLoadBalancing(ctx context.Context,
+ zoneId, loadBalancingId string) (loadBalancing *teo.LoadBalancing, errRet error) {
var (
logId = getLogId(ctx)
- request = teo.NewDescribeLoadBalancingDetailRequest()
+ request = teo.NewDescribeLoadBalancingRequest()
)
defer func() {
@@ -167,24 +204,60 @@ func (me *TeoService) DescribeTeoLoadBalancing(ctx context.Context, zoneId strin
logId, "query object", request.ToJsonString(), errRet.Error())
}
}()
- request.ZoneId = &zoneId
- request.LoadBalancingId = &loadBalancingId
- response, err := me.client.UseTeoClient().DescribeLoadBalancingDetail(request)
- if err != nil {
- log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
- logId, request.GetAction(), request.ToJsonString(), err.Error())
- errRet = err
+ request.Filters = append(
+ request.Filters,
+ &teo.AdvancedFilter{
+ Name: helper.String("zone-id"),
+ Values: []*string{&zoneId},
+ },
+ )
+ request.Filters = append(
+ request.Filters,
+ &teo.AdvancedFilter{
+ Name: helper.String("load-balancing-id"),
+ Values: []*string{&loadBalancingId},
+ },
+ )
+
+ var offset uint64 = 0
+ var pageSize uint64 = 100
+ loadBalancings := make([]*teo.LoadBalancing, 0)
+
+ for {
+ request.Offset = &offset
+ request.Limit = &pageSize
+ ratelimit.Check(request.GetAction())
+ response, err := me.client.UseTeoClient().DescribeLoadBalancing(request)
+ if err != nil {
+ log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
+ logId, request.GetAction(), request.ToJsonString(), err.Error())
+ errRet = err
+ return
+ }
+ log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
+ logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())
+
+ if response == nil || len(response.Response.Data) < 1 {
+ break
+ }
+ loadBalancings = append(loadBalancings, response.Response.Data...)
+ if len(response.Response.Data) < int(pageSize) {
+ break
+ }
+ offset += pageSize
+ }
+
+ if len(loadBalancings) < 1 {
return
}
- log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
- logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())
+ loadBalancing = loadBalancings[0]
- loadBalancing = response.Response
return
}
-func (me *TeoService) DeleteTeoLoadBalancingById(ctx context.Context, zoneId string, loadBalancingId string) (errRet error) {
+func (me *TeoService) DeleteTeoLoadBalancingById(ctx context.Context, zoneId string,
+ loadBalancingId string) (errRet error) {
logId := getLogId(ctx)
request := teo.NewDeleteLoadBalancingRequest()
@@ -210,10 +283,11 @@ func (me *TeoService) DeleteTeoLoadBalancingById(ctx context.Context, zoneId str
return
}
-func (me *TeoService) DescribeTeoOriginGroup(ctx context.Context, zoneId string, originGroupId string) (originGroup *teo.DescribeOriginGroupDetailResponseParams, errRet error) {
+func (me *TeoService) DescribeTeoOriginGroup(ctx context.Context,
+ zoneId, originGroupId string) (originGroup *teo.OriginGroup, errRet error) {
var (
logId = getLogId(ctx)
- request = teo.NewDescribeOriginGroupDetailRequest()
+ request = teo.NewDescribeOriginGroupRequest()
)
defer func() {
@@ -222,29 +296,64 @@ func (me *TeoService) DescribeTeoOriginGroup(ctx context.Context, zoneId string,
logId, "query object", request.ToJsonString(), errRet.Error())
}
}()
- request.ZoneId = &zoneId
- request.OriginId = &originGroupId
- response, err := me.client.UseTeoClient().DescribeOriginGroupDetail(request)
- if err != nil {
- log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
- logId, request.GetAction(), request.ToJsonString(), err.Error())
- errRet = err
+ request.Filters = append(
+ request.Filters,
+ &teo.AdvancedFilter{
+ Name: helper.String("zone-id"),
+ Values: []*string{&zoneId},
+ },
+ )
+ request.Filters = append(
+ request.Filters,
+ &teo.AdvancedFilter{
+ Name: helper.String("origin-group-id"),
+ Values: []*string{&originGroupId},
+ },
+ )
+
+ var offset uint64 = 0
+ var pageSize uint64 = 100
+ originGroups := make([]*teo.OriginGroup, 0)
+
+ for {
+ request.Offset = &offset
+ request.Limit = &pageSize
+ ratelimit.Check(request.GetAction())
+ response, err := me.client.UseTeoClient().DescribeOriginGroup(request)
+ if err != nil {
+ log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
+ logId, request.GetAction(), request.ToJsonString(), err.Error())
+ errRet = err
+ return
+ }
+ log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
+ logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())
+
+ if response == nil || len(response.Response.OriginGroups) < 1 {
+ break
+ }
+ originGroups = append(originGroups, response.Response.OriginGroups...)
+ if len(response.Response.OriginGroups) < int(pageSize) {
+ break
+ }
+ offset += pageSize
+ }
+
+ if len(originGroups) < 1 {
return
}
- log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
- logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())
+ originGroup = originGroups[0]
- originGroup = response.Response
return
}
-func (me *TeoService) DeleteTeoOriginGroupById(ctx context.Context, zoneId string, originGroupId string) (errRet error) {
+func (me *TeoService) DeleteTeoOriginGroupById(ctx context.Context, zoneId, originGroupId string) (errRet error) {
logId := getLogId(ctx)
request := teo.NewDeleteOriginGroupRequest()
request.ZoneId = &zoneId
- request.OriginId = &originGroupId
+ request.OriginGroupId = &originGroupId
defer func() {
if errRet != nil {
@@ -265,7 +374,8 @@ func (me *TeoService) DeleteTeoOriginGroupById(ctx context.Context, zoneId strin
return
}
-func (me *TeoService) DescribeTeoRuleEngine(ctx context.Context, zoneId, ruleId string) (ruleEngine *teo.RuleSettingDetail, errRet error) {
+func (me *TeoService) DescribeTeoRuleEngine(ctx context.Context, zoneId, ruleId string) (ruleEngine *teo.RuleItem,
+ errRet error) {
var (
logId = getLogId(ctx)
request = teo.NewDescribeRulesRequest()
@@ -281,13 +391,12 @@ func (me *TeoService) DescribeTeoRuleEngine(ctx context.Context, zoneId, ruleId
request.ZoneId = &zoneId
request.Filters = append(
request.Filters,
- &teo.RuleFilter{
- Name: helper.String("RULE_ID"),
+ &teo.Filter{
+ Name: helper.String("rule-id"),
Values: []*string{&ruleId},
},
)
ratelimit.Check(request.GetAction())
-
response, err := me.client.UseTeoClient().DescribeRules(request)
if err != nil {
log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
@@ -298,12 +407,14 @@ func (me *TeoService) DescribeTeoRuleEngine(ctx context.Context, zoneId, ruleId
log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())
- instances := response.Response.RuleList
-
- if len(instances) < 1 {
- return
+ if response != nil && response.Response != nil && response.Response.RuleItems != nil {
+ for _, v := range response.Response.RuleItems {
+ if *v.RuleId == ruleId {
+ ruleEngine = v
+ return
+ }
+ }
}
- ruleEngine = instances[0]
return
@@ -336,10 +447,11 @@ func (me *TeoService) DeleteTeoRuleEngineById(ctx context.Context, zoneId, ruleI
return
}
-func (me *TeoService) DescribeTeoApplicationProxy(ctx context.Context, zoneId, proxyId string) (applicationProxy *teo.DescribeApplicationProxyDetailResponseParams, errRet error) {
+func (me *TeoService) DescribeTeoApplicationProxy(ctx context.Context,
+ zoneId, proxyId string) (applicationProxy *teo.ApplicationProxy, errRet error) {
var (
logId = getLogId(ctx)
- request = teo.NewDescribeApplicationProxyDetailRequest()
+ request = teo.NewDescribeApplicationProxiesRequest()
)
defer func() {
@@ -348,19 +460,56 @@ func (me *TeoService) DescribeTeoApplicationProxy(ctx context.Context, zoneId, p
logId, "query object", request.ToJsonString(), errRet.Error())
}
}()
- request.ZoneId = &zoneId
- request.ProxyId = &proxyId
- response, err := me.client.UseTeoClient().DescribeApplicationProxyDetail(request)
- if err != nil {
- log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
- logId, request.GetAction(), request.ToJsonString(), err.Error())
- errRet = err
+ request.Filters = append(
+ request.Filters,
+ &teo.Filter{
+ Name: helper.String("zone-id"),
+ Values: []*string{&zoneId},
+ },
+ )
+ request.Filters = append(
+ request.Filters,
+ &teo.Filter{
+ Name: helper.String("proxy-id"),
+ Values: []*string{&proxyId},
+ },
+ )
+ ratelimit.Check(request.GetAction())
+
+ var offset int64 = 0
+ var pageSize int64 = 100
+ instances := make([]*teo.ApplicationProxy, 0)
+
+ for {
+ request.Offset = &offset
+ request.Limit = &pageSize
+ ratelimit.Check(request.GetAction())
+ response, err := me.client.UseTeoClient().DescribeApplicationProxies(request)
+ if err != nil {
+ log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
+ logId, request.GetAction(), request.ToJsonString(), err.Error())
+ errRet = err
+ return
+ }
+ log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
+ logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())
+
+ if response == nil || len(response.Response.ApplicationProxies) < 1 {
+ break
+ }
+ instances = append(instances, response.Response.ApplicationProxies...)
+ if len(response.Response.ApplicationProxies) < int(pageSize) {
+ break
+ }
+ offset += pageSize
+ }
+
+ if len(instances) < 1 {
return
}
- log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
- logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())
- applicationProxy = response.Response
+ applicationProxy = instances[0]
+
return
}
@@ -391,23 +540,37 @@ func (me *TeoService) DeleteTeoApplicationProxyById(ctx context.Context, zoneId,
return
}
-func (me *TeoService) DescribeTeoApplicationProxyRule(ctx context.Context, zoneId, proxyId, ruleId string) (applicationProxyRule *teo.ApplicationProxyRule, errRet error) {
+func (me *TeoService) DescribeTeoApplicationProxyRule(ctx context.Context,
+ zoneId, proxyId, ruleId string) (applicationProxyRule *teo.ApplicationProxyRule, errRet error) {
var (
logId = getLogId(ctx)
- request = teo.NewDescribeApplicationProxyDetailRequest()
+ request = teo.NewDescribeApplicationProxiesRequest()
+ )
+
+ request.Filters = append(
+ request.Filters,
+ &teo.Filter{
+ Name: helper.String("zone-id"),
+ Values: []*string{&zoneId},
+ },
+ )
+ request.Filters = append(
+ request.Filters,
+ &teo.Filter{
+ Name: helper.String("proxy-id"),
+ Values: []*string{&proxyId},
+ },
)
- rules := make([]*teo.ApplicationProxyRule, 0)
defer func() {
if errRet != nil {
log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
logId, "query object", request.ToJsonString(), errRet.Error())
}
}()
- request.ZoneId = &zoneId
- request.ProxyId = &proxyId
- response, err := me.client.UseTeoClient().DescribeApplicationProxyDetail(request)
+ ratelimit.Check(request.GetAction())
+ response, err := me.client.UseTeoClient().DescribeApplicationProxies(request)
if err != nil {
log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
logId, request.GetAction(), request.ToJsonString(), err.Error())
@@ -416,17 +579,22 @@ func (me *TeoService) DescribeTeoApplicationProxyRule(ctx context.Context, zoneI
}
log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())
- rules = response.Response.Rule
- for _, rule := range rules {
- if *rule.RuleId == ruleId {
- applicationProxyRule = rule
+
+ if len(response.Response.ApplicationProxies) < 1 {
+ return
+ }
+ for _, v := range response.Response.ApplicationProxies[0].ApplicationProxyRules {
+ if *v.RuleId == ruleId {
+ applicationProxyRule = v
return
}
}
+
return
}
-func (me *TeoService) DeleteTeoApplicationProxyRuleById(ctx context.Context, zoneId, proxyId, ruleId string) (errRet error) {
+func (me *TeoService) DeleteTeoApplicationProxyRuleById(ctx context.Context,
+ zoneId, proxyId, ruleId string) (errRet error) {
logId := getLogId(ctx)
request := teo.NewDeleteApplicationProxyRuleRequest()
@@ -454,7 +622,8 @@ func (me *TeoService) DeleteTeoApplicationProxyRuleById(ctx context.Context, zon
return
}
-func (me *TeoService) DescribeTeoZoneSetting(ctx context.Context, zoneId string) (zoneSetting *teo.DescribeZoneSettingResponseParams, errRet error) {
+func (me *TeoService) DescribeTeoZoneSetting(ctx context.Context, zoneId string) (zoneSetting *teo.ZoneSetting,
+ errRet error) {
var (
logId = getLogId(ctx)
request = teo.NewDescribeZoneSettingRequest()
@@ -477,11 +646,12 @@ func (me *TeoService) DescribeTeoZoneSetting(ctx context.Context, zoneId string)
}
log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())
- zoneSetting = response.Response
+ zoneSetting = response.Response.ZoneSetting
return
}
-func (me *TeoService) DescribeTeoSecurityPolicy(ctx context.Context, zoneId, entity string) (securityPolicy *teo.DescribeSecurityPolicyResponseParams, errRet error) {
+func (me *TeoService) DescribeTeoSecurityPolicy(ctx context.Context,
+ zoneId, entity string) (securityPolicy *teo.DescribeSecurityPolicyResponseParams, errRet error) {
var (
logId = getLogId(ctx)
request = teo.NewDescribeSecurityPolicyRequest()
@@ -509,10 +679,11 @@ func (me *TeoService) DescribeTeoSecurityPolicy(ctx context.Context, zoneId, ent
return
}
-func (me *TeoService) DescribeTeoHostCertificate(ctx context.Context, zoneId, host string) (hostCertificate *teo.HostCertSetting, errRet error) {
+func (me *TeoService) DescribeTeoHostCertificate(ctx context.Context,
+ zoneId, host, certId string) (hostCertificate []*teo.HostsCertificate, errRet error) {
var (
logId = getLogId(ctx)
- request = teo.NewDescribeHostsCertificateRequest()
+ request = teo.NewDescribeHostCertificatesRequest()
)
defer func() {
@@ -522,26 +693,42 @@ func (me *TeoService) DescribeTeoHostCertificate(ctx context.Context, zoneId, ho
}
}()
- request.ZoneId = &zoneId
-
request.Filters = append(
request.Filters,
- &teo.CertFilter{
+ &teo.AdvancedFilter{
+ Name: helper.String("zone-id"),
+ Values: []*string{&zoneId},
+ Fuzzy: helper.Bool(false),
+ },
+ )
+ request.Filters = append(
+ request.Filters,
+ &teo.AdvancedFilter{
Name: helper.String("host"),
Values: []*string{&host},
+ Fuzzy: helper.Bool(false),
+ },
+ )
+
+ request.Filters = append(
+ request.Filters,
+ &teo.AdvancedFilter{
+ Name: helper.String("cert-id"),
+ Values: []*string{&certId},
+ Fuzzy: helper.Bool(false),
},
)
ratelimit.Check(request.GetAction())
var offset int64 = 0
var pageSize int64 = 100
- instances := make([]*teo.HostCertSetting, 0)
+ instances := make([]*teo.HostsCertificate, 0)
for {
request.Offset = &offset
request.Limit = &pageSize
ratelimit.Check(request.GetAction())
- response, err := me.client.UseTeoClient().DescribeHostsCertificate(request)
+ response, err := me.client.UseTeoClient().DescribeHostCertificates(request)
if err != nil {
log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
logId, request.GetAction(), request.ToJsonString(), err.Error())
@@ -551,11 +738,11 @@ func (me *TeoService) DescribeTeoHostCertificate(ctx context.Context, zoneId, ho
log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())
- if response == nil || len(response.Response.Hosts) < 1 {
+ if response == nil || len(response.Response.HostCertificates) < 1 {
break
}
- instances = append(instances, response.Response.Hosts...)
- if len(response.Response.Hosts) < int(pageSize) {
+ instances = append(instances, response.Response.HostCertificates...)
+ if len(response.Response.HostCertificates) < int(pageSize) {
break
}
offset += pageSize
@@ -564,12 +751,14 @@ func (me *TeoService) DescribeTeoHostCertificate(ctx context.Context, zoneId, ho
if len(instances) < 1 {
return
}
- hostCertificate = instances[0]
+ hostCertificate = instances
return
+
}
-func (me *TeoService) DescribeTeoDnsSec(ctx context.Context, zoneId string) (dnsSec *teo.DescribeDnssecResponseParams, errRet error) {
+func (me *TeoService) DescribeTeoDnsSec(ctx context.Context, zoneId string) (dnsSec *teo.DescribeDnssecResponseParams,
+ errRet error) {
var (
logId = getLogId(ctx)
request = teo.NewDescribeDnssecRequest()
@@ -581,7 +770,7 @@ func (me *TeoService) DescribeTeoDnsSec(ctx context.Context, zoneId string) (dns
logId, "query object", request.ToJsonString(), errRet.Error())
}
}()
- request.Id = &zoneId
+ request.ZoneId = &zoneId
response, err := me.client.UseTeoClient().DescribeDnssec(request)
if err != nil {
@@ -596,42 +785,71 @@ func (me *TeoService) DescribeTeoDnsSec(ctx context.Context, zoneId string) (dns
return
}
-func (me *TeoService) DescribeTeoDefaultCertificate(ctx context.Context, zoneId string) (defaultCertificate *teo.DefaultServerCertInfo, errRet error) {
+func (me *TeoService) DescribeTeoDefaultCertificate(ctx context.Context,
+ zoneId, certId string) (defaultCertificate *teo.DefaultServerCertInfo, errRet error) {
var (
logId = getLogId(ctx)
request = teo.NewDescribeDefaultCertificatesRequest()
)
- defaultCertificates := make([]*teo.DefaultServerCertInfo, 0)
defer func() {
if errRet != nil {
log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
logId, "query object", request.ToJsonString(), errRet.Error())
}
}()
- request.ZoneId = &zoneId
- response, err := me.client.UseTeoClient().DescribeDefaultCertificates(request)
- if err != nil {
- log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
- logId, request.GetAction(), request.ToJsonString(), err.Error())
- errRet = err
- return
+ request.Filters = append(
+ request.Filters,
+ &teo.Filter{
+ Name: helper.String("zone-id"),
+ Values: []*string{&zoneId},
+ },
+ )
+
+ var offset int64 = 0
+ var pageSize int64 = 100
+ certificates := make([]*teo.DefaultServerCertInfo, 0)
+
+ for {
+ request.Offset = &offset
+ request.Limit = &pageSize
+ ratelimit.Check(request.GetAction())
+ response, err := me.client.UseTeoClient().DescribeDefaultCertificates(request)
+ if err != nil {
+ log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
+ logId, request.GetAction(), request.ToJsonString(), err.Error())
+ errRet = err
+ return
+ }
+ log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
+ logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())
+
+ if response == nil || len(response.Response.DefaultServerCertInfo) < 1 {
+ break
+ }
+ certificates = append(certificates, response.Response.DefaultServerCertInfo...)
+ if len(response.Response.DefaultServerCertInfo) < int(pageSize) {
+ break
+ }
+ offset += pageSize
}
- log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
- logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())
- defaultCertificates = response.Response.CertInfo
- for _, cert := range defaultCertificates {
- if *cert.CertId != "" {
- defaultCertificate = cert
+ if len(certificates) < 1 {
+ return
+ }
+ for _, v := range certificates {
+ if *v.CertId == certId {
+ defaultCertificate = v
return
}
}
+
return
}
-func (me *TeoService) DescribeTeoDdosPolicy(ctx context.Context, zoneId, policyId string) (ddosPolicy *teo.DescribeDDoSPolicyResponseParams, errRet error) {
+func (me *TeoService) DescribeTeoDdosPolicy(ctx context.Context, zoneId string,
+ policyId int64) (ddosPolicy *teo.DescribeDDoSPolicyResponseParams, errRet error) {
var (
logId = getLogId(ctx)
request = teo.NewDescribeDDoSPolicyRequest()
@@ -643,16 +861,8 @@ func (me *TeoService) DescribeTeoDdosPolicy(ctx context.Context, zoneId, policyI
logId, "query object", request.ToJsonString(), errRet.Error())
}
}()
-
- policyId64, errRet := strconv.ParseInt(policyId, 10, 64)
- if errRet != nil {
- log.Printf("[DEBUG]%s api[%s] error, Type conversion failed, [%s] conversion int64 failed\n",
- logId, request.GetAction(), policyId)
- return nil, errRet
- }
-
request.ZoneId = &zoneId
- request.PolicyId = &policyId64
+ request.PolicyId = &policyId
response, err := me.client.UseTeoClient().DescribeDDoSPolicy(request)
if err != nil {
@@ -667,7 +877,8 @@ func (me *TeoService) DescribeTeoDdosPolicy(ctx context.Context, zoneId, policyI
return
}
-func (me *TeoService) DescribeZoneDDoSPolicy(ctx context.Context, zoneId string) (ddosPolicy *teo.DescribeZoneDDoSPolicyResponseParams, errRet error) {
+func (me *TeoService) DescribeTeoZoneDDoSPolicyByFilter(ctx context.Context,
+ param map[string]interface{}) (ddosPolicy *teo.DescribeZoneDDoSPolicyResponseParams, errRet error) {
var (
logId = getLogId(ctx)
request = teo.NewDescribeZoneDDoSPolicyRequest()
@@ -680,10 +891,13 @@ func (me *TeoService) DescribeZoneDDoSPolicy(ctx context.Context, zoneId string)
}
}()
- if zoneId != "" {
- request.ZoneId = &zoneId
- }
+ for k, v := range param {
+ if k == "zone_id" {
+ request.ZoneId = helper.String(v.(string))
+ }
+ }
+ ratelimit.Check(request.GetAction())
response, err := me.client.UseTeoClient().DescribeZoneDDoSPolicy(request)
if err != nil {
log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
@@ -697,44 +911,165 @@ func (me *TeoService) DescribeZoneDDoSPolicy(ctx context.Context, zoneId string)
return
}
-func (me *TeoService) DeleteTeoDdosPolicyById(ctx context.Context, zoneId, policyId string) (errRet error) {
- logId := getLogId(ctx)
+func (me *TeoService) DescribeTeoZoneAvailablePlansByFilter(ctx context.Context) (planInfos []*teo.PlanInfo,
+ errRet error) {
+ var (
+ logId = getLogId(ctx)
+ request = teo.NewDescribeAvailablePlansRequest()
+ )
+
+ defer func() {
+ if errRet != nil {
+ log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
+ logId, "query object", request.ToJsonString(), errRet.Error())
+ }
+ }()
- request := teo.NewModifyDDoSPolicyRequest()
+ response, err := me.client.UseTeoClient().DescribeAvailablePlans(request)
+ if err != nil {
+ log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
+ logId, request.GetAction(), request.ToJsonString(), err.Error())
+ errRet = err
+ return
+ }
+ log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
+ logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())
- policyId64, errRet := strconv.ParseInt(policyId, 10, 64)
- if errRet != nil {
- log.Printf("[DEBUG]%s api[%s] error, Type conversion failed, [%s] conversion int64 failed\n",
- logId, request.GetAction(), policyId)
- return errRet
+ if response != nil || len(response.Response.PlanInfo) > 0 {
+ planInfos = response.Response.PlanInfo
}
+ return
+}
+
+func (me *TeoService) DescribeTeoRuleEnginePriority(ctx context.Context,
+ zoneId string) (ruleEnginePriority []*teo.RuleItem, errRet error) {
+ var (
+ logId = getLogId(ctx)
+ request = teo.NewDescribeRulesRequest()
+ )
+ defer func() {
+ if errRet != nil {
+ log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
+ logId, "query object", request.ToJsonString(), errRet.Error())
+ }
+ }()
request.ZoneId = &zoneId
- request.PolicyId = &policyId64
+
+ response, err := me.client.UseTeoClient().DescribeRules(request)
+ if err != nil {
+ log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
+ logId, request.GetAction(), request.ToJsonString(), err.Error())
+ errRet = err
+ return
+ }
+ log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
+ logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())
+ ruleEnginePriority = response.Response.RuleItems
+ return
+}
+
+func (me *TeoService) DescribeTeoBotManagedRulesByFilter(ctx context.Context,
+ param map[string]interface{}) (botManagedRules []*teo.BotManagedRuleDetail, errRet error) {
+ var (
+ logId = getLogId(ctx)
+ request = teo.NewDescribeBotManagedRulesRequest()
+ )
defer func() {
if errRet != nil {
log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
- logId, "delete object", request.ToJsonString(), errRet.Error())
+ logId, "query object", request.ToJsonString(), errRet.Error())
}
}()
+ for k, v := range param {
+ if k == "zone_id" {
+ request.ZoneId = helper.String(v.(string))
+ }
+
+ if k == "entity" {
+ request.Entity = helper.String(v.(string))
+ }
+
+ }
ratelimit.Check(request.GetAction())
- response, err := me.client.UseTeoClient().ModifyDDoSPolicy(request)
+
+ var offset int64 = 0
+ var pageSize int64 = 9999999
+
+ for {
+ request.Offset = &offset
+ request.Limit = &pageSize
+ ratelimit.Check(request.GetAction())
+ response, err := me.client.UseTeoClient().DescribeBotManagedRules(request)
+ if err != nil {
+ log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
+ logId, request.GetAction(), request.ToJsonString(), err.Error())
+ errRet = err
+ return
+ }
+ log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
+ logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())
+
+ if response == nil || len(response.Response.BotManagedRuleDetails) < 1 {
+ break
+ }
+ botManagedRules = append(botManagedRules, response.Response.BotManagedRuleDetails...)
+ if *response.Response.Count < pageSize {
+ break
+ }
+ offset += pageSize
+ }
+ return
+}
+
+func (me *TeoService) DescribeTeoBotPortraitRulesByFilter(ctx context.Context,
+ param map[string]interface{}) (portraitManagedRules []*teo.PortraitManagedRuleDetail, errRet error) {
+ var (
+ logId = getLogId(ctx)
+ request = teo.NewDescribeSecurityPortraitRulesRequest()
+ )
+
+ defer func() {
+ if errRet != nil {
+ log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
+ logId, "query object", request.ToJsonString(), errRet.Error())
+ }
+ }()
+
+ for k, v := range param {
+ if k == "zone_id" {
+ request.ZoneId = helper.String(v.(string))
+ }
+
+ if k == "entity" {
+ request.Entity = helper.String(v.(string))
+ }
+
+ }
+ ratelimit.Check(request.GetAction())
+ response, err := me.client.UseTeoClient().DescribeSecurityPortraitRules(request)
if err != nil {
+ log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
+ logId, request.GetAction(), request.ToJsonString(), err.Error())
errRet = err
- return err
+ return
}
log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())
+ if response != nil || len(response.Response.PortraitManagedRuleDetails) > 0 {
+ portraitManagedRules = response.Response.PortraitManagedRuleDetails
+ }
return
}
-func (me *TeoService) DescribeAvailablePlans(ctx context.Context) (availablePlans *teo.DescribeAvailablePlansResponseParams, errRet error) {
+func (me *TeoService) DescribeTeoRuleEngineSettingsByFilter(ctx context.Context) (actions []*teo.RulesSettingAction,
+ errRet error) {
var (
logId = getLogId(ctx)
- request = teo.NewDescribeAvailablePlansRequest()
+ request = teo.NewDescribeRulesSettingRequest()
)
defer func() {
@@ -744,7 +1079,8 @@ func (me *TeoService) DescribeAvailablePlans(ctx context.Context) (availablePlan
}
}()
- response, err := me.client.UseTeoClient().DescribeAvailablePlans(request)
+ ratelimit.Check(request.GetAction())
+ response, err := me.client.UseTeoClient().DescribeRulesSetting(request)
if err != nil {
log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
logId, request.GetAction(), request.ToJsonString(), err.Error())
@@ -753,6 +1089,125 @@ func (me *TeoService) DescribeAvailablePlans(ctx context.Context) (availablePlan
}
log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())
- availablePlans = response.Response
+
+ if response != nil || len(response.Response.Actions) > 0 {
+ actions = response.Response.Actions
+ }
return
}
+func (me *TeoService) DescribeTeoSecurityPolicyRegionsByFilter(ctx context.Context) (geoIps []*teo.GeoIp,
+ errRet error) {
+ var (
+ logId = getLogId(ctx)
+ request = teo.NewDescribeSecurityPolicyRegionsRequest()
+ )
+
+ defer func() {
+ if errRet != nil {
+ log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
+ logId, "query object", request.ToJsonString(), errRet.Error())
+ }
+ }()
+
+ ratelimit.Check(request.GetAction())
+
+ var offset int64 = 0
+ var pageSize int64 = 20
+
+ for {
+ request.Offset = &offset
+ request.Limit = &pageSize
+ ratelimit.Check(request.GetAction())
+ response, err := me.client.UseTeoClient().DescribeSecurityPolicyRegions(request)
+ if err != nil {
+ log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
+ logId, request.GetAction(), request.ToJsonString(), err.Error())
+ errRet = err
+ return
+ }
+ log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
+ logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())
+
+ if response == nil || len(response.Response.GeoIps) < 1 {
+ break
+ }
+ geoIps = append(geoIps, response.Response.GeoIps...)
+ if len(response.Response.GeoIps) < int(pageSize) {
+ break
+ }
+ offset += pageSize
+ }
+ return
+}
+
+func (me *TeoService) DescribeTeoWafRuleGroupsByFilter(ctx context.Context,
+ param map[string]interface{}) (wafGroupDetails []*teo.WafGroupDetail, errRet error) {
+ var (
+ logId = getLogId(ctx)
+ request = teo.NewDescribeSecurityGroupManagedRulesRequest()
+ )
+
+ defer func() {
+ if errRet != nil {
+ log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
+ logId, "query object", request.ToJsonString(), errRet.Error())
+ }
+ }()
+
+ for k, v := range param {
+ if k == "zone_id" {
+ request.ZoneId = helper.String(v.(string))
+ }
+
+ if k == "entity" {
+ request.Entity = helper.String(v.(string))
+ }
+
+ }
+ ratelimit.Check(request.GetAction())
+
+ var offset int64 = 0
+ var pageSize int64 = 9999999
+
+ for {
+ request.Offset = &offset
+ request.Limit = &pageSize
+ ratelimit.Check(request.GetAction())
+ response, err := me.client.UseTeoClient().DescribeSecurityGroupManagedRules(request)
+ if err != nil {
+ log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
+ logId, request.GetAction(), request.ToJsonString(), err.Error())
+ errRet = err
+ return
+ }
+ log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
+ logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())
+
+ if response == nil || response.Response.WafGroupInfo == nil || len(response.Response.WafGroupInfo.WafGroupDetails) < 1 {
+ break
+ }
+ wafGroupDetails = append(wafGroupDetails, response.Response.WafGroupInfo.WafGroupDetails...)
+ if *response.Response.Count <= pageSize {
+ break
+ }
+ offset += pageSize
+ }
+ return
+}
+
+func (me *TeoService) CheckZoneComplete(ctx context.Context, zoneId string) error {
+ zone, err := me.DescribeTeoZone(ctx, zoneId)
+ if err != nil {
+ return err
+ }
+ if zone == nil || zone.Type == nil || zone.Status == nil || zone.CnameStatus == nil {
+ return fmt.Errorf("get zone[%s] info failed", zoneId)
+ }
+ if *zone.Type == "full" && *zone.Status != "active" {
+ return fmt.Errorf("`zone.Status` is not `active`, please modify NS records from the domain name provider first")
+ }
+ if *zone.Type == "partial" && *zone.CnameStatus != "finished" {
+ return fmt.Errorf("`zone.CnameStatus` is not `finished`, please verify ownership of the site first")
+ }
+ return nil
+}
diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/client.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/client.go
index c0e8aba3be..50aca92f5d 100644
--- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/client.go
+++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/client.go
@@ -9,6 +9,7 @@ import (
"net/http/httputil"
"net/url"
"os"
+ "regexp"
"strconv"
"strings"
"time"
@@ -33,6 +34,7 @@ type Client struct {
debug bool
rb *circuitBreaker
logger *log.Logger
+ requestClient string
}
func (c *Client) Send(request tchttp.Request, response tchttp.Response) (err error) {
@@ -56,7 +58,7 @@ func (c *Client) Send(request tchttp.Request, response tchttp.Response) (err err
request.SetHttpMethod(c.httpProfile.ReqMethod)
}
- tchttp.CompleteCommonParams(request, c.GetRegion())
+ tchttp.CompleteCommonParams(request, c.GetRegion(), c.requestClient)
// reflect to inject client if field ClientToken exists and retry feature is enabled
if c.profile.NetworkFailureMaxRetries > 0 || c.profile.RateLimitExceededMaxRetries > 0 {
@@ -460,6 +462,28 @@ func (c *Client) WithCredential(cred CredentialIface) *Client {
return c
}
+func (c *Client) WithRequestClient(rc string) *Client {
+ const reRequestClient = "^[0-9a-zA-Z-_ ,;]+$"
+
+ if len(rc) > 128 {
+ c.logger.Println("the length of RequestClient should be within 128 characters, it will be truncated")
+ rc = rc[:128]
+ }
+
+ match, err := regexp.MatchString(reRequestClient, rc)
+ if err != nil {
+ c.logger.Println("regexp is wrong", reRequestClient)
+ return c
+ }
+ if !match {
+ c.logger.Printf("RequestClient not match the regexp: %s, ignored", reRequestClient)
+ return c
+ }
+
+ c.requestClient = rc
+ return c
+}
+
func (c *Client) GetCredential() CredentialIface {
return c.credential
}
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 b7cd287d95..a16d03afe5 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
@@ -256,7 +256,7 @@ func GetServiceDomain(service string) (domain string) {
return
}
-func CompleteCommonParams(request Request, region string) {
+func CompleteCommonParams(request Request, region string, requestClient string) {
params := request.GetParams()
params["Region"] = region
if request.GetVersion() != "" {
@@ -265,7 +265,10 @@ func CompleteCommonParams(request Request, region 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.494"
+ params["RequestClient"] = "SDK_GO_1.0.500"
+ if requestClient != "" {
+ params["RequestClient"] += ": " + requestClient
+ }
}
func ConstructParams(req Request) (err error) {
diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220106/client.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901/client.go
similarity index 65%
rename from vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220106/client.go
rename to vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901/client.go
index 946461b88f..702b9c70a2 100644
--- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220106/client.go
+++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901/client.go
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package v20220106
+package v20220901
import (
"context"
@@ -22,7 +22,7 @@ import (
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile"
)
-const APIVersion = "2022-01-06"
+const APIVersion = "2022-09-01"
type Client struct {
common.Client
@@ -117,6 +117,7 @@ func NewCreateApplicationProxyResponse() (response *CreateApplicationProxyRespon
// 创建应用代理
//
// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
// INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
// LIMITEXCEEDED = "LimitExceeded"
// OPERATIONDENIED = "OperationDenied"
@@ -130,6 +131,7 @@ func (c *Client) CreateApplicationProxy(request *CreateApplicationProxyRequest)
// 创建应用代理
//
// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
// INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
// LIMITEXCEEDED = "LimitExceeded"
// OPERATIONDENIED = "OperationDenied"
@@ -174,6 +176,8 @@ func NewCreateApplicationProxyRuleResponse() (response *CreateApplicationProxyRu
//
// 可能返回的错误码:
// INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
+// OPERATIONDENIED = "OperationDenied"
+// RESOURCENOTFOUND = "ResourceNotFound"
func (c *Client) CreateApplicationProxyRule(request *CreateApplicationProxyRuleRequest) (response *CreateApplicationProxyRuleResponse, err error) {
return c.CreateApplicationProxyRuleWithContext(context.Background(), request)
}
@@ -183,6 +187,8 @@ func (c *Client) CreateApplicationProxyRule(request *CreateApplicationProxyRuleR
//
// 可能返回的错误码:
// INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
+// OPERATIONDENIED = "OperationDenied"
+// RESOURCENOTFOUND = "ResourceNotFound"
func (c *Client) CreateApplicationProxyRuleWithContext(ctx context.Context, request *CreateApplicationProxyRuleRequest) (response *CreateApplicationProxyRuleResponse, err error) {
if request == nil {
request = NewCreateApplicationProxyRuleRequest()
@@ -199,50 +205,54 @@ func (c *Client) CreateApplicationProxyRuleWithContext(ctx context.Context, requ
return
}
-func NewCreateApplicationProxyRulesRequest() (request *CreateApplicationProxyRulesRequest) {
- request = &CreateApplicationProxyRulesRequest{
+func NewCreateCredentialRequest() (request *CreateCredentialRequest) {
+ request = &CreateCredentialRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "CreateApplicationProxyRules")
+ request.Init().WithApiInfo("teo", APIVersion, "CreateCredential")
return
}
-func NewCreateApplicationProxyRulesResponse() (response *CreateApplicationProxyRulesResponse) {
- response = &CreateApplicationProxyRulesResponse{
+func NewCreateCredentialResponse() (response *CreateCredentialResponse) {
+ response = &CreateCredentialResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// CreateApplicationProxyRules
-// 批量创建应用代理规则
+// CreateCredential
+// 用于创建COS回源私有凭证
//
// 可能返回的错误码:
-// INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
-func (c *Client) CreateApplicationProxyRules(request *CreateApplicationProxyRulesRequest) (response *CreateApplicationProxyRulesResponse, err error) {
- return c.CreateApplicationProxyRulesWithContext(context.Background(), request)
+// AUTHFAILURE = "AuthFailure"
+// FAILEDOPERATION = "FailedOperation"
+// OPERATIONDENIED = "OperationDenied"
+func (c *Client) CreateCredential(request *CreateCredentialRequest) (response *CreateCredentialResponse, err error) {
+ return c.CreateCredentialWithContext(context.Background(), request)
}
-// CreateApplicationProxyRules
-// 批量创建应用代理规则
+// CreateCredential
+// 用于创建COS回源私有凭证
//
// 可能返回的错误码:
-// INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
-func (c *Client) CreateApplicationProxyRulesWithContext(ctx context.Context, request *CreateApplicationProxyRulesRequest) (response *CreateApplicationProxyRulesResponse, err error) {
+// AUTHFAILURE = "AuthFailure"
+// FAILEDOPERATION = "FailedOperation"
+// OPERATIONDENIED = "OperationDenied"
+func (c *Client) CreateCredentialWithContext(ctx context.Context, request *CreateCredentialRequest) (response *CreateCredentialResponse, err error) {
if request == nil {
- request = NewCreateApplicationProxyRulesRequest()
+ request = NewCreateCredentialRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("CreateApplicationProxyRules require credential")
+ return nil, errors.New("CreateCredential require credential")
}
request.SetContext(ctx)
- response = NewCreateApplicationProxyRulesResponse()
+ response = NewCreateCredentialResponse()
err = c.Send(request, response)
return
}
@@ -269,7 +279,9 @@ func NewCreateCustomErrorPageResponse() (response *CreateCustomErrorPageResponse
// 创建自定义规则的自定义页
//
// 可能返回的错误码:
-// INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
+// AUTHFAILURE = "AuthFailure"
+// FAILEDOPERATION = "FailedOperation"
+// OPERATIONDENIED = "OperationDenied"
func (c *Client) CreateCustomErrorPage(request *CreateCustomErrorPageRequest) (response *CreateCustomErrorPageResponse, err error) {
return c.CreateCustomErrorPageWithContext(context.Background(), request)
}
@@ -278,7 +290,9 @@ func (c *Client) CreateCustomErrorPage(request *CreateCustomErrorPageRequest) (r
// 创建自定义规则的自定义页
//
// 可能返回的错误码:
-// INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
+// AUTHFAILURE = "AuthFailure"
+// FAILEDOPERATION = "FailedOperation"
+// OPERATIONDENIED = "OperationDenied"
func (c *Client) CreateCustomErrorPageWithContext(ctx context.Context, request *CreateCustomErrorPageRequest) (response *CreateCustomErrorPageResponse, err error) {
if request == nil {
request = NewCreateCustomErrorPageRequest()
@@ -369,6 +383,64 @@ func (c *Client) CreateDnsRecordWithContext(ctx context.Context, request *Create
return
}
+func NewCreateIpTableListRequest() (request *CreateIpTableListRequest) {
+ request = &CreateIpTableListRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "CreateIpTableList")
+
+
+ return
+}
+
+func NewCreateIpTableListResponse() (response *CreateIpTableListResponse) {
+ response = &CreateIpTableListResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+}
+
+// CreateIpTableList
+// 创建IP黑白名单列表
+//
+// 可能返回的错误码:
+// INTERNALERROR = "InternalError"
+// INTERNALERROR_ROUTEERROR = "InternalError.RouteError"
+// INVALIDPARAMETER = "InvalidParameter"
+// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
+// UNKNOWNPARAMETER = "UnknownParameter"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+func (c *Client) CreateIpTableList(request *CreateIpTableListRequest) (response *CreateIpTableListResponse, err error) {
+ return c.CreateIpTableListWithContext(context.Background(), request)
+}
+
+// CreateIpTableList
+// 创建IP黑白名单列表
+//
+// 可能返回的错误码:
+// INTERNALERROR = "InternalError"
+// INTERNALERROR_ROUTEERROR = "InternalError.RouteError"
+// INVALIDPARAMETER = "InvalidParameter"
+// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
+// UNKNOWNPARAMETER = "UnknownParameter"
+// UNSUPPORTEDOPERATION = "UnsupportedOperation"
+func (c *Client) CreateIpTableListWithContext(ctx context.Context, request *CreateIpTableListRequest) (response *CreateIpTableListResponse, err error) {
+ if request == nil {
+ request = NewCreateIpTableListRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("CreateIpTableList require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewCreateIpTableListResponse()
+ err = c.Send(request, response)
+ return
+}
+
func NewCreateLoadBalancingRequest() (request *CreateLoadBalancingRequest) {
request = &CreateLoadBalancingRequest{
BaseRequest: &tchttp.BaseRequest{},
@@ -417,6 +489,110 @@ func (c *Client) CreateLoadBalancingWithContext(ctx context.Context, request *Cr
return
}
+func NewCreateLogSetRequest() (request *CreateLogSetRequest) {
+ request = &CreateLogSetRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "CreateLogSet")
+
+
+ return
+}
+
+func NewCreateLogSetResponse() (response *CreateLogSetResponse) {
+ response = &CreateLogSetResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+}
+
+// CreateLogSet
+// 本接口(CreateClsLog)用于创建CLS日志集。
+//
+// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
+// FAILEDOPERATION_CREATECLSLOGSETFAILED = "FailedOperation.CreateClsLogSetFailed"
+func (c *Client) CreateLogSet(request *CreateLogSetRequest) (response *CreateLogSetResponse, err error) {
+ return c.CreateLogSetWithContext(context.Background(), request)
+}
+
+// CreateLogSet
+// 本接口(CreateClsLog)用于创建CLS日志集。
+//
+// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
+// FAILEDOPERATION_CREATECLSLOGSETFAILED = "FailedOperation.CreateClsLogSetFailed"
+func (c *Client) CreateLogSetWithContext(ctx context.Context, request *CreateLogSetRequest) (response *CreateLogSetResponse, err error) {
+ if request == nil {
+ request = NewCreateLogSetRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("CreateLogSet require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewCreateLogSetResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewCreateLogTopicTaskRequest() (request *CreateLogTopicTaskRequest) {
+ request = &CreateLogTopicTaskRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "CreateLogTopicTask")
+
+
+ return
+}
+
+func NewCreateLogTopicTaskResponse() (response *CreateLogTopicTaskResponse) {
+ response = &CreateLogTopicTaskResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+}
+
+// CreateLogTopicTask
+// 本接口(CreateLogTopicTask)用于创建日志推送任务。
+//
+// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
+// FAILEDOPERATION_CREATECLSLOGTOPICTASKFAILED = "FailedOperation.CreateClsLogTopicTaskFailed"
+// LIMITEXCEEDED = "LimitExceeded"
+// RESOURCEUNAVAILABLE_AVAILABLEDOMAINNOTFOUND = "ResourceUnavailable.AvailableDomainNotFound"
+func (c *Client) CreateLogTopicTask(request *CreateLogTopicTaskRequest) (response *CreateLogTopicTaskResponse, err error) {
+ return c.CreateLogTopicTaskWithContext(context.Background(), request)
+}
+
+// CreateLogTopicTask
+// 本接口(CreateLogTopicTask)用于创建日志推送任务。
+//
+// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
+// FAILEDOPERATION_CREATECLSLOGTOPICTASKFAILED = "FailedOperation.CreateClsLogTopicTaskFailed"
+// LIMITEXCEEDED = "LimitExceeded"
+// RESOURCEUNAVAILABLE_AVAILABLEDOMAINNOTFOUND = "ResourceUnavailable.AvailableDomainNotFound"
+func (c *Client) CreateLogTopicTaskWithContext(ctx context.Context, request *CreateLogTopicTaskRequest) (response *CreateLogTopicTaskResponse, err error) {
+ if request == nil {
+ request = NewCreateLogTopicTaskRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("CreateLogTopicTask require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewCreateLogTopicTaskResponse()
+ err = c.Send(request, response)
+ return
+}
+
func NewCreateOriginGroupRequest() (request *CreateOriginGroupRequest) {
request = &CreateOriginGroupRequest{
BaseRequest: &tchttp.BaseRequest{},
@@ -436,7 +612,7 @@ func NewCreateOriginGroupResponse() (response *CreateOriginGroupResponse) {
}
// CreateOriginGroup
-// 源站组创建
+// 创建源站组
//
// 可能返回的错误码:
// OPERATIONDENIED = "OperationDenied"
@@ -447,7 +623,7 @@ func (c *Client) CreateOriginGroup(request *CreateOriginGroupRequest) (response
}
// CreateOriginGroup
-// 源站组创建
+// 创建源站组
//
// 可能返回的错误码:
// OPERATIONDENIED = "OperationDenied"
@@ -657,6 +833,74 @@ func (c *Client) CreatePurgeTaskWithContext(ctx context.Context, request *Create
return
}
+func NewCreateReplayTaskRequest() (request *CreateReplayTaskRequest) {
+ request = &CreateReplayTaskRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "CreateReplayTask")
+
+
+ return
+}
+
+func NewCreateReplayTaskResponse() (response *CreateReplayTaskResponse) {
+ response = &CreateReplayTaskResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+}
+
+// CreateReplayTask
+// 创建刷新/预热重放任务
+//
+// 可能返回的错误码:
+// INTERNALERROR_BACKENDERROR = "InternalError.BackendError"
+// INTERNALERROR_DOMAINCONFIG = "InternalError.DomainConfig"
+// INTERNALERROR_QUOTASYSTEM = "InternalError.QuotaSystem"
+// INVALIDPARAMETER_DOMAINNOTFOUND = "InvalidParameter.DomainNotFound"
+// INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
+// INVALIDPARAMETER_TARGET = "InvalidParameter.Target"
+// INVALIDPARAMETER_TASKNOTGENERATED = "InvalidParameter.TaskNotGenerated"
+// INVALIDPARAMETER_UPLOADURL = "InvalidParameter.UploadUrl"
+// LIMITEXCEEDED_BATCHQUOTA = "LimitExceeded.BatchQuota"
+// LIMITEXCEEDED_DAILYQUOTA = "LimitExceeded.DailyQuota"
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) CreateReplayTask(request *CreateReplayTaskRequest) (response *CreateReplayTaskResponse, err error) {
+ return c.CreateReplayTaskWithContext(context.Background(), request)
+}
+
+// CreateReplayTask
+// 创建刷新/预热重放任务
+//
+// 可能返回的错误码:
+// INTERNALERROR_BACKENDERROR = "InternalError.BackendError"
+// INTERNALERROR_DOMAINCONFIG = "InternalError.DomainConfig"
+// INTERNALERROR_QUOTASYSTEM = "InternalError.QuotaSystem"
+// INVALIDPARAMETER_DOMAINNOTFOUND = "InvalidParameter.DomainNotFound"
+// INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
+// INVALIDPARAMETER_TARGET = "InvalidParameter.Target"
+// INVALIDPARAMETER_TASKNOTGENERATED = "InvalidParameter.TaskNotGenerated"
+// INVALIDPARAMETER_UPLOADURL = "InvalidParameter.UploadUrl"
+// LIMITEXCEEDED_BATCHQUOTA = "LimitExceeded.BatchQuota"
+// LIMITEXCEEDED_DAILYQUOTA = "LimitExceeded.DailyQuota"
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) CreateReplayTaskWithContext(ctx context.Context, request *CreateReplayTaskRequest) (response *CreateReplayTaskResponse, err error) {
+ if request == nil {
+ request = NewCreateReplayTaskRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("CreateReplayTask require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewCreateReplayTaskResponse()
+ err = c.Send(request, response)
+ return
+}
+
func NewCreateRuleRequest() (request *CreateRuleRequest) {
request = &CreateRuleRequest{
BaseRequest: &tchttp.BaseRequest{},
@@ -679,7 +923,17 @@ func NewCreateRuleResponse() (response *CreateRuleResponse) {
// 规则引擎创建规则。
//
// 可能返回的错误码:
-// INVALIDPARAMETER_INVALIDRULEENGINETARGET = "InvalidParameter.InvalidRuleEngineTarget"
+// INTERNALERROR_BACKENDERROR = "InternalError.BackendError"
+// INTERNALERROR_DOMAINCONFIG = "InternalError.DomainConfig"
+// INTERNALERROR_QUOTASYSTEM = "InternalError.QuotaSystem"
+// INVALIDPARAMETER_DOMAINNOTFOUND = "InvalidParameter.DomainNotFound"
+// INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
+// INVALIDPARAMETER_TARGET = "InvalidParameter.Target"
+// INVALIDPARAMETER_TASKNOTGENERATED = "InvalidParameter.TaskNotGenerated"
+// INVALIDPARAMETER_UPLOADURL = "InvalidParameter.UploadUrl"
+// LIMITEXCEEDED_BATCHQUOTA = "LimitExceeded.BatchQuota"
+// LIMITEXCEEDED_DAILYQUOTA = "LimitExceeded.DailyQuota"
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
func (c *Client) CreateRule(request *CreateRuleRequest) (response *CreateRuleResponse, err error) {
return c.CreateRuleWithContext(context.Background(), request)
}
@@ -688,7 +942,17 @@ func (c *Client) CreateRule(request *CreateRuleRequest) (response *CreateRuleRes
// 规则引擎创建规则。
//
// 可能返回的错误码:
-// INVALIDPARAMETER_INVALIDRULEENGINETARGET = "InvalidParameter.InvalidRuleEngineTarget"
+// INTERNALERROR_BACKENDERROR = "InternalError.BackendError"
+// INTERNALERROR_DOMAINCONFIG = "InternalError.DomainConfig"
+// INTERNALERROR_QUOTASYSTEM = "InternalError.QuotaSystem"
+// INVALIDPARAMETER_DOMAINNOTFOUND = "InvalidParameter.DomainNotFound"
+// INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
+// INVALIDPARAMETER_TARGET = "InvalidParameter.Target"
+// INVALIDPARAMETER_TASKNOTGENERATED = "InvalidParameter.TaskNotGenerated"
+// INVALIDPARAMETER_UPLOADURL = "InvalidParameter.UploadUrl"
+// LIMITEXCEEDED_BATCHQUOTA = "LimitExceeded.BatchQuota"
+// LIMITEXCEEDED_DAILYQUOTA = "LimitExceeded.DailyQuota"
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
func (c *Client) CreateRuleWithContext(ctx context.Context, request *CreateRuleRequest) (response *CreateRuleResponse, err error) {
if request == nil {
request = NewCreateRuleRequest()
@@ -705,94 +969,216 @@ func (c *Client) CreateRuleWithContext(ctx context.Context, request *CreateRuleR
return
}
-func NewCreateZoneRequest() (request *CreateZoneRequest) {
- request = &CreateZoneRequest{
+func NewCreateSecurityDropPageRequest() (request *CreateSecurityDropPageRequest) {
+ request = &CreateSecurityDropPageRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "CreateZone")
+ request.Init().WithApiInfo("teo", APIVersion, "CreateSecurityDropPage")
return
}
-func NewCreateZoneResponse() (response *CreateZoneResponse) {
- response = &CreateZoneResponse{
+func NewCreateSecurityDropPageResponse() (response *CreateSecurityDropPageResponse) {
+ response = &CreateSecurityDropPageResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// CreateZone
-// 用于用户接入新的站点
+// CreateSecurityDropPage
+// 创建自定义拦截页面。
//
// 可能返回的错误码:
-// DRYRUNOPERATION = "DryRunOperation"
-// OPERATIONDENIED = "OperationDenied"
-// RESOURCEINUSE = "ResourceInUse"
-// RESOURCEINUSE_OTHERS = "ResourceInUse.Others"
+// INTERNALERROR_BACKENDERROR = "InternalError.BackendError"
+// INTERNALERROR_DOMAINCONFIG = "InternalError.DomainConfig"
+// INTERNALERROR_QUOTASYSTEM = "InternalError.QuotaSystem"
+// INVALIDPARAMETER_DOMAINNOTFOUND = "InvalidParameter.DomainNotFound"
+// INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
+// INVALIDPARAMETER_TARGET = "InvalidParameter.Target"
+// INVALIDPARAMETER_TASKNOTGENERATED = "InvalidParameter.TaskNotGenerated"
+// INVALIDPARAMETER_UPLOADURL = "InvalidParameter.UploadUrl"
+// LIMITEXCEEDED_BATCHQUOTA = "LimitExceeded.BatchQuota"
+// LIMITEXCEEDED_DAILYQUOTA = "LimitExceeded.DailyQuota"
// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) CreateZone(request *CreateZoneRequest) (response *CreateZoneResponse, err error) {
- return c.CreateZoneWithContext(context.Background(), request)
+func (c *Client) CreateSecurityDropPage(request *CreateSecurityDropPageRequest) (response *CreateSecurityDropPageResponse, err error) {
+ return c.CreateSecurityDropPageWithContext(context.Background(), request)
}
-// CreateZone
-// 用于用户接入新的站点
+// CreateSecurityDropPage
+// 创建自定义拦截页面。
//
// 可能返回的错误码:
-// DRYRUNOPERATION = "DryRunOperation"
-// OPERATIONDENIED = "OperationDenied"
-// RESOURCEINUSE = "ResourceInUse"
-// RESOURCEINUSE_OTHERS = "ResourceInUse.Others"
+// INTERNALERROR_BACKENDERROR = "InternalError.BackendError"
+// INTERNALERROR_DOMAINCONFIG = "InternalError.DomainConfig"
+// INTERNALERROR_QUOTASYSTEM = "InternalError.QuotaSystem"
+// INVALIDPARAMETER_DOMAINNOTFOUND = "InvalidParameter.DomainNotFound"
+// INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
+// INVALIDPARAMETER_TARGET = "InvalidParameter.Target"
+// INVALIDPARAMETER_TASKNOTGENERATED = "InvalidParameter.TaskNotGenerated"
+// INVALIDPARAMETER_UPLOADURL = "InvalidParameter.UploadUrl"
+// LIMITEXCEEDED_BATCHQUOTA = "LimitExceeded.BatchQuota"
+// LIMITEXCEEDED_DAILYQUOTA = "LimitExceeded.DailyQuota"
// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) CreateZoneWithContext(ctx context.Context, request *CreateZoneRequest) (response *CreateZoneResponse, err error) {
+func (c *Client) CreateSecurityDropPageWithContext(ctx context.Context, request *CreateSecurityDropPageRequest) (response *CreateSecurityDropPageResponse, err error) {
if request == nil {
- request = NewCreateZoneRequest()
+ request = NewCreateSecurityDropPageRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("CreateZone require credential")
+ return nil, errors.New("CreateSecurityDropPage require credential")
}
request.SetContext(ctx)
- response = NewCreateZoneResponse()
+ response = NewCreateSecurityDropPageResponse()
err = c.Send(request, response)
return
}
-func NewDeleteApplicationProxyRequest() (request *DeleteApplicationProxyRequest) {
- request = &DeleteApplicationProxyRequest{
+func NewCreateSpeedTestingRequest() (request *CreateSpeedTestingRequest) {
+ request = &CreateSpeedTestingRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DeleteApplicationProxy")
+ request.Init().WithApiInfo("teo", APIVersion, "CreateSpeedTesting")
return
}
-func NewDeleteApplicationProxyResponse() (response *DeleteApplicationProxyResponse) {
- response = &DeleteApplicationProxyResponse{
+func NewCreateSpeedTestingResponse() (response *CreateSpeedTestingResponse) {
+ response = &CreateSpeedTestingResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DeleteApplicationProxy
-// 删除应用代理
+// CreateSpeedTesting
+// 对用户指定的域名进行一次站点拨测
//
// 可能返回的错误码:
-// DRYRUNOPERATION = "DryRunOperation"
+// LIMITEXCEEDED = "LimitExceeded"
// OPERATIONDENIED = "OperationDenied"
-// RESOURCEINUSE = "ResourceInUse"
-// RESOURCEINUSE_OTHERS = "ResourceInUse.Others"
-// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DeleteApplicationProxy(request *DeleteApplicationProxyRequest) (response *DeleteApplicationProxyResponse, err error) {
- return c.DeleteApplicationProxyWithContext(context.Background(), request)
+// RESOURCENOTFOUND = "ResourceNotFound"
+// RESOURCEUNAVAILABLE = "ResourceUnavailable"
+func (c *Client) CreateSpeedTesting(request *CreateSpeedTestingRequest) (response *CreateSpeedTestingResponse, err error) {
+ return c.CreateSpeedTestingWithContext(context.Background(), request)
}
-// DeleteApplicationProxy
+// CreateSpeedTesting
+// 对用户指定的域名进行一次站点拨测
+//
+// 可能返回的错误码:
+// LIMITEXCEEDED = "LimitExceeded"
+// OPERATIONDENIED = "OperationDenied"
+// RESOURCENOTFOUND = "ResourceNotFound"
+// RESOURCEUNAVAILABLE = "ResourceUnavailable"
+func (c *Client) CreateSpeedTestingWithContext(ctx context.Context, request *CreateSpeedTestingRequest) (response *CreateSpeedTestingResponse, err error) {
+ if request == nil {
+ request = NewCreateSpeedTestingRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("CreateSpeedTesting require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewCreateSpeedTestingResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewCreateZoneRequest() (request *CreateZoneRequest) {
+ request = &CreateZoneRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "CreateZone")
+
+
+ return
+}
+
+func NewCreateZoneResponse() (response *CreateZoneResponse) {
+ response = &CreateZoneResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+}
+
+// CreateZone
+// 用于用户接入新的站点。
+//
+// 可能返回的错误码:
+// DRYRUNOPERATION = "DryRunOperation"
+// OPERATIONDENIED = "OperationDenied"
+// RESOURCEINUSE = "ResourceInUse"
+// RESOURCEINUSE_OTHERS = "ResourceInUse.Others"
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) CreateZone(request *CreateZoneRequest) (response *CreateZoneResponse, err error) {
+ return c.CreateZoneWithContext(context.Background(), request)
+}
+
+// CreateZone
+// 用于用户接入新的站点。
+//
+// 可能返回的错误码:
+// DRYRUNOPERATION = "DryRunOperation"
+// OPERATIONDENIED = "OperationDenied"
+// RESOURCEINUSE = "ResourceInUse"
+// RESOURCEINUSE_OTHERS = "ResourceInUse.Others"
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) CreateZoneWithContext(ctx context.Context, request *CreateZoneRequest) (response *CreateZoneResponse, err error) {
+ if request == nil {
+ request = NewCreateZoneRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("CreateZone require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewCreateZoneResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDeleteApplicationProxyRequest() (request *DeleteApplicationProxyRequest) {
+ request = &DeleteApplicationProxyRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "DeleteApplicationProxy")
+
+
+ return
+}
+
+func NewDeleteApplicationProxyResponse() (response *DeleteApplicationProxyResponse) {
+ response = &DeleteApplicationProxyResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+}
+
+// DeleteApplicationProxy
+// 删除应用代理
+//
+// 可能返回的错误码:
+// DRYRUNOPERATION = "DryRunOperation"
+// OPERATIONDENIED = "OperationDenied"
+// RESOURCEINUSE = "ResourceInUse"
+// RESOURCEINUSE_OTHERS = "ResourceInUse.Others"
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) DeleteApplicationProxy(request *DeleteApplicationProxyRequest) (response *DeleteApplicationProxyResponse, err error) {
+ return c.DeleteApplicationProxyWithContext(context.Background(), request)
+}
+
+// DeleteApplicationProxy
// 删除应用代理
//
// 可能返回的错误码:
@@ -948,8 +1334,6 @@ func NewDeleteLoadBalancingResponse() (response *DeleteLoadBalancingResponse) {
//
// 可能返回的错误码:
// OPERATIONDENIED = "OperationDenied"
-// RESOURCEINUSE = "ResourceInUse"
-// RESOURCENOTFOUND = "ResourceNotFound"
func (c *Client) DeleteLoadBalancing(request *DeleteLoadBalancingRequest) (response *DeleteLoadBalancingResponse, err error) {
return c.DeleteLoadBalancingWithContext(context.Background(), request)
}
@@ -959,8 +1343,6 @@ func (c *Client) DeleteLoadBalancing(request *DeleteLoadBalancingRequest) (respo
//
// 可能返回的错误码:
// OPERATIONDENIED = "OperationDenied"
-// RESOURCEINUSE = "ResourceInUse"
-// RESOURCENOTFOUND = "ResourceNotFound"
func (c *Client) DeleteLoadBalancingWithContext(ctx context.Context, request *DeleteLoadBalancingRequest) (response *DeleteLoadBalancingResponse, err error) {
if request == nil {
request = NewDeleteLoadBalancingRequest()
@@ -977,6 +1359,54 @@ func (c *Client) DeleteLoadBalancingWithContext(ctx context.Context, request *De
return
}
+func NewDeleteLogTopicTaskRequest() (request *DeleteLogTopicTaskRequest) {
+ request = &DeleteLogTopicTaskRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "DeleteLogTopicTask")
+
+
+ return
+}
+
+func NewDeleteLogTopicTaskResponse() (response *DeleteLogTopicTaskResponse) {
+ response = &DeleteLogTopicTaskResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+}
+
+// DeleteLogTopicTask
+// 本接口(DeleteLogTopicTask)用于删除日志推送任务。
+//
+// 可能返回的错误码:
+// OPERATIONDENIED = "OperationDenied"
+func (c *Client) DeleteLogTopicTask(request *DeleteLogTopicTaskRequest) (response *DeleteLogTopicTaskResponse, err error) {
+ return c.DeleteLogTopicTaskWithContext(context.Background(), request)
+}
+
+// DeleteLogTopicTask
+// 本接口(DeleteLogTopicTask)用于删除日志推送任务。
+//
+// 可能返回的错误码:
+// OPERATIONDENIED = "OperationDenied"
+func (c *Client) DeleteLogTopicTaskWithContext(ctx context.Context, request *DeleteLogTopicTaskRequest) (response *DeleteLogTopicTaskResponse, err error) {
+ if request == nil {
+ request = NewDeleteLogTopicTaskRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DeleteLogTopicTask require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDeleteLogTopicTaskResponse()
+ err = c.Send(request, response)
+ return
+}
+
func NewDeleteOriginGroupRequest() (request *DeleteOriginGroupRequest) {
request = &DeleteOriginGroupRequest{
BaseRequest: &tchttp.BaseRequest{},
@@ -996,23 +1426,19 @@ func NewDeleteOriginGroupResponse() (response *DeleteOriginGroupResponse) {
}
// DeleteOriginGroup
-// 源站组删除
+// 删除源站组
//
// 可能返回的错误码:
// OPERATIONDENIED = "OperationDenied"
-// RESOURCEINUSE = "ResourceInUse"
-// RESOURCENOTFOUND = "ResourceNotFound"
func (c *Client) DeleteOriginGroup(request *DeleteOriginGroupRequest) (response *DeleteOriginGroupResponse, err error) {
return c.DeleteOriginGroupWithContext(context.Background(), request)
}
// DeleteOriginGroup
-// 源站组删除
+// 删除源站组
//
// 可能返回的错误码:
// OPERATIONDENIED = "OperationDenied"
-// RESOURCEINUSE = "ResourceInUse"
-// RESOURCENOTFOUND = "ResourceNotFound"
func (c *Client) DeleteOriginGroupWithContext(ctx context.Context, request *DeleteOriginGroupRequest) (response *DeleteOriginGroupResponse, err error) {
if request == nil {
request = NewDeleteOriginGroupRequest()
@@ -1052,8 +1478,6 @@ func NewDeleteRulesResponse() (response *DeleteRulesResponse) {
//
// 可能返回的错误码:
// OPERATIONDENIED = "OperationDenied"
-// RESOURCEINUSE = "ResourceInUse"
-// RESOURCENOTFOUND = "ResourceNotFound"
func (c *Client) DeleteRules(request *DeleteRulesRequest) (response *DeleteRulesResponse, err error) {
return c.DeleteRulesWithContext(context.Background(), request)
}
@@ -1063,8 +1487,6 @@ func (c *Client) DeleteRules(request *DeleteRulesRequest) (response *DeleteRules
//
// 可能返回的错误码:
// OPERATIONDENIED = "OperationDenied"
-// RESOURCEINUSE = "ResourceInUse"
-// RESOURCENOTFOUND = "ResourceNotFound"
func (c *Client) DeleteRulesWithContext(ctx context.Context, request *DeleteRulesRequest) (response *DeleteRulesResponse, err error) {
if request == nil {
request = NewDeleteRulesRequest()
@@ -1100,23 +1522,19 @@ func NewDeleteZoneResponse() (response *DeleteZoneResponse) {
}
// DeleteZone
-// 删除站点
+// 删除站点。
//
// 可能返回的错误码:
// OPERATIONDENIED = "OperationDenied"
-// RESOURCEINUSE = "ResourceInUse"
-// RESOURCENOTFOUND = "ResourceNotFound"
func (c *Client) DeleteZone(request *DeleteZoneRequest) (response *DeleteZoneResponse, err error) {
return c.DeleteZoneWithContext(context.Background(), request)
}
// DeleteZone
-// 删除站点
+// 删除站点。
//
// 可能返回的错误码:
// OPERATIONDENIED = "OperationDenied"
-// RESOURCEINUSE = "ResourceInUse"
-// RESOURCENOTFOUND = "ResourceNotFound"
func (c *Client) DeleteZoneWithContext(ctx context.Context, request *DeleteZoneRequest) (response *DeleteZoneResponse, err error) {
if request == nil {
request = NewDeleteZoneRequest()
@@ -1133,104 +1551,100 @@ func (c *Client) DeleteZoneWithContext(ctx context.Context, request *DeleteZoneR
return
}
-func NewDescribeApplicationProxyRequest() (request *DescribeApplicationProxyRequest) {
- request = &DescribeApplicationProxyRequest{
+func NewDescribeAddableEntityListRequest() (request *DescribeAddableEntityListRequest) {
+ request = &DescribeAddableEntityListRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeApplicationProxy")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeAddableEntityList")
return
}
-func NewDescribeApplicationProxyResponse() (response *DescribeApplicationProxyResponse) {
- response = &DescribeApplicationProxyResponse{
+func NewDescribeAddableEntityListResponse() (response *DescribeAddableEntityListResponse) {
+ response = &DescribeAddableEntityListResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeApplicationProxy
-// 获取应用代理列表
+// DescribeAddableEntityList
+// 本接口(DescribeAddableEntityList)用于查询剩余可添加的日志推送实体列表。
//
// 可能返回的错误码:
-// INTERNALERROR_PROXYSERVER = "InternalError.ProxyServer"
-// OPERATIONDENIED = "OperationDenied"
-// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeApplicationProxy(request *DescribeApplicationProxyRequest) (response *DescribeApplicationProxyResponse, err error) {
- return c.DescribeApplicationProxyWithContext(context.Background(), request)
+// RESOURCEUNAVAILABLE_PROXYZONENOTFOUND = "ResourceUnavailable.ProxyZoneNotFound"
+func (c *Client) DescribeAddableEntityList(request *DescribeAddableEntityListRequest) (response *DescribeAddableEntityListResponse, err error) {
+ return c.DescribeAddableEntityListWithContext(context.Background(), request)
}
-// DescribeApplicationProxy
-// 获取应用代理列表
+// DescribeAddableEntityList
+// 本接口(DescribeAddableEntityList)用于查询剩余可添加的日志推送实体列表。
//
// 可能返回的错误码:
-// INTERNALERROR_PROXYSERVER = "InternalError.ProxyServer"
-// OPERATIONDENIED = "OperationDenied"
-// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeApplicationProxyWithContext(ctx context.Context, request *DescribeApplicationProxyRequest) (response *DescribeApplicationProxyResponse, err error) {
+// RESOURCEUNAVAILABLE_PROXYZONENOTFOUND = "ResourceUnavailable.ProxyZoneNotFound"
+func (c *Client) DescribeAddableEntityListWithContext(ctx context.Context, request *DescribeAddableEntityListRequest) (response *DescribeAddableEntityListResponse, err error) {
if request == nil {
- request = NewDescribeApplicationProxyRequest()
+ request = NewDescribeAddableEntityListRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeApplicationProxy require credential")
+ return nil, errors.New("DescribeAddableEntityList require credential")
}
request.SetContext(ctx)
- response = NewDescribeApplicationProxyResponse()
+ response = NewDescribeAddableEntityListResponse()
err = c.Send(request, response)
return
}
-func NewDescribeApplicationProxyDetailRequest() (request *DescribeApplicationProxyDetailRequest) {
- request = &DescribeApplicationProxyDetailRequest{
+func NewDescribeApplicationProxiesRequest() (request *DescribeApplicationProxiesRequest) {
+ request = &DescribeApplicationProxiesRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeApplicationProxyDetail")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeApplicationProxies")
return
}
-func NewDescribeApplicationProxyDetailResponse() (response *DescribeApplicationProxyDetailResponse) {
- response = &DescribeApplicationProxyDetailResponse{
+func NewDescribeApplicationProxiesResponse() (response *DescribeApplicationProxiesResponse) {
+ response = &DescribeApplicationProxiesResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeApplicationProxyDetail
-// 获取应用代理详细信息
+// DescribeApplicationProxies
+// 查询应用代理列表。
//
// 可能返回的错误码:
// INTERNALERROR_PROXYSERVER = "InternalError.ProxyServer"
-// RESOURCENOTFOUND = "ResourceNotFound"
-func (c *Client) DescribeApplicationProxyDetail(request *DescribeApplicationProxyDetailRequest) (response *DescribeApplicationProxyDetailResponse, err error) {
- return c.DescribeApplicationProxyDetailWithContext(context.Background(), request)
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) DescribeApplicationProxies(request *DescribeApplicationProxiesRequest) (response *DescribeApplicationProxiesResponse, err error) {
+ return c.DescribeApplicationProxiesWithContext(context.Background(), request)
}
-// DescribeApplicationProxyDetail
-// 获取应用代理详细信息
+// DescribeApplicationProxies
+// 查询应用代理列表。
//
// 可能返回的错误码:
// INTERNALERROR_PROXYSERVER = "InternalError.ProxyServer"
-// RESOURCENOTFOUND = "ResourceNotFound"
-func (c *Client) DescribeApplicationProxyDetailWithContext(ctx context.Context, request *DescribeApplicationProxyDetailRequest) (response *DescribeApplicationProxyDetailResponse, err error) {
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) DescribeApplicationProxiesWithContext(ctx context.Context, request *DescribeApplicationProxiesRequest) (response *DescribeApplicationProxiesResponse, err error) {
if request == nil {
- request = NewDescribeApplicationProxyDetailRequest()
+ request = NewDescribeApplicationProxiesRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeApplicationProxyDetail require credential")
+ return nil, errors.New("DescribeApplicationProxies require credential")
}
request.SetContext(ctx)
- response = NewDescribeApplicationProxyDetailResponse()
+ response = NewDescribeApplicationProxiesResponse()
err = c.Send(request, response)
return
}
@@ -1258,7 +1672,7 @@ func NewDescribeAvailablePlansResponse() (response *DescribeAvailablePlansRespon
//
// 可能返回的错误码:
// INTERNALERROR_PROXYSERVER = "InternalError.ProxyServer"
-// RESOURCENOTFOUND = "ResourceNotFound"
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
func (c *Client) DescribeAvailablePlans(request *DescribeAvailablePlansRequest) (response *DescribeAvailablePlansResponse, err error) {
return c.DescribeAvailablePlansWithContext(context.Background(), request)
}
@@ -1268,7 +1682,7 @@ func (c *Client) DescribeAvailablePlans(request *DescribeAvailablePlansRequest)
//
// 可能返回的错误码:
// INTERNALERROR_PROXYSERVER = "InternalError.ProxyServer"
-// RESOURCENOTFOUND = "ResourceNotFound"
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
func (c *Client) DescribeAvailablePlansWithContext(ctx context.Context, request *DescribeAvailablePlansRequest) (response *DescribeAvailablePlansResponse, err error) {
if request == nil {
request = NewDescribeAvailablePlansRequest()
@@ -1285,1058 +1699,1462 @@ func (c *Client) DescribeAvailablePlansWithContext(ctx context.Context, request
return
}
-func NewDescribeBotLogRequest() (request *DescribeBotLogRequest) {
- request = &DescribeBotLogRequest{
+func NewDescribeBillingDataRequest() (request *DescribeBillingDataRequest) {
+ request = &DescribeBillingDataRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeBotLog")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeBillingData")
return
}
-func NewDescribeBotLogResponse() (response *DescribeBotLogResponse) {
- response = &DescribeBotLogResponse{
+func NewDescribeBillingDataResponse() (response *DescribeBillingDataResponse) {
+ response = &DescribeBillingDataResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeBotLog
-// 查询Bot攻击日志
+// DescribeBillingData
+// 获取计费数据。
//
// 可能返回的错误码:
// INTERNALERROR_PROXYSERVER = "InternalError.ProxyServer"
-// RESOURCENOTFOUND = "ResourceNotFound"
-func (c *Client) DescribeBotLog(request *DescribeBotLogRequest) (response *DescribeBotLogResponse, err error) {
- return c.DescribeBotLogWithContext(context.Background(), request)
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) DescribeBillingData(request *DescribeBillingDataRequest) (response *DescribeBillingDataResponse, err error) {
+ return c.DescribeBillingDataWithContext(context.Background(), request)
}
-// DescribeBotLog
-// 查询Bot攻击日志
+// DescribeBillingData
+// 获取计费数据。
//
// 可能返回的错误码:
// INTERNALERROR_PROXYSERVER = "InternalError.ProxyServer"
-// RESOURCENOTFOUND = "ResourceNotFound"
-func (c *Client) DescribeBotLogWithContext(ctx context.Context, request *DescribeBotLogRequest) (response *DescribeBotLogResponse, err error) {
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) DescribeBillingDataWithContext(ctx context.Context, request *DescribeBillingDataRequest) (response *DescribeBillingDataResponse, err error) {
if request == nil {
- request = NewDescribeBotLogRequest()
+ request = NewDescribeBillingDataRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeBotLog require credential")
+ return nil, errors.New("DescribeBillingData require credential")
}
request.SetContext(ctx)
- response = NewDescribeBotLogResponse()
+ response = NewDescribeBillingDataResponse()
err = c.Send(request, response)
return
}
-func NewDescribeBotManagedRulesRequest() (request *DescribeBotManagedRulesRequest) {
- request = &DescribeBotManagedRulesRequest{
+func NewDescribeBotClientIpListRequest() (request *DescribeBotClientIpListRequest) {
+ request = &DescribeBotClientIpListRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeBotManagedRules")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeBotClientIpList")
return
}
-func NewDescribeBotManagedRulesResponse() (response *DescribeBotManagedRulesResponse) {
- response = &DescribeBotManagedRulesResponse{
+func NewDescribeBotClientIpListResponse() (response *DescribeBotClientIpListResponse) {
+ response = &DescribeBotClientIpListResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeBotManagedRules
-// 分页查询Bot托管规则
+// DescribeBotClientIpList
+// 本接口(DescribeBotClientIpList)用于查询Bot攻击客户端Ip信息列表。
//
// 可能返回的错误码:
-// INVALIDPARAMETER_SECURITY = "InvalidParameter.Security"
-func (c *Client) DescribeBotManagedRules(request *DescribeBotManagedRulesRequest) (response *DescribeBotManagedRulesResponse, err error) {
- return c.DescribeBotManagedRulesWithContext(context.Background(), request)
+// FAILEDOPERATION = "FailedOperation"
+func (c *Client) DescribeBotClientIpList(request *DescribeBotClientIpListRequest) (response *DescribeBotClientIpListResponse, err error) {
+ return c.DescribeBotClientIpListWithContext(context.Background(), request)
}
-// DescribeBotManagedRules
-// 分页查询Bot托管规则
+// DescribeBotClientIpList
+// 本接口(DescribeBotClientIpList)用于查询Bot攻击客户端Ip信息列表。
//
// 可能返回的错误码:
-// INVALIDPARAMETER_SECURITY = "InvalidParameter.Security"
-func (c *Client) DescribeBotManagedRulesWithContext(ctx context.Context, request *DescribeBotManagedRulesRequest) (response *DescribeBotManagedRulesResponse, err error) {
+// FAILEDOPERATION = "FailedOperation"
+func (c *Client) DescribeBotClientIpListWithContext(ctx context.Context, request *DescribeBotClientIpListRequest) (response *DescribeBotClientIpListResponse, err error) {
if request == nil {
- request = NewDescribeBotManagedRulesRequest()
+ request = NewDescribeBotClientIpListRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeBotManagedRules require credential")
+ return nil, errors.New("DescribeBotClientIpList require credential")
}
request.SetContext(ctx)
- response = NewDescribeBotManagedRulesResponse()
+ response = NewDescribeBotClientIpListResponse()
err = c.Send(request, response)
return
}
-func NewDescribeCnameStatusRequest() (request *DescribeCnameStatusRequest) {
- request = &DescribeCnameStatusRequest{
+func NewDescribeBotDataRequest() (request *DescribeBotDataRequest) {
+ request = &DescribeBotDataRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeCnameStatus")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeBotData")
return
}
-func NewDescribeCnameStatusResponse() (response *DescribeCnameStatusResponse) {
- response = &DescribeCnameStatusResponse{
+func NewDescribeBotDataResponse() (response *DescribeBotDataResponse) {
+ response = &DescribeBotDataResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeCnameStatus
-// 查询域名 CNAME 状态
+// DescribeBotData
+// 本接口(DescribeBotData)查询Bot攻击时序数据。
//
// 可能返回的错误码:
-// INTERNALERROR_PROXYSERVER = "InternalError.ProxyServer"
+// FAILEDOPERATION = "FailedOperation"
+// OPERATIONDENIED = "OperationDenied"
+// RESOURCENOTFOUND = "ResourceNotFound"
// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeCnameStatus(request *DescribeCnameStatusRequest) (response *DescribeCnameStatusResponse, err error) {
- return c.DescribeCnameStatusWithContext(context.Background(), request)
+func (c *Client) DescribeBotData(request *DescribeBotDataRequest) (response *DescribeBotDataResponse, err error) {
+ return c.DescribeBotDataWithContext(context.Background(), request)
}
-// DescribeCnameStatus
-// 查询域名 CNAME 状态
+// DescribeBotData
+// 本接口(DescribeBotData)查询Bot攻击时序数据。
//
// 可能返回的错误码:
-// INTERNALERROR_PROXYSERVER = "InternalError.ProxyServer"
+// FAILEDOPERATION = "FailedOperation"
+// OPERATIONDENIED = "OperationDenied"
+// RESOURCENOTFOUND = "ResourceNotFound"
// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeCnameStatusWithContext(ctx context.Context, request *DescribeCnameStatusRequest) (response *DescribeCnameStatusResponse, err error) {
+func (c *Client) DescribeBotDataWithContext(ctx context.Context, request *DescribeBotDataRequest) (response *DescribeBotDataResponse, err error) {
if request == nil {
- request = NewDescribeCnameStatusRequest()
+ request = NewDescribeBotDataRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeCnameStatus require credential")
+ return nil, errors.New("DescribeBotData require credential")
}
request.SetContext(ctx)
- response = NewDescribeCnameStatusResponse()
+ response = NewDescribeBotDataResponse()
err = c.Send(request, response)
return
}
-func NewDescribeDDoSPolicyRequest() (request *DescribeDDoSPolicyRequest) {
- request = &DescribeDDoSPolicyRequest{
+func NewDescribeBotHitRuleDetailRequest() (request *DescribeBotHitRuleDetailRequest) {
+ request = &DescribeBotHitRuleDetailRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeDDoSPolicy")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeBotHitRuleDetail")
return
}
-func NewDescribeDDoSPolicyResponse() (response *DescribeDDoSPolicyResponse) {
- response = &DescribeDDoSPolicyResponse{
+func NewDescribeBotHitRuleDetailResponse() (response *DescribeBotHitRuleDetailResponse) {
+ response = &DescribeBotHitRuleDetailResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeDDoSPolicy
-// 查询DDoS防护配置详情
+// DescribeBotHitRuleDetail
+// 本接口(DescribeBotHitRuleDetail)用于查询Bot攻击命中规则详情信息。
//
// 可能返回的错误码:
-// INTERNALERROR_PROXYSERVER = "InternalError.ProxyServer"
-// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeDDoSPolicy(request *DescribeDDoSPolicyRequest) (response *DescribeDDoSPolicyResponse, err error) {
- return c.DescribeDDoSPolicyWithContext(context.Background(), request)
+// FAILEDOPERATION = "FailedOperation"
+func (c *Client) DescribeBotHitRuleDetail(request *DescribeBotHitRuleDetailRequest) (response *DescribeBotHitRuleDetailResponse, err error) {
+ return c.DescribeBotHitRuleDetailWithContext(context.Background(), request)
}
-// DescribeDDoSPolicy
-// 查询DDoS防护配置详情
+// DescribeBotHitRuleDetail
+// 本接口(DescribeBotHitRuleDetail)用于查询Bot攻击命中规则详情信息。
//
// 可能返回的错误码:
-// INTERNALERROR_PROXYSERVER = "InternalError.ProxyServer"
-// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeDDoSPolicyWithContext(ctx context.Context, request *DescribeDDoSPolicyRequest) (response *DescribeDDoSPolicyResponse, err error) {
+// FAILEDOPERATION = "FailedOperation"
+func (c *Client) DescribeBotHitRuleDetailWithContext(ctx context.Context, request *DescribeBotHitRuleDetailRequest) (response *DescribeBotHitRuleDetailResponse, err error) {
if request == nil {
- request = NewDescribeDDoSPolicyRequest()
+ request = NewDescribeBotHitRuleDetailRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeDDoSPolicy require credential")
+ return nil, errors.New("DescribeBotHitRuleDetail require credential")
}
request.SetContext(ctx)
- response = NewDescribeDDoSPolicyResponse()
+ response = NewDescribeBotHitRuleDetailResponse()
err = c.Send(request, response)
return
}
-func NewDescribeDDosAttackDataRequest() (request *DescribeDDosAttackDataRequest) {
- request = &DescribeDDosAttackDataRequest{
+func NewDescribeBotLogRequest() (request *DescribeBotLogRequest) {
+ request = &DescribeBotLogRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeDDosAttackData")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeBotLog")
return
}
-func NewDescribeDDosAttackDataResponse() (response *DescribeDDosAttackDataResponse) {
- response = &DescribeDDosAttackDataResponse{
+func NewDescribeBotLogResponse() (response *DescribeBotLogResponse) {
+ response = &DescribeBotLogResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeDDosAttackData
-// 查询DDos攻击时序数据
+// DescribeBotLog
+// 本接口(DescribeBotLog)用于查询Bot攻击日志。
//
// 可能返回的错误码:
-// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeDDosAttackData(request *DescribeDDosAttackDataRequest) (response *DescribeDDosAttackDataResponse, err error) {
- return c.DescribeDDosAttackDataWithContext(context.Background(), request)
+// FAILEDOPERATION = "FailedOperation"
+func (c *Client) DescribeBotLog(request *DescribeBotLogRequest) (response *DescribeBotLogResponse, err error) {
+ return c.DescribeBotLogWithContext(context.Background(), request)
}
-// DescribeDDosAttackData
-// 查询DDos攻击时序数据
+// DescribeBotLog
+// 本接口(DescribeBotLog)用于查询Bot攻击日志。
//
// 可能返回的错误码:
-// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeDDosAttackDataWithContext(ctx context.Context, request *DescribeDDosAttackDataRequest) (response *DescribeDDosAttackDataResponse, err error) {
+// FAILEDOPERATION = "FailedOperation"
+func (c *Client) DescribeBotLogWithContext(ctx context.Context, request *DescribeBotLogRequest) (response *DescribeBotLogResponse, err error) {
if request == nil {
- request = NewDescribeDDosAttackDataRequest()
+ request = NewDescribeBotLogRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeDDosAttackData require credential")
+ return nil, errors.New("DescribeBotLog require credential")
}
request.SetContext(ctx)
- response = NewDescribeDDosAttackDataResponse()
+ response = NewDescribeBotLogResponse()
err = c.Send(request, response)
return
}
-func NewDescribeDDosAttackEventRequest() (request *DescribeDDosAttackEventRequest) {
- request = &DescribeDDosAttackEventRequest{
+func NewDescribeBotManagedRulesRequest() (request *DescribeBotManagedRulesRequest) {
+ request = &DescribeBotManagedRulesRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeDDosAttackEvent")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeBotManagedRules")
return
}
-func NewDescribeDDosAttackEventResponse() (response *DescribeDDosAttackEventResponse) {
- response = &DescribeDDosAttackEventResponse{
+func NewDescribeBotManagedRulesResponse() (response *DescribeBotManagedRulesResponse) {
+ response = &DescribeBotManagedRulesResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeDDosAttackEvent
-// 查询DDos攻击事件
+// DescribeBotManagedRules
+// 查询Bot托管规则
//
// 可能返回的错误码:
-// OPERATIONDENIED = "OperationDenied"
-// RESOURCENOTFOUND = "ResourceNotFound"
-// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeDDosAttackEvent(request *DescribeDDosAttackEventRequest) (response *DescribeDDosAttackEventResponse, err error) {
- return c.DescribeDDosAttackEventWithContext(context.Background(), request)
+// INVALIDPARAMETER_SECURITY = "InvalidParameter.Security"
+func (c *Client) DescribeBotManagedRules(request *DescribeBotManagedRulesRequest) (response *DescribeBotManagedRulesResponse, err error) {
+ return c.DescribeBotManagedRulesWithContext(context.Background(), request)
}
-// DescribeDDosAttackEvent
-// 查询DDos攻击事件
+// DescribeBotManagedRules
+// 查询Bot托管规则
//
// 可能返回的错误码:
-// OPERATIONDENIED = "OperationDenied"
-// RESOURCENOTFOUND = "ResourceNotFound"
-// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeDDosAttackEventWithContext(ctx context.Context, request *DescribeDDosAttackEventRequest) (response *DescribeDDosAttackEventResponse, err error) {
+// INVALIDPARAMETER_SECURITY = "InvalidParameter.Security"
+func (c *Client) DescribeBotManagedRulesWithContext(ctx context.Context, request *DescribeBotManagedRulesRequest) (response *DescribeBotManagedRulesResponse, err error) {
if request == nil {
- request = NewDescribeDDosAttackEventRequest()
+ request = NewDescribeBotManagedRulesRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeDDosAttackEvent require credential")
+ return nil, errors.New("DescribeBotManagedRules require credential")
}
request.SetContext(ctx)
- response = NewDescribeDDosAttackEventResponse()
+ response = NewDescribeBotManagedRulesResponse()
err = c.Send(request, response)
return
}
-func NewDescribeDDosAttackEventDetailRequest() (request *DescribeDDosAttackEventDetailRequest) {
- request = &DescribeDDosAttackEventDetailRequest{
+func NewDescribeBotTopDataRequest() (request *DescribeBotTopDataRequest) {
+ request = &DescribeBotTopDataRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeDDosAttackEventDetail")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeBotTopData")
return
}
-func NewDescribeDDosAttackEventDetailResponse() (response *DescribeDDosAttackEventDetailResponse) {
- response = &DescribeDDosAttackEventDetailResponse{
+func NewDescribeBotTopDataResponse() (response *DescribeBotTopDataResponse) {
+ response = &DescribeBotTopDataResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeDDosAttackEventDetail
-// 查询DDos攻击事件详情
+// DescribeBotTopData
+// 本接口(DescribeBotTopData)查询Bot攻击TopN数据。
//
// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeDDosAttackEventDetail(request *DescribeDDosAttackEventDetailRequest) (response *DescribeDDosAttackEventDetailResponse, err error) {
- return c.DescribeDDosAttackEventDetailWithContext(context.Background(), request)
+func (c *Client) DescribeBotTopData(request *DescribeBotTopDataRequest) (response *DescribeBotTopDataResponse, err error) {
+ return c.DescribeBotTopDataWithContext(context.Background(), request)
}
-// DescribeDDosAttackEventDetail
-// 查询DDos攻击事件详情
+// DescribeBotTopData
+// 本接口(DescribeBotTopData)查询Bot攻击TopN数据。
//
// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeDDosAttackEventDetailWithContext(ctx context.Context, request *DescribeDDosAttackEventDetailRequest) (response *DescribeDDosAttackEventDetailResponse, err error) {
+func (c *Client) DescribeBotTopDataWithContext(ctx context.Context, request *DescribeBotTopDataRequest) (response *DescribeBotTopDataResponse, err error) {
if request == nil {
- request = NewDescribeDDosAttackEventDetailRequest()
+ request = NewDescribeBotTopDataRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeDDosAttackEventDetail require credential")
+ return nil, errors.New("DescribeBotTopData require credential")
}
request.SetContext(ctx)
- response = NewDescribeDDosAttackEventDetailResponse()
+ response = NewDescribeBotTopDataResponse()
err = c.Send(request, response)
return
}
-func NewDescribeDDosAttackSourceEventRequest() (request *DescribeDDosAttackSourceEventRequest) {
- request = &DescribeDDosAttackSourceEventRequest{
+func NewDescribeClientRuleListRequest() (request *DescribeClientRuleListRequest) {
+ request = &DescribeClientRuleListRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeDDosAttackSourceEvent")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeClientRuleList")
return
}
-func NewDescribeDDosAttackSourceEventResponse() (response *DescribeDDosAttackSourceEventResponse) {
- response = &DescribeDDosAttackSourceEventResponse{
+func NewDescribeClientRuleListResponse() (response *DescribeClientRuleListResponse) {
+ response = &DescribeClientRuleListResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeDDosAttackSourceEvent
-// 查询DDos攻击源信息
+// DescribeClientRuleList
+// 本接口(DescribeClientRuleList)用于查询封禁客户端信息列表。
//
// 可能返回的错误码:
+// RESOURCENOTFOUND = "ResourceNotFound"
// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeDDosAttackSourceEvent(request *DescribeDDosAttackSourceEventRequest) (response *DescribeDDosAttackSourceEventResponse, err error) {
- return c.DescribeDDosAttackSourceEventWithContext(context.Background(), request)
+func (c *Client) DescribeClientRuleList(request *DescribeClientRuleListRequest) (response *DescribeClientRuleListResponse, err error) {
+ return c.DescribeClientRuleListWithContext(context.Background(), request)
}
-// DescribeDDosAttackSourceEvent
-// 查询DDos攻击源信息
+// DescribeClientRuleList
+// 本接口(DescribeClientRuleList)用于查询封禁客户端信息列表。
//
// 可能返回的错误码:
+// RESOURCENOTFOUND = "ResourceNotFound"
// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeDDosAttackSourceEventWithContext(ctx context.Context, request *DescribeDDosAttackSourceEventRequest) (response *DescribeDDosAttackSourceEventResponse, err error) {
+func (c *Client) DescribeClientRuleListWithContext(ctx context.Context, request *DescribeClientRuleListRequest) (response *DescribeClientRuleListResponse, err error) {
if request == nil {
- request = NewDescribeDDosAttackSourceEventRequest()
+ request = NewDescribeClientRuleListRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeDDosAttackSourceEvent require credential")
+ return nil, errors.New("DescribeClientRuleList require credential")
}
request.SetContext(ctx)
- response = NewDescribeDDosAttackSourceEventResponse()
+ response = NewDescribeClientRuleListResponse()
err = c.Send(request, response)
return
}
-func NewDescribeDDosAttackTopDataRequest() (request *DescribeDDosAttackTopDataRequest) {
- request = &DescribeDDosAttackTopDataRequest{
+func NewDescribeContentQuotaRequest() (request *DescribeContentQuotaRequest) {
+ request = &DescribeContentQuotaRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeDDosAttackTopData")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeContentQuota")
return
}
-func NewDescribeDDosAttackTopDataResponse() (response *DescribeDDosAttackTopDataResponse) {
- response = &DescribeDDosAttackTopDataResponse{
+func NewDescribeContentQuotaResponse() (response *DescribeContentQuotaResponse) {
+ response = &DescribeContentQuotaResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeDDosAttackTopData
-// 查询DDos攻击Top数据
+// DescribeContentQuota
+// 查询内容管理接口配额
//
// 可能返回的错误码:
-// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeDDosAttackTopData(request *DescribeDDosAttackTopDataRequest) (response *DescribeDDosAttackTopDataResponse, err error) {
- return c.DescribeDDosAttackTopDataWithContext(context.Background(), request)
+// UNAUTHORIZEDOPERATION_UNKNOWN = "UnauthorizedOperation.Unknown"
+func (c *Client) DescribeContentQuota(request *DescribeContentQuotaRequest) (response *DescribeContentQuotaResponse, err error) {
+ return c.DescribeContentQuotaWithContext(context.Background(), request)
}
-// DescribeDDosAttackTopData
-// 查询DDos攻击Top数据
+// DescribeContentQuota
+// 查询内容管理接口配额
//
// 可能返回的错误码:
-// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeDDosAttackTopDataWithContext(ctx context.Context, request *DescribeDDosAttackTopDataRequest) (response *DescribeDDosAttackTopDataResponse, err error) {
+// UNAUTHORIZEDOPERATION_UNKNOWN = "UnauthorizedOperation.Unknown"
+func (c *Client) DescribeContentQuotaWithContext(ctx context.Context, request *DescribeContentQuotaRequest) (response *DescribeContentQuotaResponse, err error) {
if request == nil {
- request = NewDescribeDDosAttackTopDataRequest()
+ request = NewDescribeContentQuotaRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeDDosAttackTopData require credential")
+ return nil, errors.New("DescribeContentQuota require credential")
}
request.SetContext(ctx)
- response = NewDescribeDDosAttackTopDataResponse()
+ response = NewDescribeContentQuotaResponse()
err = c.Send(request, response)
return
}
-func NewDescribeDDosMajorAttackEventRequest() (request *DescribeDDosMajorAttackEventRequest) {
- request = &DescribeDDosMajorAttackEventRequest{
+func NewDescribeDDoSAttackDataRequest() (request *DescribeDDoSAttackDataRequest) {
+ request = &DescribeDDoSAttackDataRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeDDosMajorAttackEvent")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeDDoSAttackData")
return
}
-func NewDescribeDDosMajorAttackEventResponse() (response *DescribeDDosMajorAttackEventResponse) {
- response = &DescribeDDosMajorAttackEventResponse{
+func NewDescribeDDoSAttackDataResponse() (response *DescribeDDoSAttackDataResponse) {
+ response = &DescribeDDoSAttackDataResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeDDosMajorAttackEvent
-// 查询DDos主攻击事件
+// DescribeDDoSAttackData
+// 本接口(DescribeDDoSAttackData)用于查询DDoS攻击时序数据。
//
// 可能返回的错误码:
-// FAILEDOPERATION = "FailedOperation"
-// LIMITEXCEEDED = "LimitExceeded"
-// OPERATIONDENIED = "OperationDenied"
// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeDDosMajorAttackEvent(request *DescribeDDosMajorAttackEventRequest) (response *DescribeDDosMajorAttackEventResponse, err error) {
- return c.DescribeDDosMajorAttackEventWithContext(context.Background(), request)
+func (c *Client) DescribeDDoSAttackData(request *DescribeDDoSAttackDataRequest) (response *DescribeDDoSAttackDataResponse, err error) {
+ return c.DescribeDDoSAttackDataWithContext(context.Background(), request)
}
-// DescribeDDosMajorAttackEvent
-// 查询DDos主攻击事件
+// DescribeDDoSAttackData
+// 本接口(DescribeDDoSAttackData)用于查询DDoS攻击时序数据。
//
// 可能返回的错误码:
-// FAILEDOPERATION = "FailedOperation"
-// LIMITEXCEEDED = "LimitExceeded"
-// OPERATIONDENIED = "OperationDenied"
// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeDDosMajorAttackEventWithContext(ctx context.Context, request *DescribeDDosMajorAttackEventRequest) (response *DescribeDDosMajorAttackEventResponse, err error) {
+func (c *Client) DescribeDDoSAttackDataWithContext(ctx context.Context, request *DescribeDDoSAttackDataRequest) (response *DescribeDDoSAttackDataResponse, err error) {
if request == nil {
- request = NewDescribeDDosMajorAttackEventRequest()
+ request = NewDescribeDDoSAttackDataRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeDDosMajorAttackEvent require credential")
+ return nil, errors.New("DescribeDDoSAttackData require credential")
}
request.SetContext(ctx)
- response = NewDescribeDDosMajorAttackEventResponse()
+ response = NewDescribeDDoSAttackDataResponse()
err = c.Send(request, response)
return
}
-func NewDescribeDefaultCertificatesRequest() (request *DescribeDefaultCertificatesRequest) {
- request = &DescribeDefaultCertificatesRequest{
+func NewDescribeDDoSAttackEventRequest() (request *DescribeDDoSAttackEventRequest) {
+ request = &DescribeDDoSAttackEventRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeDefaultCertificates")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeDDoSAttackEvent")
return
}
-func NewDescribeDefaultCertificatesResponse() (response *DescribeDefaultCertificatesResponse) {
- response = &DescribeDefaultCertificatesResponse{
+func NewDescribeDDoSAttackEventResponse() (response *DescribeDDoSAttackEventResponse) {
+ response = &DescribeDDoSAttackEventResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeDefaultCertificates
-// 查询默认证书列表
+// DescribeDDoSAttackEvent
+// 本接口(DescribeDDoSAttackEvent)用于查询DDoS攻击事件列表。
//
// 可能返回的错误码:
-// INTERNALERROR_DBERROR = "InternalError.DBError"
-// INTERNALERROR_ROUTEERROR = "InternalError.RouteError"
// OPERATIONDENIED = "OperationDenied"
-// RESOURCEUNAVAILABLE_ZONENOTFOUND = "ResourceUnavailable.ZoneNotFound"
+// RESOURCENOTFOUND = "ResourceNotFound"
// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission"
-func (c *Client) DescribeDefaultCertificates(request *DescribeDefaultCertificatesRequest) (response *DescribeDefaultCertificatesResponse, err error) {
- return c.DescribeDefaultCertificatesWithContext(context.Background(), request)
+func (c *Client) DescribeDDoSAttackEvent(request *DescribeDDoSAttackEventRequest) (response *DescribeDDoSAttackEventResponse, err error) {
+ return c.DescribeDDoSAttackEventWithContext(context.Background(), request)
}
-// DescribeDefaultCertificates
-// 查询默认证书列表
+// DescribeDDoSAttackEvent
+// 本接口(DescribeDDoSAttackEvent)用于查询DDoS攻击事件列表。
//
// 可能返回的错误码:
-// INTERNALERROR_DBERROR = "InternalError.DBError"
-// INTERNALERROR_ROUTEERROR = "InternalError.RouteError"
// OPERATIONDENIED = "OperationDenied"
-// RESOURCEUNAVAILABLE_ZONENOTFOUND = "ResourceUnavailable.ZoneNotFound"
+// RESOURCENOTFOUND = "ResourceNotFound"
// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission"
-func (c *Client) DescribeDefaultCertificatesWithContext(ctx context.Context, request *DescribeDefaultCertificatesRequest) (response *DescribeDefaultCertificatesResponse, err error) {
+func (c *Client) DescribeDDoSAttackEventWithContext(ctx context.Context, request *DescribeDDoSAttackEventRequest) (response *DescribeDDoSAttackEventResponse, err error) {
if request == nil {
- request = NewDescribeDefaultCertificatesRequest()
+ request = NewDescribeDDoSAttackEventRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeDefaultCertificates require credential")
+ return nil, errors.New("DescribeDDoSAttackEvent require credential")
}
request.SetContext(ctx)
- response = NewDescribeDefaultCertificatesResponse()
+ response = NewDescribeDDoSAttackEventResponse()
err = c.Send(request, response)
return
}
-func NewDescribeDnsDataRequest() (request *DescribeDnsDataRequest) {
- request = &DescribeDnsDataRequest{
+func NewDescribeDDoSAttackEventDetailRequest() (request *DescribeDDoSAttackEventDetailRequest) {
+ request = &DescribeDDoSAttackEventDetailRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeDnsData")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeDDoSAttackEventDetail")
return
}
-func NewDescribeDnsDataResponse() (response *DescribeDnsDataResponse) {
- response = &DescribeDnsDataResponse{
+func NewDescribeDDoSAttackEventDetailResponse() (response *DescribeDDoSAttackEventDetailResponse) {
+ response = &DescribeDDoSAttackEventDetailResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeDnsData
-// 获取DNS请求数统计曲线
+// DescribeDDoSAttackEventDetail
+// 本接口(DescribeDDoSAttackEventDetail)用于查询DDoS攻击事件详情。
//
// 可能返回的错误码:
-// OPERATIONDENIED = "OperationDenied"
// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeDnsData(request *DescribeDnsDataRequest) (response *DescribeDnsDataResponse, err error) {
- return c.DescribeDnsDataWithContext(context.Background(), request)
+func (c *Client) DescribeDDoSAttackEventDetail(request *DescribeDDoSAttackEventDetailRequest) (response *DescribeDDoSAttackEventDetailResponse, err error) {
+ return c.DescribeDDoSAttackEventDetailWithContext(context.Background(), request)
}
-// DescribeDnsData
-// 获取DNS请求数统计曲线
+// DescribeDDoSAttackEventDetail
+// 本接口(DescribeDDoSAttackEventDetail)用于查询DDoS攻击事件详情。
//
// 可能返回的错误码:
-// OPERATIONDENIED = "OperationDenied"
// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeDnsDataWithContext(ctx context.Context, request *DescribeDnsDataRequest) (response *DescribeDnsDataResponse, err error) {
+func (c *Client) DescribeDDoSAttackEventDetailWithContext(ctx context.Context, request *DescribeDDoSAttackEventDetailRequest) (response *DescribeDDoSAttackEventDetailResponse, err error) {
if request == nil {
- request = NewDescribeDnsDataRequest()
+ request = NewDescribeDDoSAttackEventDetailRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeDnsData require credential")
+ return nil, errors.New("DescribeDDoSAttackEventDetail require credential")
}
request.SetContext(ctx)
- response = NewDescribeDnsDataResponse()
+ response = NewDescribeDDoSAttackEventDetailResponse()
err = c.Send(request, response)
return
}
-func NewDescribeDnsRecordsRequest() (request *DescribeDnsRecordsRequest) {
- request = &DescribeDnsRecordsRequest{
+func NewDescribeDDoSAttackSourceEventRequest() (request *DescribeDDoSAttackSourceEventRequest) {
+ request = &DescribeDDoSAttackSourceEventRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeDnsRecords")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeDDoSAttackSourceEvent")
return
}
-func NewDescribeDnsRecordsResponse() (response *DescribeDnsRecordsResponse) {
- response = &DescribeDnsRecordsResponse{
+func NewDescribeDDoSAttackSourceEventResponse() (response *DescribeDDoSAttackSourceEventResponse) {
+ response = &DescribeDDoSAttackSourceEventResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeDnsRecords
-// 查询 DNS 记录列表,支持搜索、分页、排序、过滤。
+// DescribeDDoSAttackSourceEvent
+// 本接口(DescribeDDoSAttackSourceEvent)用于查询DDoS攻击源信息列表。
//
// 可能返回的错误码:
-// OPERATIONDENIED = "OperationDenied"
// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeDnsRecords(request *DescribeDnsRecordsRequest) (response *DescribeDnsRecordsResponse, err error) {
- return c.DescribeDnsRecordsWithContext(context.Background(), request)
+func (c *Client) DescribeDDoSAttackSourceEvent(request *DescribeDDoSAttackSourceEventRequest) (response *DescribeDDoSAttackSourceEventResponse, err error) {
+ return c.DescribeDDoSAttackSourceEventWithContext(context.Background(), request)
}
-// DescribeDnsRecords
-// 查询 DNS 记录列表,支持搜索、分页、排序、过滤。
+// DescribeDDoSAttackSourceEvent
+// 本接口(DescribeDDoSAttackSourceEvent)用于查询DDoS攻击源信息列表。
//
// 可能返回的错误码:
-// OPERATIONDENIED = "OperationDenied"
// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeDnsRecordsWithContext(ctx context.Context, request *DescribeDnsRecordsRequest) (response *DescribeDnsRecordsResponse, err error) {
+func (c *Client) DescribeDDoSAttackSourceEventWithContext(ctx context.Context, request *DescribeDDoSAttackSourceEventRequest) (response *DescribeDDoSAttackSourceEventResponse, err error) {
if request == nil {
- request = NewDescribeDnsRecordsRequest()
+ request = NewDescribeDDoSAttackSourceEventRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeDnsRecords require credential")
+ return nil, errors.New("DescribeDDoSAttackSourceEvent require credential")
}
request.SetContext(ctx)
- response = NewDescribeDnsRecordsResponse()
+ response = NewDescribeDDoSAttackSourceEventResponse()
err = c.Send(request, response)
return
}
-func NewDescribeDnssecRequest() (request *DescribeDnssecRequest) {
- request = &DescribeDnssecRequest{
+func NewDescribeDDoSAttackTopDataRequest() (request *DescribeDDoSAttackTopDataRequest) {
+ request = &DescribeDDoSAttackTopDataRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeDnssec")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeDDoSAttackTopData")
return
}
-func NewDescribeDnssecResponse() (response *DescribeDnssecResponse) {
- response = &DescribeDnssecResponse{
+func NewDescribeDDoSAttackTopDataResponse() (response *DescribeDDoSAttackTopDataResponse) {
+ response = &DescribeDDoSAttackTopDataResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeDnssec
-// 用于查询 DNSSEC 相关信息
+// DescribeDDoSAttackTopData
+// 本接口(DescribeDDoSAttackTopData)用于查询DDoS攻击Top数据。
//
// 可能返回的错误码:
-// OPERATIONDENIED = "OperationDenied"
// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeDnssec(request *DescribeDnssecRequest) (response *DescribeDnssecResponse, err error) {
- return c.DescribeDnssecWithContext(context.Background(), request)
+func (c *Client) DescribeDDoSAttackTopData(request *DescribeDDoSAttackTopDataRequest) (response *DescribeDDoSAttackTopDataResponse, err error) {
+ return c.DescribeDDoSAttackTopDataWithContext(context.Background(), request)
}
-// DescribeDnssec
-// 用于查询 DNSSEC 相关信息
+// DescribeDDoSAttackTopData
+// 本接口(DescribeDDoSAttackTopData)用于查询DDoS攻击Top数据。
//
// 可能返回的错误码:
-// OPERATIONDENIED = "OperationDenied"
// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeDnssecWithContext(ctx context.Context, request *DescribeDnssecRequest) (response *DescribeDnssecResponse, err error) {
+func (c *Client) DescribeDDoSAttackTopDataWithContext(ctx context.Context, request *DescribeDDoSAttackTopDataRequest) (response *DescribeDDoSAttackTopDataResponse, err error) {
if request == nil {
- request = NewDescribeDnssecRequest()
+ request = NewDescribeDDoSAttackTopDataRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeDnssec require credential")
+ return nil, errors.New("DescribeDDoSAttackTopData require credential")
}
request.SetContext(ctx)
- response = NewDescribeDnssecResponse()
+ response = NewDescribeDDoSAttackTopDataResponse()
err = c.Send(request, response)
return
}
-func NewDescribeHostsCertificateRequest() (request *DescribeHostsCertificateRequest) {
- request = &DescribeHostsCertificateRequest{
+func NewDescribeDDoSBlockListRequest() (request *DescribeDDoSBlockListRequest) {
+ request = &DescribeDDoSBlockListRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeHostsCertificate")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeDDoSBlockList")
return
}
-func NewDescribeHostsCertificateResponse() (response *DescribeHostsCertificateResponse) {
- response = &DescribeHostsCertificateResponse{
+func NewDescribeDDoSBlockListResponse() (response *DescribeDDoSBlockListResponse) {
+ response = &DescribeDDoSBlockListResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeHostsCertificate
-// 查询域名证书列表,支持搜索、分页、排序、过滤。
+// DescribeDDoSBlockList
+// 本接口(DescribeDDoSBlockList)用于查询DDoS封禁解封列表。
//
// 可能返回的错误码:
-// INTERNALERROR_PROXYSERVER = "InternalError.ProxyServer"
-// INTERNALERROR_ROUTEERROR = "InternalError.RouteError"
-// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError"
-// OPERATIONDENIED = "OperationDenied"
-// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission"
-func (c *Client) DescribeHostsCertificate(request *DescribeHostsCertificateRequest) (response *DescribeHostsCertificateResponse, err error) {
- return c.DescribeHostsCertificateWithContext(context.Background(), request)
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) DescribeDDoSBlockList(request *DescribeDDoSBlockListRequest) (response *DescribeDDoSBlockListResponse, err error) {
+ return c.DescribeDDoSBlockListWithContext(context.Background(), request)
}
-// DescribeHostsCertificate
-// 查询域名证书列表,支持搜索、分页、排序、过滤。
+// DescribeDDoSBlockList
+// 本接口(DescribeDDoSBlockList)用于查询DDoS封禁解封列表。
//
// 可能返回的错误码:
-// INTERNALERROR_PROXYSERVER = "InternalError.ProxyServer"
-// INTERNALERROR_ROUTEERROR = "InternalError.RouteError"
-// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError"
-// OPERATIONDENIED = "OperationDenied"
-// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission"
-func (c *Client) DescribeHostsCertificateWithContext(ctx context.Context, request *DescribeHostsCertificateRequest) (response *DescribeHostsCertificateResponse, err error) {
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) DescribeDDoSBlockListWithContext(ctx context.Context, request *DescribeDDoSBlockListRequest) (response *DescribeDDoSBlockListResponse, err error) {
if request == nil {
- request = NewDescribeHostsCertificateRequest()
+ request = NewDescribeDDoSBlockListRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeHostsCertificate require credential")
+ return nil, errors.New("DescribeDDoSBlockList require credential")
}
request.SetContext(ctx)
- response = NewDescribeHostsCertificateResponse()
+ response = NewDescribeDDoSBlockListResponse()
err = c.Send(request, response)
return
}
-func NewDescribeHostsSettingRequest() (request *DescribeHostsSettingRequest) {
- request = &DescribeHostsSettingRequest{
+func NewDescribeDDoSMajorAttackEventRequest() (request *DescribeDDoSMajorAttackEventRequest) {
+ request = &DescribeDDoSMajorAttackEventRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeHostsSetting")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeDDoSMajorAttackEvent")
return
}
-func NewDescribeHostsSettingResponse() (response *DescribeHostsSettingResponse) {
- response = &DescribeHostsSettingResponse{
+func NewDescribeDDoSMajorAttackEventResponse() (response *DescribeDDoSMajorAttackEventResponse) {
+ response = &DescribeDDoSMajorAttackEventResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeHostsSetting
-// 用于查询域名配置信息
+// DescribeDDoSMajorAttackEvent
+// 本接口(DescribeDDoSMajorAttackEvent)用于查询DDoS主攻击事件列表。
//
// 可能返回的错误码:
-// INVALIDPARAMETER = "InvalidParameter"
+// FAILEDOPERATION = "FailedOperation"
+// INTERNALERROR_ROUTEERROR = "InternalError.RouteError"
+// LIMITEXCEEDED = "LimitExceeded"
// OPERATIONDENIED = "OperationDenied"
// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission"
-func (c *Client) DescribeHostsSetting(request *DescribeHostsSettingRequest) (response *DescribeHostsSettingResponse, err error) {
- return c.DescribeHostsSettingWithContext(context.Background(), request)
+func (c *Client) DescribeDDoSMajorAttackEvent(request *DescribeDDoSMajorAttackEventRequest) (response *DescribeDDoSMajorAttackEventResponse, err error) {
+ return c.DescribeDDoSMajorAttackEventWithContext(context.Background(), request)
}
-// DescribeHostsSetting
-// 用于查询域名配置信息
+// DescribeDDoSMajorAttackEvent
+// 本接口(DescribeDDoSMajorAttackEvent)用于查询DDoS主攻击事件列表。
//
// 可能返回的错误码:
-// INVALIDPARAMETER = "InvalidParameter"
+// FAILEDOPERATION = "FailedOperation"
+// INTERNALERROR_ROUTEERROR = "InternalError.RouteError"
+// LIMITEXCEEDED = "LimitExceeded"
// OPERATIONDENIED = "OperationDenied"
// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission"
-func (c *Client) DescribeHostsSettingWithContext(ctx context.Context, request *DescribeHostsSettingRequest) (response *DescribeHostsSettingResponse, err error) {
+func (c *Client) DescribeDDoSMajorAttackEventWithContext(ctx context.Context, request *DescribeDDoSMajorAttackEventRequest) (response *DescribeDDoSMajorAttackEventResponse, err error) {
if request == nil {
- request = NewDescribeHostsSettingRequest()
+ request = NewDescribeDDoSMajorAttackEventRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeHostsSetting require credential")
+ return nil, errors.New("DescribeDDoSMajorAttackEvent require credential")
}
request.SetContext(ctx)
- response = NewDescribeHostsSettingResponse()
+ response = NewDescribeDDoSMajorAttackEventResponse()
err = c.Send(request, response)
return
}
-func NewDescribeIdentificationRequest() (request *DescribeIdentificationRequest) {
- request = &DescribeIdentificationRequest{
+func NewDescribeDDoSPolicyRequest() (request *DescribeDDoSPolicyRequest) {
+ request = &DescribeDDoSPolicyRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeIdentification")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeDDoSPolicy")
return
}
-func NewDescribeIdentificationResponse() (response *DescribeIdentificationResponse) {
- response = &DescribeIdentificationResponse{
+func NewDescribeDDoSPolicyResponse() (response *DescribeDDoSPolicyResponse) {
+ response = &DescribeDDoSPolicyResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeIdentification
-// 查询验证结果
+// DescribeDDoSPolicy
+// 查询DDoS防护配置详情
//
// 可能返回的错误码:
-// RESOURCENOTFOUND = "ResourceNotFound"
-func (c *Client) DescribeIdentification(request *DescribeIdentificationRequest) (response *DescribeIdentificationResponse, err error) {
- return c.DescribeIdentificationWithContext(context.Background(), request)
+// FAILEDOPERATION = "FailedOperation"
+// INTERNALERROR_ROUTEERROR = "InternalError.RouteError"
+// LIMITEXCEEDED = "LimitExceeded"
+// OPERATIONDENIED = "OperationDenied"
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) DescribeDDoSPolicy(request *DescribeDDoSPolicyRequest) (response *DescribeDDoSPolicyResponse, err error) {
+ return c.DescribeDDoSPolicyWithContext(context.Background(), request)
}
-// DescribeIdentification
-// 查询验证结果
+// DescribeDDoSPolicy
+// 查询DDoS防护配置详情
//
// 可能返回的错误码:
-// RESOURCENOTFOUND = "ResourceNotFound"
-func (c *Client) DescribeIdentificationWithContext(ctx context.Context, request *DescribeIdentificationRequest) (response *DescribeIdentificationResponse, err error) {
+// FAILEDOPERATION = "FailedOperation"
+// INTERNALERROR_ROUTEERROR = "InternalError.RouteError"
+// LIMITEXCEEDED = "LimitExceeded"
+// OPERATIONDENIED = "OperationDenied"
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) DescribeDDoSPolicyWithContext(ctx context.Context, request *DescribeDDoSPolicyRequest) (response *DescribeDDoSPolicyResponse, err error) {
if request == nil {
- request = NewDescribeIdentificationRequest()
+ request = NewDescribeDDoSPolicyRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeIdentification require credential")
+ return nil, errors.New("DescribeDDoSPolicy require credential")
}
request.SetContext(ctx)
- response = NewDescribeIdentificationResponse()
+ response = NewDescribeDDoSPolicyResponse()
err = c.Send(request, response)
return
}
-func NewDescribeLoadBalancingRequest() (request *DescribeLoadBalancingRequest) {
- request = &DescribeLoadBalancingRequest{
+func NewDescribeDefaultCertificatesRequest() (request *DescribeDefaultCertificatesRequest) {
+ request = &DescribeDefaultCertificatesRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeLoadBalancing")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeDefaultCertificates")
return
}
-func NewDescribeLoadBalancingResponse() (response *DescribeLoadBalancingResponse) {
- response = &DescribeLoadBalancingResponse{
+func NewDescribeDefaultCertificatesResponse() (response *DescribeDefaultCertificatesResponse) {
+ response = &DescribeDefaultCertificatesResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeLoadBalancing
-// 获取负载均衡列表
+// DescribeDefaultCertificates
+// 查询默认证书列表
//
// 可能返回的错误码:
+// INTERNALERROR_DBERROR = "InternalError.DBError"
+// INTERNALERROR_ROUTEERROR = "InternalError.RouteError"
+// OPERATIONDENIED = "OperationDenied"
+// RESOURCEUNAVAILABLE_ZONENOTFOUND = "ResourceUnavailable.ZoneNotFound"
// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission"
-func (c *Client) DescribeLoadBalancing(request *DescribeLoadBalancingRequest) (response *DescribeLoadBalancingResponse, err error) {
- return c.DescribeLoadBalancingWithContext(context.Background(), request)
+func (c *Client) DescribeDefaultCertificates(request *DescribeDefaultCertificatesRequest) (response *DescribeDefaultCertificatesResponse, err error) {
+ return c.DescribeDefaultCertificatesWithContext(context.Background(), request)
}
-// DescribeLoadBalancing
-// 获取负载均衡列表
+// DescribeDefaultCertificates
+// 查询默认证书列表
//
// 可能返回的错误码:
+// INTERNALERROR_DBERROR = "InternalError.DBError"
+// INTERNALERROR_ROUTEERROR = "InternalError.RouteError"
+// OPERATIONDENIED = "OperationDenied"
+// RESOURCEUNAVAILABLE_ZONENOTFOUND = "ResourceUnavailable.ZoneNotFound"
// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission"
-func (c *Client) DescribeLoadBalancingWithContext(ctx context.Context, request *DescribeLoadBalancingRequest) (response *DescribeLoadBalancingResponse, err error) {
+func (c *Client) DescribeDefaultCertificatesWithContext(ctx context.Context, request *DescribeDefaultCertificatesRequest) (response *DescribeDefaultCertificatesResponse, err error) {
if request == nil {
- request = NewDescribeLoadBalancingRequest()
+ request = NewDescribeDefaultCertificatesRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeLoadBalancing require credential")
+ return nil, errors.New("DescribeDefaultCertificates require credential")
}
request.SetContext(ctx)
- response = NewDescribeLoadBalancingResponse()
+ response = NewDescribeDefaultCertificatesResponse()
err = c.Send(request, response)
return
}
-func NewDescribeLoadBalancingDetailRequest() (request *DescribeLoadBalancingDetailRequest) {
- request = &DescribeLoadBalancingDetailRequest{
+func NewDescribeDnsDataRequest() (request *DescribeDnsDataRequest) {
+ request = &DescribeDnsDataRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeLoadBalancingDetail")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeDnsData")
return
}
-func NewDescribeLoadBalancingDetailResponse() (response *DescribeLoadBalancingDetailResponse) {
- response = &DescribeLoadBalancingDetailResponse{
+func NewDescribeDnsDataResponse() (response *DescribeDnsDataResponse) {
+ response = &DescribeDnsDataResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeLoadBalancingDetail
-// 获取负载均衡详细信息
+// DescribeDnsData
+// 获取DNS请求数统计曲线
//
// 可能返回的错误码:
-// RESOURCENOTFOUND = "ResourceNotFound"
-func (c *Client) DescribeLoadBalancingDetail(request *DescribeLoadBalancingDetailRequest) (response *DescribeLoadBalancingDetailResponse, err error) {
- return c.DescribeLoadBalancingDetailWithContext(context.Background(), request)
+// OPERATIONDENIED = "OperationDenied"
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) DescribeDnsData(request *DescribeDnsDataRequest) (response *DescribeDnsDataResponse, err error) {
+ return c.DescribeDnsDataWithContext(context.Background(), request)
}
-// DescribeLoadBalancingDetail
-// 获取负载均衡详细信息
+// DescribeDnsData
+// 获取DNS请求数统计曲线
//
// 可能返回的错误码:
-// RESOURCENOTFOUND = "ResourceNotFound"
-func (c *Client) DescribeLoadBalancingDetailWithContext(ctx context.Context, request *DescribeLoadBalancingDetailRequest) (response *DescribeLoadBalancingDetailResponse, err error) {
+// OPERATIONDENIED = "OperationDenied"
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) DescribeDnsDataWithContext(ctx context.Context, request *DescribeDnsDataRequest) (response *DescribeDnsDataResponse, err error) {
if request == nil {
- request = NewDescribeLoadBalancingDetailRequest()
+ request = NewDescribeDnsDataRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeLoadBalancingDetail require credential")
+ return nil, errors.New("DescribeDnsData require credential")
}
request.SetContext(ctx)
- response = NewDescribeLoadBalancingDetailResponse()
+ response = NewDescribeDnsDataResponse()
err = c.Send(request, response)
return
}
-func NewDescribeOriginGroupRequest() (request *DescribeOriginGroupRequest) {
- request = &DescribeOriginGroupRequest{
+func NewDescribeDnsRecordsRequest() (request *DescribeDnsRecordsRequest) {
+ request = &DescribeDnsRecordsRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeOriginGroup")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeDnsRecords")
return
}
-func NewDescribeOriginGroupResponse() (response *DescribeOriginGroupResponse) {
- response = &DescribeOriginGroupResponse{
+func NewDescribeDnsRecordsResponse() (response *DescribeDnsRecordsResponse) {
+ response = &DescribeDnsRecordsResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeOriginGroup
-// 获取源站组信息列表
+// DescribeDnsRecords
+// 查询 DNS 记录列表,支持搜索、分页、排序、过滤。
//
// 可能返回的错误码:
-// RESOURCENOTFOUND = "ResourceNotFound"
-func (c *Client) DescribeOriginGroup(request *DescribeOriginGroupRequest) (response *DescribeOriginGroupResponse, err error) {
- return c.DescribeOriginGroupWithContext(context.Background(), request)
+// OPERATIONDENIED = "OperationDenied"
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) DescribeDnsRecords(request *DescribeDnsRecordsRequest) (response *DescribeDnsRecordsResponse, err error) {
+ return c.DescribeDnsRecordsWithContext(context.Background(), request)
}
-// DescribeOriginGroup
-// 获取源站组信息列表
+// DescribeDnsRecords
+// 查询 DNS 记录列表,支持搜索、分页、排序、过滤。
//
// 可能返回的错误码:
-// RESOURCENOTFOUND = "ResourceNotFound"
-func (c *Client) DescribeOriginGroupWithContext(ctx context.Context, request *DescribeOriginGroupRequest) (response *DescribeOriginGroupResponse, err error) {
+// OPERATIONDENIED = "OperationDenied"
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) DescribeDnsRecordsWithContext(ctx context.Context, request *DescribeDnsRecordsRequest) (response *DescribeDnsRecordsResponse, err error) {
if request == nil {
- request = NewDescribeOriginGroupRequest()
+ request = NewDescribeDnsRecordsRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeOriginGroup require credential")
+ return nil, errors.New("DescribeDnsRecords require credential")
}
request.SetContext(ctx)
- response = NewDescribeOriginGroupResponse()
+ response = NewDescribeDnsRecordsResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeDnssecRequest() (request *DescribeDnssecRequest) {
+ request = &DescribeDnssecRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeDnssec")
+
+
+ return
+}
+
+func NewDescribeDnssecResponse() (response *DescribeDnssecResponse) {
+ response = &DescribeDnssecResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+}
+
+// DescribeDnssec
+// 用于查询 DNSSEC 相关信息
+//
+// 可能返回的错误码:
+// OPERATIONDENIED = "OperationDenied"
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) DescribeDnssec(request *DescribeDnssecRequest) (response *DescribeDnssecResponse, err error) {
+ return c.DescribeDnssecWithContext(context.Background(), request)
+}
+
+// DescribeDnssec
+// 用于查询 DNSSEC 相关信息
+//
+// 可能返回的错误码:
+// OPERATIONDENIED = "OperationDenied"
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) DescribeDnssecWithContext(ctx context.Context, request *DescribeDnssecRequest) (response *DescribeDnssecResponse, err error) {
+ if request == nil {
+ request = NewDescribeDnssecRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeDnssec require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeDnssecResponse()
err = c.Send(request, response)
return
}
-func NewDescribeOriginGroupDetailRequest() (request *DescribeOriginGroupDetailRequest) {
- request = &DescribeOriginGroupDetailRequest{
+func NewDescribeHostCertificatesRequest() (request *DescribeHostCertificatesRequest) {
+ request = &DescribeHostCertificatesRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeOriginGroupDetail")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeHostCertificates")
return
}
-func NewDescribeOriginGroupDetailResponse() (response *DescribeOriginGroupDetailResponse) {
- response = &DescribeOriginGroupDetailResponse{
+func NewDescribeHostCertificatesResponse() (response *DescribeHostCertificatesResponse) {
+ response = &DescribeHostCertificatesResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeOriginGroupDetail
-// 获取源站组详细信息
+// DescribeHostCertificates
+// 查询域名证书列表,支持搜索、分页、排序、过滤。
+//
+// 可能返回的错误码:
+// INTERNALERROR_PROXYSERVER = "InternalError.ProxyServer"
+// INTERNALERROR_ROUTEERROR = "InternalError.RouteError"
+// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError"
+// INVALIDPARAMETER_INVALIDFILTERNAME = "InvalidParameter.InvalidFilterName"
+// OPERATIONDENIED = "OperationDenied"
+// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission"
+func (c *Client) DescribeHostCertificates(request *DescribeHostCertificatesRequest) (response *DescribeHostCertificatesResponse, err error) {
+ return c.DescribeHostCertificatesWithContext(context.Background(), request)
+}
+
+// DescribeHostCertificates
+// 查询域名证书列表,支持搜索、分页、排序、过滤。
+//
+// 可能返回的错误码:
+// INTERNALERROR_PROXYSERVER = "InternalError.ProxyServer"
+// INTERNALERROR_ROUTEERROR = "InternalError.RouteError"
+// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError"
+// INVALIDPARAMETER_INVALIDFILTERNAME = "InvalidParameter.InvalidFilterName"
+// OPERATIONDENIED = "OperationDenied"
+// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission"
+func (c *Client) DescribeHostCertificatesWithContext(ctx context.Context, request *DescribeHostCertificatesRequest) (response *DescribeHostCertificatesResponse, err error) {
+ if request == nil {
+ request = NewDescribeHostCertificatesRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeHostCertificates require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeHostCertificatesResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeHostsSettingRequest() (request *DescribeHostsSettingRequest) {
+ request = &DescribeHostsSettingRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeHostsSetting")
+
+
+ return
+}
+
+func NewDescribeHostsSettingResponse() (response *DescribeHostsSettingResponse) {
+ response = &DescribeHostsSettingResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+}
+
+// DescribeHostsSetting
+// 用于查询域名配置信息
+//
+// 可能返回的错误码:
+// INVALIDPARAMETER = "InvalidParameter"
+// OPERATIONDENIED = "OperationDenied"
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission"
+func (c *Client) DescribeHostsSetting(request *DescribeHostsSettingRequest) (response *DescribeHostsSettingResponse, err error) {
+ return c.DescribeHostsSettingWithContext(context.Background(), request)
+}
+
+// DescribeHostsSetting
+// 用于查询域名配置信息
+//
+// 可能返回的错误码:
+// INVALIDPARAMETER = "InvalidParameter"
+// OPERATIONDENIED = "OperationDenied"
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission"
+func (c *Client) DescribeHostsSettingWithContext(ctx context.Context, request *DescribeHostsSettingRequest) (response *DescribeHostsSettingResponse, err error) {
+ if request == nil {
+ request = NewDescribeHostsSettingRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeHostsSetting require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeHostsSettingResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeIdentificationsRequest() (request *DescribeIdentificationsRequest) {
+ request = &DescribeIdentificationsRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeIdentifications")
+
+
+ return
+}
+
+func NewDescribeIdentificationsResponse() (response *DescribeIdentificationsResponse) {
+ response = &DescribeIdentificationsResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+}
+
+// DescribeIdentifications
+// 查询站点的验证信息。
//
// 可能返回的错误码:
// RESOURCENOTFOUND = "ResourceNotFound"
-func (c *Client) DescribeOriginGroupDetail(request *DescribeOriginGroupDetailRequest) (response *DescribeOriginGroupDetailResponse, err error) {
- return c.DescribeOriginGroupDetailWithContext(context.Background(), request)
+func (c *Client) DescribeIdentifications(request *DescribeIdentificationsRequest) (response *DescribeIdentificationsResponse, err error) {
+ return c.DescribeIdentificationsWithContext(context.Background(), request)
}
-// DescribeOriginGroupDetail
-// 获取源站组详细信息
+// DescribeIdentifications
+// 查询站点的验证信息。
//
// 可能返回的错误码:
// RESOURCENOTFOUND = "ResourceNotFound"
-func (c *Client) DescribeOriginGroupDetailWithContext(ctx context.Context, request *DescribeOriginGroupDetailRequest) (response *DescribeOriginGroupDetailResponse, err error) {
+func (c *Client) DescribeIdentificationsWithContext(ctx context.Context, request *DescribeIdentificationsRequest) (response *DescribeIdentificationsResponse, err error) {
+ if request == nil {
+ request = NewDescribeIdentificationsRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeIdentifications require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeIdentificationsResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeLoadBalancingRequest() (request *DescribeLoadBalancingRequest) {
+ request = &DescribeLoadBalancingRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeLoadBalancing")
+
+
+ return
+}
+
+func NewDescribeLoadBalancingResponse() (response *DescribeLoadBalancingResponse) {
+ response = &DescribeLoadBalancingResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+}
+
+// DescribeLoadBalancing
+// 获取负载均衡列表
+//
+// 可能返回的错误码:
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission"
+func (c *Client) DescribeLoadBalancing(request *DescribeLoadBalancingRequest) (response *DescribeLoadBalancingResponse, err error) {
+ return c.DescribeLoadBalancingWithContext(context.Background(), request)
+}
+
+// DescribeLoadBalancing
+// 获取负载均衡列表
+//
+// 可能返回的错误码:
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission"
+func (c *Client) DescribeLoadBalancingWithContext(ctx context.Context, request *DescribeLoadBalancingRequest) (response *DescribeLoadBalancingResponse, err error) {
+ if request == nil {
+ request = NewDescribeLoadBalancingRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeLoadBalancing require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeLoadBalancingResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeLogSetsRequest() (request *DescribeLogSetsRequest) {
+ request = &DescribeLogSetsRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeLogSets")
+
+
+ return
+}
+
+func NewDescribeLogSetsResponse() (response *DescribeLogSetsResponse) {
+ response = &DescribeLogSetsResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+}
+
+// DescribeLogSets
+// 本接口(DescribeLogSets)用于获取日志集列表。
+//
+// 可能返回的错误码:
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission"
+func (c *Client) DescribeLogSets(request *DescribeLogSetsRequest) (response *DescribeLogSetsResponse, err error) {
+ return c.DescribeLogSetsWithContext(context.Background(), request)
+}
+
+// DescribeLogSets
+// 本接口(DescribeLogSets)用于获取日志集列表。
+//
+// 可能返回的错误码:
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission"
+func (c *Client) DescribeLogSetsWithContext(ctx context.Context, request *DescribeLogSetsRequest) (response *DescribeLogSetsResponse, err error) {
+ if request == nil {
+ request = NewDescribeLogSetsRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeLogSets require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeLogSetsResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeLogTopicTaskDetailRequest() (request *DescribeLogTopicTaskDetailRequest) {
+ request = &DescribeLogTopicTaskDetailRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeLogTopicTaskDetail")
+
+
+ return
+}
+
+func NewDescribeLogTopicTaskDetailResponse() (response *DescribeLogTopicTaskDetailResponse) {
+ response = &DescribeLogTopicTaskDetailResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+}
+
+// DescribeLogTopicTaskDetail
+// 本接口(DescribeLogTopicTaskDetail)用于获取日志推送任务详细信息。
+//
+// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
+func (c *Client) DescribeLogTopicTaskDetail(request *DescribeLogTopicTaskDetailRequest) (response *DescribeLogTopicTaskDetailResponse, err error) {
+ return c.DescribeLogTopicTaskDetailWithContext(context.Background(), request)
+}
+
+// DescribeLogTopicTaskDetail
+// 本接口(DescribeLogTopicTaskDetail)用于获取日志推送任务详细信息。
+//
+// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
+func (c *Client) DescribeLogTopicTaskDetailWithContext(ctx context.Context, request *DescribeLogTopicTaskDetailRequest) (response *DescribeLogTopicTaskDetailResponse, err error) {
if request == nil {
- request = NewDescribeOriginGroupDetailRequest()
+ request = NewDescribeLogTopicTaskDetailRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeOriginGroupDetail require credential")
+ return nil, errors.New("DescribeLogTopicTaskDetail require credential")
}
request.SetContext(ctx)
- response = NewDescribeOriginGroupDetailResponse()
+ response = NewDescribeLogTopicTaskDetailResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeLogTopicTasksRequest() (request *DescribeLogTopicTasksRequest) {
+ request = &DescribeLogTopicTasksRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeLogTopicTasks")
+
+
+ return
+}
+
+func NewDescribeLogTopicTasksResponse() (response *DescribeLogTopicTasksResponse) {
+ response = &DescribeLogTopicTasksResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+}
+
+// DescribeLogTopicTasks
+// 本接口(DescribeLogTopicTasks)用于获取日志推送任务列表。
+//
+// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
+func (c *Client) DescribeLogTopicTasks(request *DescribeLogTopicTasksRequest) (response *DescribeLogTopicTasksResponse, err error) {
+ return c.DescribeLogTopicTasksWithContext(context.Background(), request)
+}
+
+// DescribeLogTopicTasks
+// 本接口(DescribeLogTopicTasks)用于获取日志推送任务列表。
+//
+// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
+func (c *Client) DescribeLogTopicTasksWithContext(ctx context.Context, request *DescribeLogTopicTasksRequest) (response *DescribeLogTopicTasksResponse, err error) {
+ if request == nil {
+ request = NewDescribeLogTopicTasksRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeLogTopicTasks require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeLogTopicTasksResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeOriginGroupRequest() (request *DescribeOriginGroupRequest) {
+ request = &DescribeOriginGroupRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeOriginGroup")
+
+
+ return
+}
+
+func NewDescribeOriginGroupResponse() (response *DescribeOriginGroupResponse) {
+ response = &DescribeOriginGroupResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+}
+
+// DescribeOriginGroup
+// 获取源站组列表
+//
+// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
+func (c *Client) DescribeOriginGroup(request *DescribeOriginGroupRequest) (response *DescribeOriginGroupResponse, err error) {
+ return c.DescribeOriginGroupWithContext(context.Background(), request)
+}
+
+// DescribeOriginGroup
+// 获取源站组列表
+//
+// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
+func (c *Client) DescribeOriginGroupWithContext(ctx context.Context, request *DescribeOriginGroupRequest) (response *DescribeOriginGroupResponse, err error) {
+ if request == nil {
+ request = NewDescribeOriginGroupRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeOriginGroup require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeOriginGroupResponse()
err = c.Send(request, response)
return
}
@@ -2360,7 +3178,7 @@ func NewDescribeOverviewL7DataResponse() (response *DescribeOverviewL7DataRespon
}
// DescribeOverviewL7Data
-// 查询七层监控类时序流量数据
+// 本接口(DescribeOverviewL7Data)用于查询七层监控类时序流量数据。
//
// 可能返回的错误码:
// INTERNALERROR_ROUTEERROR = "InternalError.RouteError"
@@ -2371,7 +3189,7 @@ func (c *Client) DescribeOverviewL7Data(request *DescribeOverviewL7DataRequest)
}
// DescribeOverviewL7Data
-// 查询七层监控类时序流量数据
+// 本接口(DescribeOverviewL7Data)用于查询七层监控类时序流量数据。
//
// 可能返回的错误码:
// INTERNALERROR_ROUTEERROR = "InternalError.RouteError"
@@ -2447,54 +3265,108 @@ func (c *Client) DescribePrefetchTasksWithContext(ctx context.Context, request *
return
}
-func NewDescribePurgeTasksRequest() (request *DescribePurgeTasksRequest) {
- request = &DescribePurgeTasksRequest{
+func NewDescribePurgeTasksRequest() (request *DescribePurgeTasksRequest) {
+ request = &DescribePurgeTasksRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "DescribePurgeTasks")
+
+
+ return
+}
+
+func NewDescribePurgeTasksResponse() (response *DescribePurgeTasksResponse) {
+ response = &DescribePurgeTasksResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+}
+
+// DescribePurgeTasks
+// 查询清除缓存历史记录
+//
+// 可能返回的错误码:
+// INTERNALERROR = "InternalError"
+// INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
+// OPERATIONDENIED = "OperationDenied"
+func (c *Client) DescribePurgeTasks(request *DescribePurgeTasksRequest) (response *DescribePurgeTasksResponse, err error) {
+ return c.DescribePurgeTasksWithContext(context.Background(), request)
+}
+
+// DescribePurgeTasks
+// 查询清除缓存历史记录
+//
+// 可能返回的错误码:
+// INTERNALERROR = "InternalError"
+// INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
+// OPERATIONDENIED = "OperationDenied"
+func (c *Client) DescribePurgeTasksWithContext(ctx context.Context, request *DescribePurgeTasksRequest) (response *DescribePurgeTasksResponse, err error) {
+ if request == nil {
+ request = NewDescribePurgeTasksRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribePurgeTasks require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribePurgeTasksResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeRateLimitIntelligenceRuleRequest() (request *DescribeRateLimitIntelligenceRuleRequest) {
+ request = &DescribeRateLimitIntelligenceRuleRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribePurgeTasks")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeRateLimitIntelligenceRule")
return
}
-func NewDescribePurgeTasksResponse() (response *DescribePurgeTasksResponse) {
- response = &DescribePurgeTasksResponse{
+func NewDescribeRateLimitIntelligenceRuleResponse() (response *DescribeRateLimitIntelligenceRuleResponse) {
+ response = &DescribeRateLimitIntelligenceRuleResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribePurgeTasks
-// 查询清除缓存历史记录
+// DescribeRateLimitIntelligenceRule
+// 查询速率限制智能客户端过滤学习出来的规则
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
-// INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
-// OPERATIONDENIED = "OperationDenied"
-func (c *Client) DescribePurgeTasks(request *DescribePurgeTasksRequest) (response *DescribePurgeTasksResponse, err error) {
- return c.DescribePurgeTasksWithContext(context.Background(), request)
+// INVALIDPARAMETER = "InvalidParameter"
+// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
+// UNAUTHORIZEDOPERATION_UNKNOWN = "UnauthorizedOperation.Unknown"
+func (c *Client) DescribeRateLimitIntelligenceRule(request *DescribeRateLimitIntelligenceRuleRequest) (response *DescribeRateLimitIntelligenceRuleResponse, err error) {
+ return c.DescribeRateLimitIntelligenceRuleWithContext(context.Background(), request)
}
-// DescribePurgeTasks
-// 查询清除缓存历史记录
+// DescribeRateLimitIntelligenceRule
+// 查询速率限制智能客户端过滤学习出来的规则
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
-// INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
-// OPERATIONDENIED = "OperationDenied"
-func (c *Client) DescribePurgeTasksWithContext(ctx context.Context, request *DescribePurgeTasksRequest) (response *DescribePurgeTasksResponse, err error) {
+// INVALIDPARAMETER = "InvalidParameter"
+// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
+// UNAUTHORIZEDOPERATION_UNKNOWN = "UnauthorizedOperation.Unknown"
+func (c *Client) DescribeRateLimitIntelligenceRuleWithContext(ctx context.Context, request *DescribeRateLimitIntelligenceRuleRequest) (response *DescribeRateLimitIntelligenceRuleResponse, err error) {
if request == nil {
- request = NewDescribePurgeTasksRequest()
+ request = NewDescribeRateLimitIntelligenceRuleRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribePurgeTasks require credential")
+ return nil, errors.New("DescribeRateLimitIntelligenceRule require credential")
}
request.SetContext(ctx)
- response = NewDescribePurgeTasksResponse()
+ response = NewDescribeRateLimitIntelligenceRuleResponse()
err = c.Send(request, response)
return
}
@@ -2522,8 +3394,9 @@ func NewDescribeRulesResponse() (response *DescribeRulesResponse) {
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
-// INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
-// OPERATIONDENIED = "OperationDenied"
+// INVALIDPARAMETER = "InvalidParameter"
+// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
+// UNAUTHORIZEDOPERATION_UNKNOWN = "UnauthorizedOperation.Unknown"
func (c *Client) DescribeRules(request *DescribeRulesRequest) (response *DescribeRulesResponse, err error) {
return c.DescribeRulesWithContext(context.Background(), request)
}
@@ -2533,8 +3406,9 @@ func (c *Client) DescribeRules(request *DescribeRulesRequest) (response *Describ
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
-// INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
-// OPERATIONDENIED = "OperationDenied"
+// INVALIDPARAMETER = "InvalidParameter"
+// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
+// UNAUTHORIZEDOPERATION_UNKNOWN = "UnauthorizedOperation.Unknown"
func (c *Client) DescribeRulesWithContext(ctx context.Context, request *DescribeRulesRequest) (response *DescribeRulesResponse, err error) {
if request == nil {
request = NewDescribeRulesRequest()
@@ -2574,8 +3448,9 @@ func NewDescribeRulesSettingResponse() (response *DescribeRulesSettingResponse)
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
-// INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
-// OPERATIONDENIED = "OperationDenied"
+// INVALIDPARAMETER = "InvalidParameter"
+// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
+// UNAUTHORIZEDOPERATION_UNKNOWN = "UnauthorizedOperation.Unknown"
func (c *Client) DescribeRulesSetting(request *DescribeRulesSettingRequest) (response *DescribeRulesSettingResponse, err error) {
return c.DescribeRulesSettingWithContext(context.Background(), request)
}
@@ -2585,8 +3460,9 @@ func (c *Client) DescribeRulesSetting(request *DescribeRulesSettingRequest) (res
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
-// INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
-// OPERATIONDENIED = "OperationDenied"
+// INVALIDPARAMETER = "InvalidParameter"
+// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
+// UNAUTHORIZEDOPERATION_UNKNOWN = "UnauthorizedOperation.Unknown"
func (c *Client) DescribeRulesSettingWithContext(ctx context.Context, request *DescribeRulesSettingRequest) (response *DescribeRulesSettingResponse, err error) {
if request == nil {
request = NewDescribeRulesSettingRequest()
@@ -2603,6 +3479,54 @@ func (c *Client) DescribeRulesSettingWithContext(ctx context.Context, request *D
return
}
+func NewDescribeSecurityGroupManagedRulesRequest() (request *DescribeSecurityGroupManagedRulesRequest) {
+ request = &DescribeSecurityGroupManagedRulesRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeSecurityGroupManagedRules")
+
+
+ return
+}
+
+func NewDescribeSecurityGroupManagedRulesResponse() (response *DescribeSecurityGroupManagedRulesResponse) {
+ response = &DescribeSecurityGroupManagedRulesResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+}
+
+// DescribeSecurityGroupManagedRules
+// 获取托管规则组
+//
+// 可能返回的错误码:
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) DescribeSecurityGroupManagedRules(request *DescribeSecurityGroupManagedRulesRequest) (response *DescribeSecurityGroupManagedRulesResponse, err error) {
+ return c.DescribeSecurityGroupManagedRulesWithContext(context.Background(), request)
+}
+
+// DescribeSecurityGroupManagedRules
+// 获取托管规则组
+//
+// 可能返回的错误码:
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) DescribeSecurityGroupManagedRulesWithContext(ctx context.Context, request *DescribeSecurityGroupManagedRulesRequest) (response *DescribeSecurityGroupManagedRulesResponse, err error) {
+ if request == nil {
+ request = NewDescribeSecurityGroupManagedRulesRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeSecurityGroupManagedRules require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeSecurityGroupManagedRulesResponse()
+ err = c.Send(request, response)
+ return
+}
+
func NewDescribeSecurityPolicyRequest() (request *DescribeSecurityPolicyRequest) {
request = &DescribeSecurityPolicyRequest{
BaseRequest: &tchttp.BaseRequest{},
@@ -2625,9 +3549,7 @@ func NewDescribeSecurityPolicyResponse() (response *DescribeSecurityPolicyRespon
// 查询安全防护配置详情
//
// 可能返回的错误码:
-// INTERNALERROR = "InternalError"
-// INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
-// OPERATIONDENIED = "OperationDenied"
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
func (c *Client) DescribeSecurityPolicy(request *DescribeSecurityPolicyRequest) (response *DescribeSecurityPolicyResponse, err error) {
return c.DescribeSecurityPolicyWithContext(context.Background(), request)
}
@@ -2636,9 +3558,7 @@ func (c *Client) DescribeSecurityPolicy(request *DescribeSecurityPolicyRequest)
// 查询安全防护配置详情
//
// 可能返回的错误码:
-// INTERNALERROR = "InternalError"
-// INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
-// OPERATIONDENIED = "OperationDenied"
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
func (c *Client) DescribeSecurityPolicyWithContext(ctx context.Context, request *DescribeSecurityPolicyRequest) (response *DescribeSecurityPolicyResponse, err error) {
if request == nil {
request = NewDescribeSecurityPolicyRequest()
@@ -2703,196 +3623,356 @@ func (c *Client) DescribeSecurityPolicyListWithContext(ctx context.Context, requ
return
}
-func NewDescribeSecurityPolicyManagedRulesRequest() (request *DescribeSecurityPolicyManagedRulesRequest) {
- request = &DescribeSecurityPolicyManagedRulesRequest{
+func NewDescribeSecurityPolicyRegionsRequest() (request *DescribeSecurityPolicyRegionsRequest) {
+ request = &DescribeSecurityPolicyRegionsRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeSecurityPolicyRegions")
+
+
+ return
+}
+
+func NewDescribeSecurityPolicyRegionsResponse() (response *DescribeSecurityPolicyRegionsResponse) {
+ response = &DescribeSecurityPolicyRegionsResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+}
+
+// DescribeSecurityPolicyRegions
+// 查询所有地域信息
+//
+// 可能返回的错误码:
+// OPERATIONDENIED = "OperationDenied"
+// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission"
+func (c *Client) DescribeSecurityPolicyRegions(request *DescribeSecurityPolicyRegionsRequest) (response *DescribeSecurityPolicyRegionsResponse, err error) {
+ return c.DescribeSecurityPolicyRegionsWithContext(context.Background(), request)
+}
+
+// DescribeSecurityPolicyRegions
+// 查询所有地域信息
+//
+// 可能返回的错误码:
+// OPERATIONDENIED = "OperationDenied"
+// UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission"
+func (c *Client) DescribeSecurityPolicyRegionsWithContext(ctx context.Context, request *DescribeSecurityPolicyRegionsRequest) (response *DescribeSecurityPolicyRegionsResponse, err error) {
+ if request == nil {
+ request = NewDescribeSecurityPolicyRegionsRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeSecurityPolicyRegions require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeSecurityPolicyRegionsResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeSecurityPortraitRulesRequest() (request *DescribeSecurityPortraitRulesRequest) {
+ request = &DescribeSecurityPortraitRulesRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeSecurityPolicyManagedRules")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeSecurityPortraitRules")
return
}
-func NewDescribeSecurityPolicyManagedRulesResponse() (response *DescribeSecurityPolicyManagedRulesResponse) {
- response = &DescribeSecurityPolicyManagedRulesResponse{
+func NewDescribeSecurityPortraitRulesResponse() (response *DescribeSecurityPortraitRulesResponse) {
+ response = &DescribeSecurityPortraitRulesResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeSecurityPolicyManagedRules
-// 分页查询门神规则
+// DescribeSecurityPortraitRules
+// 查询Bot用户画像规则
//
// 可能返回的错误码:
// INVALIDPARAMETER_SECURITY = "InvalidParameter.Security"
-func (c *Client) DescribeSecurityPolicyManagedRules(request *DescribeSecurityPolicyManagedRulesRequest) (response *DescribeSecurityPolicyManagedRulesResponse, err error) {
- return c.DescribeSecurityPolicyManagedRulesWithContext(context.Background(), request)
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) DescribeSecurityPortraitRules(request *DescribeSecurityPortraitRulesRequest) (response *DescribeSecurityPortraitRulesResponse, err error) {
+ return c.DescribeSecurityPortraitRulesWithContext(context.Background(), request)
}
-// DescribeSecurityPolicyManagedRules
-// 分页查询门神规则
+// DescribeSecurityPortraitRules
+// 查询Bot用户画像规则
//
// 可能返回的错误码:
// INVALIDPARAMETER_SECURITY = "InvalidParameter.Security"
-func (c *Client) DescribeSecurityPolicyManagedRulesWithContext(ctx context.Context, request *DescribeSecurityPolicyManagedRulesRequest) (response *DescribeSecurityPolicyManagedRulesResponse, err error) {
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) DescribeSecurityPortraitRulesWithContext(ctx context.Context, request *DescribeSecurityPortraitRulesRequest) (response *DescribeSecurityPortraitRulesResponse, err error) {
if request == nil {
- request = NewDescribeSecurityPolicyManagedRulesRequest()
+ request = NewDescribeSecurityPortraitRulesRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeSecurityPolicyManagedRules require credential")
+ return nil, errors.New("DescribeSecurityPortraitRules require credential")
}
request.SetContext(ctx)
- response = NewDescribeSecurityPolicyManagedRulesResponse()
+ response = NewDescribeSecurityPortraitRulesResponse()
err = c.Send(request, response)
return
}
-func NewDescribeSecurityPolicyManagedRulesIdRequest() (request *DescribeSecurityPolicyManagedRulesIdRequest) {
- request = &DescribeSecurityPolicyManagedRulesIdRequest{
+func NewDescribeSecurityRuleIdRequest() (request *DescribeSecurityRuleIdRequest) {
+ request = &DescribeSecurityRuleIdRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeSecurityPolicyManagedRulesId")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeSecurityRuleId")
return
}
-func NewDescribeSecurityPolicyManagedRulesIdResponse() (response *DescribeSecurityPolicyManagedRulesIdResponse) {
- response = &DescribeSecurityPolicyManagedRulesIdResponse{
+func NewDescribeSecurityRuleIdResponse() (response *DescribeSecurityRuleIdResponse) {
+ response = &DescribeSecurityRuleIdResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeSecurityPolicyManagedRulesId
-// 规则id查询门神规则详情
+// DescribeSecurityRuleId
+// 查询安全规则详情
//
// 可能返回的错误码:
// INVALIDPARAMETER_SECURITY = "InvalidParameter.Security"
-func (c *Client) DescribeSecurityPolicyManagedRulesId(request *DescribeSecurityPolicyManagedRulesIdRequest) (response *DescribeSecurityPolicyManagedRulesIdResponse, err error) {
- return c.DescribeSecurityPolicyManagedRulesIdWithContext(context.Background(), request)
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) DescribeSecurityRuleId(request *DescribeSecurityRuleIdRequest) (response *DescribeSecurityRuleIdResponse, err error) {
+ return c.DescribeSecurityRuleIdWithContext(context.Background(), request)
}
-// DescribeSecurityPolicyManagedRulesId
-// 规则id查询门神规则详情
+// DescribeSecurityRuleId
+// 查询安全规则详情
//
// 可能返回的错误码:
// INVALIDPARAMETER_SECURITY = "InvalidParameter.Security"
-func (c *Client) DescribeSecurityPolicyManagedRulesIdWithContext(ctx context.Context, request *DescribeSecurityPolicyManagedRulesIdRequest) (response *DescribeSecurityPolicyManagedRulesIdResponse, err error) {
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) DescribeSecurityRuleIdWithContext(ctx context.Context, request *DescribeSecurityRuleIdRequest) (response *DescribeSecurityRuleIdResponse, err error) {
if request == nil {
- request = NewDescribeSecurityPolicyManagedRulesIdRequest()
+ request = NewDescribeSecurityRuleIdRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeSecurityPolicyManagedRulesId require credential")
+ return nil, errors.New("DescribeSecurityRuleId require credential")
}
request.SetContext(ctx)
- response = NewDescribeSecurityPolicyManagedRulesIdResponse()
+ response = NewDescribeSecurityRuleIdResponse()
err = c.Send(request, response)
return
}
-func NewDescribeSecurityPolicyRegionsRequest() (request *DescribeSecurityPolicyRegionsRequest) {
- request = &DescribeSecurityPolicyRegionsRequest{
+func NewDescribeSingleL7AnalysisDataRequest() (request *DescribeSingleL7AnalysisDataRequest) {
+ request = &DescribeSingleL7AnalysisDataRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeSecurityPolicyRegions")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeSingleL7AnalysisData")
return
}
-func NewDescribeSecurityPolicyRegionsResponse() (response *DescribeSecurityPolicyRegionsResponse) {
- response = &DescribeSecurityPolicyRegionsResponse{
+func NewDescribeSingleL7AnalysisDataResponse() (response *DescribeSingleL7AnalysisDataResponse) {
+ response = &DescribeSingleL7AnalysisDataResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeSecurityPolicyRegions
-// 查询所有地域信息
+// DescribeSingleL7AnalysisData
+// 本接口(DescribeSingleL7AnalysisData)用于查询七层数据分析类单值流量数据列表。
//
// 可能返回的错误码:
-// OPERATIONDENIED = "OperationDenied"
-func (c *Client) DescribeSecurityPolicyRegions(request *DescribeSecurityPolicyRegionsRequest) (response *DescribeSecurityPolicyRegionsResponse, err error) {
- return c.DescribeSecurityPolicyRegionsWithContext(context.Background(), request)
+// FAILEDOPERATION = "FailedOperation"
+// INTERNALERROR_PROXYSERVER = "InternalError.ProxyServer"
+// RESOURCEUNAVAILABLE = "ResourceUnavailable"
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) DescribeSingleL7AnalysisData(request *DescribeSingleL7AnalysisDataRequest) (response *DescribeSingleL7AnalysisDataResponse, err error) {
+ return c.DescribeSingleL7AnalysisDataWithContext(context.Background(), request)
}
-// DescribeSecurityPolicyRegions
-// 查询所有地域信息
+// DescribeSingleL7AnalysisData
+// 本接口(DescribeSingleL7AnalysisData)用于查询七层数据分析类单值流量数据列表。
//
// 可能返回的错误码:
-// OPERATIONDENIED = "OperationDenied"
-func (c *Client) DescribeSecurityPolicyRegionsWithContext(ctx context.Context, request *DescribeSecurityPolicyRegionsRequest) (response *DescribeSecurityPolicyRegionsResponse, err error) {
+// FAILEDOPERATION = "FailedOperation"
+// INTERNALERROR_PROXYSERVER = "InternalError.ProxyServer"
+// RESOURCEUNAVAILABLE = "ResourceUnavailable"
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) DescribeSingleL7AnalysisDataWithContext(ctx context.Context, request *DescribeSingleL7AnalysisDataRequest) (response *DescribeSingleL7AnalysisDataResponse, err error) {
if request == nil {
- request = NewDescribeSecurityPolicyRegionsRequest()
+ request = NewDescribeSingleL7AnalysisDataRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeSecurityPolicyRegions require credential")
+ return nil, errors.New("DescribeSingleL7AnalysisData require credential")
}
request.SetContext(ctx)
- response = NewDescribeSecurityPolicyRegionsResponse()
+ response = NewDescribeSingleL7AnalysisDataResponse()
err = c.Send(request, response)
return
}
-func NewDescribeSecurityPortraitRulesRequest() (request *DescribeSecurityPortraitRulesRequest) {
- request = &DescribeSecurityPortraitRulesRequest{
+func NewDescribeSpeedTestingDetailsRequest() (request *DescribeSpeedTestingDetailsRequest) {
+ request = &DescribeSpeedTestingDetailsRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeSecurityPortraitRules")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeSpeedTestingDetails")
return
}
-func NewDescribeSecurityPortraitRulesResponse() (response *DescribeSecurityPortraitRulesResponse) {
- response = &DescribeSecurityPortraitRulesResponse{
+func NewDescribeSpeedTestingDetailsResponse() (response *DescribeSpeedTestingDetailsResponse) {
+ response = &DescribeSpeedTestingDetailsResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeSecurityPortraitRules
-// 查询Bot用户画像规则
+// DescribeSpeedTestingDetails
+// 用于查询拨测分地区数据
//
// 可能返回的错误码:
-// INVALIDPARAMETER_SECURITY = "InvalidParameter.Security"
+// FAILEDOPERATION = "FailedOperation"
+// INTERNALERROR_PROXYSERVER = "InternalError.ProxyServer"
+// RESOURCEUNAVAILABLE = "ResourceUnavailable"
// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeSecurityPortraitRules(request *DescribeSecurityPortraitRulesRequest) (response *DescribeSecurityPortraitRulesResponse, err error) {
- return c.DescribeSecurityPortraitRulesWithContext(context.Background(), request)
+func (c *Client) DescribeSpeedTestingDetails(request *DescribeSpeedTestingDetailsRequest) (response *DescribeSpeedTestingDetailsResponse, err error) {
+ return c.DescribeSpeedTestingDetailsWithContext(context.Background(), request)
}
-// DescribeSecurityPortraitRules
-// 查询Bot用户画像规则
+// DescribeSpeedTestingDetails
+// 用于查询拨测分地区数据
//
// 可能返回的错误码:
-// INVALIDPARAMETER_SECURITY = "InvalidParameter.Security"
+// FAILEDOPERATION = "FailedOperation"
+// INTERNALERROR_PROXYSERVER = "InternalError.ProxyServer"
+// RESOURCEUNAVAILABLE = "ResourceUnavailable"
// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeSecurityPortraitRulesWithContext(ctx context.Context, request *DescribeSecurityPortraitRulesRequest) (response *DescribeSecurityPortraitRulesResponse, err error) {
+func (c *Client) DescribeSpeedTestingDetailsWithContext(ctx context.Context, request *DescribeSpeedTestingDetailsRequest) (response *DescribeSpeedTestingDetailsResponse, err error) {
if request == nil {
- request = NewDescribeSecurityPortraitRulesRequest()
+ request = NewDescribeSpeedTestingDetailsRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeSpeedTestingDetails require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeSpeedTestingDetailsResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeSpeedTestingMetricDataRequest() (request *DescribeSpeedTestingMetricDataRequest) {
+ request = &DescribeSpeedTestingMetricDataRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeSpeedTestingMetricData")
+
+
+ return
+}
+
+func NewDescribeSpeedTestingMetricDataResponse() (response *DescribeSpeedTestingMetricDataResponse) {
+ response = &DescribeSpeedTestingMetricDataResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+}
+
+// DescribeSpeedTestingMetricData
+// 查询站点拨测结果
+//
+// 可能返回的错误码:
+// RESOURCENOTFOUND = "ResourceNotFound"
+func (c *Client) DescribeSpeedTestingMetricData(request *DescribeSpeedTestingMetricDataRequest) (response *DescribeSpeedTestingMetricDataResponse, err error) {
+ return c.DescribeSpeedTestingMetricDataWithContext(context.Background(), request)
+}
+
+// DescribeSpeedTestingMetricData
+// 查询站点拨测结果
+//
+// 可能返回的错误码:
+// RESOURCENOTFOUND = "ResourceNotFound"
+func (c *Client) DescribeSpeedTestingMetricDataWithContext(ctx context.Context, request *DescribeSpeedTestingMetricDataRequest) (response *DescribeSpeedTestingMetricDataResponse, err error) {
+ if request == nil {
+ request = NewDescribeSpeedTestingMetricDataRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DescribeSpeedTestingMetricData require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDescribeSpeedTestingMetricDataResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewDescribeSpeedTestingQuotaRequest() (request *DescribeSpeedTestingQuotaRequest) {
+ request = &DescribeSpeedTestingQuotaRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeSpeedTestingQuota")
+
+
+ return
+}
+
+func NewDescribeSpeedTestingQuotaResponse() (response *DescribeSpeedTestingQuotaResponse) {
+ response = &DescribeSpeedTestingQuotaResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+}
+
+// DescribeSpeedTestingQuota
+// 查询站点拨测配额
+//
+// 可能返回的错误码:
+// RESOURCENOTFOUND = "ResourceNotFound"
+func (c *Client) DescribeSpeedTestingQuota(request *DescribeSpeedTestingQuotaRequest) (response *DescribeSpeedTestingQuotaResponse, err error) {
+ return c.DescribeSpeedTestingQuotaWithContext(context.Background(), request)
+}
+
+// DescribeSpeedTestingQuota
+// 查询站点拨测配额
+//
+// 可能返回的错误码:
+// RESOURCENOTFOUND = "ResourceNotFound"
+func (c *Client) DescribeSpeedTestingQuotaWithContext(ctx context.Context, request *DescribeSpeedTestingQuotaRequest) (response *DescribeSpeedTestingQuotaResponse, err error) {
+ if request == nil {
+ request = NewDescribeSpeedTestingQuotaRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeSecurityPortraitRules require credential")
+ return nil, errors.New("DescribeSpeedTestingQuota require credential")
}
request.SetContext(ctx)
- response = NewDescribeSecurityPortraitRulesResponse()
+ response = NewDescribeSpeedTestingQuotaResponse()
err = c.Send(request, response)
return
}
@@ -2916,7 +3996,7 @@ func NewDescribeTimingL4DataResponse() (response *DescribeTimingL4DataResponse)
}
// DescribeTimingL4Data
-// 四层时序流量数据查询
+// 本接口(DescribeTimingL4Data)用于查询四层时序流量数据列表。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
@@ -2928,7 +4008,7 @@ func (c *Client) DescribeTimingL4Data(request *DescribeTimingL4DataRequest) (res
}
// DescribeTimingL4Data
-// 四层时序流量数据查询
+// 本接口(DescribeTimingL4Data)用于查询四层时序流量数据列表。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
@@ -2970,7 +4050,7 @@ func NewDescribeTimingL7AnalysisDataResponse() (response *DescribeTimingL7Analys
}
// DescribeTimingL7AnalysisData
-// 查询七层数据分析类时序流量数据
+// 本接口(DescribeTimingL7AnalysisData)查询七层数据分析类时序数据。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
@@ -2983,7 +4063,7 @@ func (c *Client) DescribeTimingL7AnalysisData(request *DescribeTimingL7AnalysisD
}
// DescribeTimingL7AnalysisData
-// 查询七层数据分析类时序流量数据
+// 本接口(DescribeTimingL7AnalysisData)查询七层数据分析类时序数据。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
@@ -3026,7 +4106,7 @@ func NewDescribeTimingL7CacheDataResponse() (response *DescribeTimingL7CacheData
}
// DescribeTimingL7CacheData
-// 七层查询缓存分析时序类流量数据
+// 本接口(DescribeTimingL7CacheData)用于查询七层缓存分析时序类流量数据。
//
// 可能返回的错误码:
// RESOURCEUNAVAILABLE = "ResourceUnavailable"
@@ -3036,7 +4116,7 @@ func (c *Client) DescribeTimingL7CacheData(request *DescribeTimingL7CacheDataReq
}
// DescribeTimingL7CacheData
-// 七层查询缓存分析时序类流量数据
+// 本接口(DescribeTimingL7CacheData)用于查询七层缓存分析时序类流量数据。
//
// 可能返回的错误码:
// RESOURCEUNAVAILABLE = "ResourceUnavailable"
@@ -3076,7 +4156,7 @@ func NewDescribeTopL7AnalysisDataResponse() (response *DescribeTopL7AnalysisData
}
// DescribeTopL7AnalysisData
-// 查询top类流量数据
+// 本接口(DescribeTopL7AnalysisData)用于查询七层流量前topN的数据。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
@@ -3089,7 +4169,7 @@ func (c *Client) DescribeTopL7AnalysisData(request *DescribeTopL7AnalysisDataReq
}
// DescribeTopL7AnalysisData
-// 查询top类流量数据
+// 本接口(DescribeTopL7AnalysisData)用于查询七层流量前topN的数据。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
@@ -3132,7 +4212,7 @@ func NewDescribeTopL7CacheDataResponse() (response *DescribeTopL7CacheDataRespon
}
// DescribeTopL7CacheData
-// 七层查询缓存分析top类流量数据
+// 本接口(DescribeTopL7CacheData)用于查询七层缓存分析topN流量数据。
//
// 可能返回的错误码:
// RESOURCEUNAVAILABLE = "ResourceUnavailable"
@@ -3142,7 +4222,7 @@ func (c *Client) DescribeTopL7CacheData(request *DescribeTopL7CacheDataRequest)
}
// DescribeTopL7CacheData
-// 七层查询缓存分析top类流量数据
+// 本接口(DescribeTopL7CacheData)用于查询七层缓存分析topN流量数据。
//
// 可能返回的错误码:
// RESOURCEUNAVAILABLE = "ResourceUnavailable"
@@ -3163,100 +4243,102 @@ func (c *Client) DescribeTopL7CacheDataWithContext(ctx context.Context, request
return
}
-func NewDescribeWebManagedRulesAttackEventsRequest() (request *DescribeWebManagedRulesAttackEventsRequest) {
- request = &DescribeWebManagedRulesAttackEventsRequest{
+func NewDescribeWebManagedRulesDataRequest() (request *DescribeWebManagedRulesDataRequest) {
+ request = &DescribeWebManagedRulesDataRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeWebManagedRulesAttackEvents")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeWebManagedRulesData")
return
}
-func NewDescribeWebManagedRulesAttackEventsResponse() (response *DescribeWebManagedRulesAttackEventsResponse) {
- response = &DescribeWebManagedRulesAttackEventsResponse{
+func NewDescribeWebManagedRulesDataResponse() (response *DescribeWebManagedRulesDataResponse) {
+ response = &DescribeWebManagedRulesDataResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeWebManagedRulesAttackEvents
-// 查询Web托管攻击事件
+// DescribeWebManagedRulesData
+// 本接口(DescribeWebManagedRulesData)用于查询WAF攻击的时序数据。
//
// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
// RESOURCENOTFOUND = "ResourceNotFound"
-func (c *Client) DescribeWebManagedRulesAttackEvents(request *DescribeWebManagedRulesAttackEventsRequest) (response *DescribeWebManagedRulesAttackEventsResponse, err error) {
- return c.DescribeWebManagedRulesAttackEventsWithContext(context.Background(), request)
+func (c *Client) DescribeWebManagedRulesData(request *DescribeWebManagedRulesDataRequest) (response *DescribeWebManagedRulesDataResponse, err error) {
+ return c.DescribeWebManagedRulesDataWithContext(context.Background(), request)
}
-// DescribeWebManagedRulesAttackEvents
-// 查询Web托管攻击事件
+// DescribeWebManagedRulesData
+// 本接口(DescribeWebManagedRulesData)用于查询WAF攻击的时序数据。
//
// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
// RESOURCENOTFOUND = "ResourceNotFound"
-func (c *Client) DescribeWebManagedRulesAttackEventsWithContext(ctx context.Context, request *DescribeWebManagedRulesAttackEventsRequest) (response *DescribeWebManagedRulesAttackEventsResponse, err error) {
+func (c *Client) DescribeWebManagedRulesDataWithContext(ctx context.Context, request *DescribeWebManagedRulesDataRequest) (response *DescribeWebManagedRulesDataResponse, err error) {
if request == nil {
- request = NewDescribeWebManagedRulesAttackEventsRequest()
+ request = NewDescribeWebManagedRulesDataRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeWebManagedRulesAttackEvents require credential")
+ return nil, errors.New("DescribeWebManagedRulesData require credential")
}
request.SetContext(ctx)
- response = NewDescribeWebManagedRulesAttackEventsResponse()
+ response = NewDescribeWebManagedRulesDataResponse()
err = c.Send(request, response)
return
}
-func NewDescribeWebManagedRulesDataRequest() (request *DescribeWebManagedRulesDataRequest) {
- request = &DescribeWebManagedRulesDataRequest{
+func NewDescribeWebManagedRulesHitRuleDetailRequest() (request *DescribeWebManagedRulesHitRuleDetailRequest) {
+ request = &DescribeWebManagedRulesHitRuleDetailRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeWebManagedRulesData")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeWebManagedRulesHitRuleDetail")
return
}
-func NewDescribeWebManagedRulesDataResponse() (response *DescribeWebManagedRulesDataResponse) {
- response = &DescribeWebManagedRulesDataResponse{
+func NewDescribeWebManagedRulesHitRuleDetailResponse() (response *DescribeWebManagedRulesHitRuleDetailResponse) {
+ response = &DescribeWebManagedRulesHitRuleDetailResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeWebManagedRulesData
-// 查询waf攻击时序数据
+// DescribeWebManagedRulesHitRuleDetail
+// 本接口(DescribeWebManagedRulesHitRuleDetail)用于查询WAF攻击命中规则详情。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
// RESOURCENOTFOUND = "ResourceNotFound"
-func (c *Client) DescribeWebManagedRulesData(request *DescribeWebManagedRulesDataRequest) (response *DescribeWebManagedRulesDataResponse, err error) {
- return c.DescribeWebManagedRulesDataWithContext(context.Background(), request)
+func (c *Client) DescribeWebManagedRulesHitRuleDetail(request *DescribeWebManagedRulesHitRuleDetailRequest) (response *DescribeWebManagedRulesHitRuleDetailResponse, err error) {
+ return c.DescribeWebManagedRulesHitRuleDetailWithContext(context.Background(), request)
}
-// DescribeWebManagedRulesData
-// 查询waf攻击时序数据
+// DescribeWebManagedRulesHitRuleDetail
+// 本接口(DescribeWebManagedRulesHitRuleDetail)用于查询WAF攻击命中规则详情。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
// RESOURCENOTFOUND = "ResourceNotFound"
-func (c *Client) DescribeWebManagedRulesDataWithContext(ctx context.Context, request *DescribeWebManagedRulesDataRequest) (response *DescribeWebManagedRulesDataResponse, err error) {
+func (c *Client) DescribeWebManagedRulesHitRuleDetailWithContext(ctx context.Context, request *DescribeWebManagedRulesHitRuleDetailRequest) (response *DescribeWebManagedRulesHitRuleDetailResponse, err error) {
if request == nil {
- request = NewDescribeWebManagedRulesDataRequest()
+ request = NewDescribeWebManagedRulesHitRuleDetailRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeWebManagedRulesData require credential")
+ return nil, errors.New("DescribeWebManagedRulesHitRuleDetail require credential")
}
request.SetContext(ctx)
- response = NewDescribeWebManagedRulesDataResponse()
+ response = NewDescribeWebManagedRulesHitRuleDetailResponse()
err = c.Send(request, response)
return
}
@@ -3280,7 +4362,7 @@ func NewDescribeWebManagedRulesLogResponse() (response *DescribeWebManagedRulesL
}
// DescribeWebManagedRulesLog
-// 查询waf攻击日志
+// 本接口(DescribeWebManagedRulesLog)用于查询Web攻击日志。
//
// 可能返回的错误码:
// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
@@ -3289,7 +4371,7 @@ func (c *Client) DescribeWebManagedRulesLog(request *DescribeWebManagedRulesLogR
}
// DescribeWebManagedRulesLog
-// 查询waf攻击日志
+// 本接口(DescribeWebManagedRulesLog)用于查询Web攻击日志。
//
// 可能返回的错误码:
// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
@@ -3309,104 +4391,98 @@ func (c *Client) DescribeWebManagedRulesLogWithContext(ctx context.Context, requ
return
}
-func NewDescribeWebManagedRulesTopDataRequest() (request *DescribeWebManagedRulesTopDataRequest) {
- request = &DescribeWebManagedRulesTopDataRequest{
+func NewDescribeWebProtectionAttackEventsRequest() (request *DescribeWebProtectionAttackEventsRequest) {
+ request = &DescribeWebProtectionAttackEventsRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeWebManagedRulesTopData")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeWebProtectionAttackEvents")
return
}
-func NewDescribeWebManagedRulesTopDataResponse() (response *DescribeWebManagedRulesTopDataResponse) {
- response = &DescribeWebManagedRulesTopDataResponse{
+func NewDescribeWebProtectionAttackEventsResponse() (response *DescribeWebProtectionAttackEventsResponse) {
+ response = &DescribeWebProtectionAttackEventsResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeWebManagedRulesTopData
-// 查询waf攻击top数据
+// DescribeWebProtectionAttackEvents
+// 本接口(DescribeWebProtectionAttackEvents)用于查询CC相关攻击事件列表。
//
// 可能返回的错误码:
-// FAILEDOPERATION = "FailedOperation"
-// LIMITEXCEEDED = "LimitExceeded"
// RESOURCENOTFOUND = "ResourceNotFound"
-// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeWebManagedRulesTopData(request *DescribeWebManagedRulesTopDataRequest) (response *DescribeWebManagedRulesTopDataResponse, err error) {
- return c.DescribeWebManagedRulesTopDataWithContext(context.Background(), request)
+func (c *Client) DescribeWebProtectionAttackEvents(request *DescribeWebProtectionAttackEventsRequest) (response *DescribeWebProtectionAttackEventsResponse, err error) {
+ return c.DescribeWebProtectionAttackEventsWithContext(context.Background(), request)
}
-// DescribeWebManagedRulesTopData
-// 查询waf攻击top数据
+// DescribeWebProtectionAttackEvents
+// 本接口(DescribeWebProtectionAttackEvents)用于查询CC相关攻击事件列表。
//
// 可能返回的错误码:
-// FAILEDOPERATION = "FailedOperation"
-// LIMITEXCEEDED = "LimitExceeded"
// RESOURCENOTFOUND = "ResourceNotFound"
-// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeWebManagedRulesTopDataWithContext(ctx context.Context, request *DescribeWebManagedRulesTopDataRequest) (response *DescribeWebManagedRulesTopDataResponse, err error) {
+func (c *Client) DescribeWebProtectionAttackEventsWithContext(ctx context.Context, request *DescribeWebProtectionAttackEventsRequest) (response *DescribeWebProtectionAttackEventsResponse, err error) {
if request == nil {
- request = NewDescribeWebManagedRulesTopDataRequest()
+ request = NewDescribeWebProtectionAttackEventsRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeWebManagedRulesTopData require credential")
+ return nil, errors.New("DescribeWebProtectionAttackEvents require credential")
}
request.SetContext(ctx)
- response = NewDescribeWebManagedRulesTopDataResponse()
+ response = NewDescribeWebProtectionAttackEventsResponse()
err = c.Send(request, response)
return
}
-func NewDescribeWebProtectionAttackEventsRequest() (request *DescribeWebProtectionAttackEventsRequest) {
- request = &DescribeWebProtectionAttackEventsRequest{
+func NewDescribeWebProtectionClientIpListRequest() (request *DescribeWebProtectionClientIpListRequest) {
+ request = &DescribeWebProtectionClientIpListRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeWebProtectionAttackEvents")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeWebProtectionClientIpList")
return
}
-func NewDescribeWebProtectionAttackEventsResponse() (response *DescribeWebProtectionAttackEventsResponse) {
- response = &DescribeWebProtectionAttackEventsResponse{
+func NewDescribeWebProtectionClientIpListResponse() (response *DescribeWebProtectionClientIpListResponse) {
+ response = &DescribeWebProtectionClientIpListResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeWebProtectionAttackEvents
-// 查询web防护攻击事件
+// DescribeWebProtectionClientIpList
+// 本接口(DescribeWebProtectionClientIpList)用于查询CC防护客户端(攻击源)IP信息。
//
// 可能返回的错误码:
-// RESOURCENOTFOUND = "ResourceNotFound"
-func (c *Client) DescribeWebProtectionAttackEvents(request *DescribeWebProtectionAttackEventsRequest) (response *DescribeWebProtectionAttackEventsResponse, err error) {
- return c.DescribeWebProtectionAttackEventsWithContext(context.Background(), request)
+// FAILEDOPERATION = "FailedOperation"
+func (c *Client) DescribeWebProtectionClientIpList(request *DescribeWebProtectionClientIpListRequest) (response *DescribeWebProtectionClientIpListResponse, err error) {
+ return c.DescribeWebProtectionClientIpListWithContext(context.Background(), request)
}
-// DescribeWebProtectionAttackEvents
-// 查询web防护攻击事件
+// DescribeWebProtectionClientIpList
+// 本接口(DescribeWebProtectionClientIpList)用于查询CC防护客户端(攻击源)IP信息。
//
// 可能返回的错误码:
-// RESOURCENOTFOUND = "ResourceNotFound"
-func (c *Client) DescribeWebProtectionAttackEventsWithContext(ctx context.Context, request *DescribeWebProtectionAttackEventsRequest) (response *DescribeWebProtectionAttackEventsResponse, err error) {
+// FAILEDOPERATION = "FailedOperation"
+func (c *Client) DescribeWebProtectionClientIpListWithContext(ctx context.Context, request *DescribeWebProtectionClientIpListRequest) (response *DescribeWebProtectionClientIpListResponse, err error) {
if request == nil {
- request = NewDescribeWebProtectionAttackEventsRequest()
+ request = NewDescribeWebProtectionClientIpListRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeWebProtectionAttackEvents require credential")
+ return nil, errors.New("DescribeWebProtectionClientIpList require credential")
}
request.SetContext(ctx)
- response = NewDescribeWebProtectionAttackEventsResponse()
+ response = NewDescribeWebProtectionClientIpListResponse()
err = c.Send(request, response)
return
}
@@ -3430,7 +4506,7 @@ func NewDescribeWebProtectionDataResponse() (response *DescribeWebProtectionData
}
// DescribeWebProtectionData
-// 查询CC防护时序数据
+// 本接口(DescribeWebProtectionData)用于查询CC防护时序数据。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
@@ -3440,7 +4516,7 @@ func (c *Client) DescribeWebProtectionData(request *DescribeWebProtectionDataReq
}
// DescribeWebProtectionData
-// 查询CC防护时序数据
+// 本接口(DescribeWebProtectionData)用于查询CC防护时序数据。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
@@ -3461,156 +4537,154 @@ func (c *Client) DescribeWebProtectionDataWithContext(ctx context.Context, reque
return
}
-func NewDescribeWebProtectionLogRequest() (request *DescribeWebProtectionLogRequest) {
- request = &DescribeWebProtectionLogRequest{
+func NewDescribeWebProtectionHitRuleDetailRequest() (request *DescribeWebProtectionHitRuleDetailRequest) {
+ request = &DescribeWebProtectionHitRuleDetailRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeWebProtectionLog")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeWebProtectionHitRuleDetail")
return
}
-func NewDescribeWebProtectionLogResponse() (response *DescribeWebProtectionLogResponse) {
- response = &DescribeWebProtectionLogResponse{
+func NewDescribeWebProtectionHitRuleDetailResponse() (response *DescribeWebProtectionHitRuleDetailResponse) {
+ response = &DescribeWebProtectionHitRuleDetailResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeWebProtectionLog
-// 查询CC防护日志
+// DescribeWebProtectionHitRuleDetail
+// 本接口(DescribeWebProtectionHitRuleDetail)用于查询CC防护命中规则详情列表。
//
// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
// RESOURCENOTFOUND = "ResourceNotFound"
-// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeWebProtectionLog(request *DescribeWebProtectionLogRequest) (response *DescribeWebProtectionLogResponse, err error) {
- return c.DescribeWebProtectionLogWithContext(context.Background(), request)
+func (c *Client) DescribeWebProtectionHitRuleDetail(request *DescribeWebProtectionHitRuleDetailRequest) (response *DescribeWebProtectionHitRuleDetailResponse, err error) {
+ return c.DescribeWebProtectionHitRuleDetailWithContext(context.Background(), request)
}
-// DescribeWebProtectionLog
-// 查询CC防护日志
+// DescribeWebProtectionHitRuleDetail
+// 本接口(DescribeWebProtectionHitRuleDetail)用于查询CC防护命中规则详情列表。
//
// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
// RESOURCENOTFOUND = "ResourceNotFound"
-// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeWebProtectionLogWithContext(ctx context.Context, request *DescribeWebProtectionLogRequest) (response *DescribeWebProtectionLogResponse, err error) {
+func (c *Client) DescribeWebProtectionHitRuleDetailWithContext(ctx context.Context, request *DescribeWebProtectionHitRuleDetailRequest) (response *DescribeWebProtectionHitRuleDetailResponse, err error) {
if request == nil {
- request = NewDescribeWebProtectionLogRequest()
+ request = NewDescribeWebProtectionHitRuleDetailRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeWebProtectionLog require credential")
+ return nil, errors.New("DescribeWebProtectionHitRuleDetail require credential")
}
request.SetContext(ctx)
- response = NewDescribeWebProtectionLogResponse()
+ response = NewDescribeWebProtectionHitRuleDetailResponse()
err = c.Send(request, response)
return
}
-func NewDescribeZoneDDoSPolicyRequest() (request *DescribeZoneDDoSPolicyRequest) {
- request = &DescribeZoneDDoSPolicyRequest{
+func NewDescribeWebProtectionTopDataRequest() (request *DescribeWebProtectionTopDataRequest) {
+ request = &DescribeWebProtectionTopDataRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeZoneDDoSPolicy")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeWebProtectionTopData")
return
}
-func NewDescribeZoneDDoSPolicyResponse() (response *DescribeZoneDDoSPolicyResponse) {
- response = &DescribeZoneDDoSPolicyResponse{
+func NewDescribeWebProtectionTopDataResponse() (response *DescribeWebProtectionTopDataResponse) {
+ response = &DescribeWebProtectionTopDataResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeZoneDDoSPolicy
-// 查询所有DDoS防护分区
+// DescribeWebProtectionTopData
+// 本接口(DescribeWebProtectionTopData)用于查询CC防护的Top数据。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
-// OPERATIONDENIED = "OperationDenied"
// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeZoneDDoSPolicy(request *DescribeZoneDDoSPolicyRequest) (response *DescribeZoneDDoSPolicyResponse, err error) {
- return c.DescribeZoneDDoSPolicyWithContext(context.Background(), request)
+func (c *Client) DescribeWebProtectionTopData(request *DescribeWebProtectionTopDataRequest) (response *DescribeWebProtectionTopDataResponse, err error) {
+ return c.DescribeWebProtectionTopDataWithContext(context.Background(), request)
}
-// DescribeZoneDDoSPolicy
-// 查询所有DDoS防护分区
+// DescribeWebProtectionTopData
+// 本接口(DescribeWebProtectionTopData)用于查询CC防护的Top数据。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
-// OPERATIONDENIED = "OperationDenied"
// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeZoneDDoSPolicyWithContext(ctx context.Context, request *DescribeZoneDDoSPolicyRequest) (response *DescribeZoneDDoSPolicyResponse, err error) {
+func (c *Client) DescribeWebProtectionTopDataWithContext(ctx context.Context, request *DescribeWebProtectionTopDataRequest) (response *DescribeWebProtectionTopDataResponse, err error) {
if request == nil {
- request = NewDescribeZoneDDoSPolicyRequest()
+ request = NewDescribeWebProtectionTopDataRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeZoneDDoSPolicy require credential")
+ return nil, errors.New("DescribeWebProtectionTopData require credential")
}
request.SetContext(ctx)
- response = NewDescribeZoneDDoSPolicyResponse()
+ response = NewDescribeWebProtectionTopDataResponse()
err = c.Send(request, response)
return
}
-func NewDescribeZoneDetailsRequest() (request *DescribeZoneDetailsRequest) {
- request = &DescribeZoneDetailsRequest{
+func NewDescribeZoneDDoSPolicyRequest() (request *DescribeZoneDDoSPolicyRequest) {
+ request = &DescribeZoneDDoSPolicyRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "DescribeZoneDetails")
+ request.Init().WithApiInfo("teo", APIVersion, "DescribeZoneDDoSPolicy")
return
}
-func NewDescribeZoneDetailsResponse() (response *DescribeZoneDetailsResponse) {
- response = &DescribeZoneDetailsResponse{
+func NewDescribeZoneDDoSPolicyResponse() (response *DescribeZoneDDoSPolicyResponse) {
+ response = &DescribeZoneDDoSPolicyResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// DescribeZoneDetails
-// 根据站点 ID 查询站点的详细信息
+// DescribeZoneDDoSPolicy
+// 查询所有DDoS防护分区
//
// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
// OPERATIONDENIED = "OperationDenied"
-// RESOURCENOTFOUND = "ResourceNotFound"
// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeZoneDetails(request *DescribeZoneDetailsRequest) (response *DescribeZoneDetailsResponse, err error) {
- return c.DescribeZoneDetailsWithContext(context.Background(), request)
+func (c *Client) DescribeZoneDDoSPolicy(request *DescribeZoneDDoSPolicyRequest) (response *DescribeZoneDDoSPolicyResponse, err error) {
+ return c.DescribeZoneDDoSPolicyWithContext(context.Background(), request)
}
-// DescribeZoneDetails
-// 根据站点 ID 查询站点的详细信息
+// DescribeZoneDDoSPolicy
+// 查询所有DDoS防护分区
//
// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
// OPERATIONDENIED = "OperationDenied"
-// RESOURCENOTFOUND = "ResourceNotFound"
// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
-func (c *Client) DescribeZoneDetailsWithContext(ctx context.Context, request *DescribeZoneDetailsRequest) (response *DescribeZoneDetailsResponse, err error) {
+func (c *Client) DescribeZoneDDoSPolicyWithContext(ctx context.Context, request *DescribeZoneDDoSPolicyRequest) (response *DescribeZoneDDoSPolicyResponse, err error) {
if request == nil {
- request = NewDescribeZoneDetailsRequest()
+ request = NewDescribeZoneDDoSPolicyRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("DescribeZoneDetails require credential")
+ return nil, errors.New("DescribeZoneDDoSPolicy require credential")
}
request.SetContext(ctx)
- response = NewDescribeZoneDetailsResponse()
+ response = NewDescribeZoneDDoSPolicyResponse()
err = c.Send(request, response)
return
}
@@ -3690,7 +4764,7 @@ func NewDescribeZonesResponse() (response *DescribeZonesResponse) {
}
// DescribeZones
-// 用户查询用户站点信息列表,支持分页
+// 用户查询用户站点信息列表,支持分页。
//
// 可能返回的错误码:
// OPERATIONDENIED = "OperationDenied"
@@ -3701,7 +4775,7 @@ func (c *Client) DescribeZones(request *DescribeZonesRequest) (response *Describ
}
// DescribeZones
-// 用户查询用户站点信息列表,支持分页
+// 用户查询用户站点信息列表,支持分页。
//
// 可能返回的错误码:
// OPERATIONDENIED = "OperationDenied"
@@ -3723,6 +4797,54 @@ func (c *Client) DescribeZonesWithContext(ctx context.Context, request *Describe
return
}
+func NewDownloadL4LogsRequest() (request *DownloadL4LogsRequest) {
+ request = &DownloadL4LogsRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "DownloadL4Logs")
+
+
+ return
+}
+
+func NewDownloadL4LogsResponse() (response *DownloadL4LogsResponse) {
+ response = &DownloadL4LogsResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+}
+
+// DownloadL4Logs
+// 本接口(DownloadL4Logs)用于下载四层离线日志。
+//
+// 可能返回的错误码:
+// RESOURCEUNAVAILABLE = "ResourceUnavailable"
+func (c *Client) DownloadL4Logs(request *DownloadL4LogsRequest) (response *DownloadL4LogsResponse, err error) {
+ return c.DownloadL4LogsWithContext(context.Background(), request)
+}
+
+// DownloadL4Logs
+// 本接口(DownloadL4Logs)用于下载四层离线日志。
+//
+// 可能返回的错误码:
+// RESOURCEUNAVAILABLE = "ResourceUnavailable"
+func (c *Client) DownloadL4LogsWithContext(ctx context.Context, request *DownloadL4LogsRequest) (response *DownloadL4LogsResponse, err error) {
+ if request == nil {
+ request = NewDownloadL4LogsRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("DownloadL4Logs require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewDownloadL4LogsResponse()
+ err = c.Send(request, response)
+ return
+}
+
func NewDownloadL7LogsRequest() (request *DownloadL7LogsRequest) {
request = &DownloadL7LogsRequest{
BaseRequest: &tchttp.BaseRequest{},
@@ -3742,7 +4864,7 @@ func NewDownloadL7LogsResponse() (response *DownloadL7LogsResponse) {
}
// DownloadL7Logs
-// 查询七层离线日志
+// 本接口(DownloadL7Logs)下载七层离线日志。
//
// 可能返回的错误码:
// OPERATIONDENIED = "OperationDenied"
@@ -3753,7 +4875,7 @@ func (c *Client) DownloadL7Logs(request *DownloadL7LogsRequest) (response *Downl
}
// DownloadL7Logs
-// 查询七层离线日志
+// 本接口(DownloadL7Logs)下载七层离线日志。
//
// 可能返回的错误码:
// OPERATIONDENIED = "OperationDenied"
@@ -3794,7 +4916,7 @@ func NewIdentifyZoneResponse() (response *IdentifyZoneResponse) {
}
// IdentifyZone
-// 用于验证站点所有权
+// 用于验证站点所有权。
//
// 可能返回的错误码:
// OPERATIONDENIED = "OperationDenied"
@@ -3804,7 +4926,7 @@ func (c *Client) IdentifyZone(request *IdentifyZoneRequest) (response *IdentifyZ
}
// IdentifyZone
-// 用于验证站点所有权
+// 用于验证站点所有权。
//
// 可能返回的错误码:
// OPERATIONDENIED = "OperationDenied"
@@ -3825,52 +4947,100 @@ func (c *Client) IdentifyZoneWithContext(ctx context.Context, request *IdentifyZ
return
}
-func NewImportDnsRecordsRequest() (request *ImportDnsRecordsRequest) {
- request = &ImportDnsRecordsRequest{
+func NewModifyAlarmConfigRequest() (request *ModifyAlarmConfigRequest) {
+ request = &ModifyAlarmConfigRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "ImportDnsRecords")
+ request.Init().WithApiInfo("teo", APIVersion, "ModifyAlarmConfig")
return
}
-func NewImportDnsRecordsResponse() (response *ImportDnsRecordsResponse) {
- response = &ImportDnsRecordsResponse{
+func NewModifyAlarmConfigResponse() (response *ModifyAlarmConfigResponse) {
+ response = &ModifyAlarmConfigResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// ImportDnsRecords
-// 导入 DNS 记录
+// ModifyAlarmConfig
+// 本接口(ModifyAlarmConfig)用于修改用户告警配置。
//
// 可能返回的错误码:
// OPERATIONDENIED = "OperationDenied"
-// RESOURCENOTFOUND = "ResourceNotFound"
-func (c *Client) ImportDnsRecords(request *ImportDnsRecordsRequest) (response *ImportDnsRecordsResponse, err error) {
- return c.ImportDnsRecordsWithContext(context.Background(), request)
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) ModifyAlarmConfig(request *ModifyAlarmConfigRequest) (response *ModifyAlarmConfigResponse, err error) {
+ return c.ModifyAlarmConfigWithContext(context.Background(), request)
}
-// ImportDnsRecords
-// 导入 DNS 记录
+// ModifyAlarmConfig
+// 本接口(ModifyAlarmConfig)用于修改用户告警配置。
//
// 可能返回的错误码:
// OPERATIONDENIED = "OperationDenied"
-// RESOURCENOTFOUND = "ResourceNotFound"
-func (c *Client) ImportDnsRecordsWithContext(ctx context.Context, request *ImportDnsRecordsRequest) (response *ImportDnsRecordsResponse, err error) {
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) ModifyAlarmConfigWithContext(ctx context.Context, request *ModifyAlarmConfigRequest) (response *ModifyAlarmConfigResponse, err error) {
+ if request == nil {
+ request = NewModifyAlarmConfigRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("ModifyAlarmConfig require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewModifyAlarmConfigResponse()
+ err = c.Send(request, response)
+ return
+}
+
+func NewModifyAlarmDefaultThresholdRequest() (request *ModifyAlarmDefaultThresholdRequest) {
+ request = &ModifyAlarmDefaultThresholdRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "ModifyAlarmDefaultThreshold")
+
+
+ return
+}
+
+func NewModifyAlarmDefaultThresholdResponse() (response *ModifyAlarmDefaultThresholdResponse) {
+ response = &ModifyAlarmDefaultThresholdResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+}
+
+// ModifyAlarmDefaultThreshold
+// 此接口(ModifyAlarmDefaultThreshold)用于修改告警默认阈值。
+//
+// 可能返回的错误码:
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) ModifyAlarmDefaultThreshold(request *ModifyAlarmDefaultThresholdRequest) (response *ModifyAlarmDefaultThresholdResponse, err error) {
+ return c.ModifyAlarmDefaultThresholdWithContext(context.Background(), request)
+}
+
+// ModifyAlarmDefaultThreshold
+// 此接口(ModifyAlarmDefaultThreshold)用于修改告警默认阈值。
+//
+// 可能返回的错误码:
+// UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
+func (c *Client) ModifyAlarmDefaultThresholdWithContext(ctx context.Context, request *ModifyAlarmDefaultThresholdRequest) (response *ModifyAlarmDefaultThresholdResponse, err error) {
if request == nil {
- request = NewImportDnsRecordsRequest()
+ request = NewModifyAlarmDefaultThresholdRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("ImportDnsRecords require credential")
+ return nil, errors.New("ModifyAlarmDefaultThreshold require credential")
}
request.SetContext(ctx)
- response = NewImportDnsRecordsResponse()
+ response = NewModifyAlarmDefaultThresholdResponse()
err = c.Send(request, response)
return
}
@@ -3898,7 +5068,7 @@ func NewModifyApplicationProxyResponse() (response *ModifyApplicationProxyRespon
//
// 可能返回的错误码:
// OPERATIONDENIED = "OperationDenied"
-// RESOURCENOTFOUND = "ResourceNotFound"
+// OPERATIONDENIED_L4PROXYINBANNEDSTATUS = "OperationDenied.L4ProxyInBannedStatus"
func (c *Client) ModifyApplicationProxy(request *ModifyApplicationProxyRequest) (response *ModifyApplicationProxyResponse, err error) {
return c.ModifyApplicationProxyWithContext(context.Background(), request)
}
@@ -3908,7 +5078,7 @@ func (c *Client) ModifyApplicationProxy(request *ModifyApplicationProxyRequest)
//
// 可能返回的错误码:
// OPERATIONDENIED = "OperationDenied"
-// RESOURCENOTFOUND = "ResourceNotFound"
+// OPERATIONDENIED_L4PROXYINBANNEDSTATUS = "OperationDenied.L4ProxyInBannedStatus"
func (c *Client) ModifyApplicationProxyWithContext(ctx context.Context, request *ModifyApplicationProxyRequest) (response *ModifyApplicationProxyResponse, err error) {
if request == nil {
request = NewModifyApplicationProxyRequest()
@@ -3948,6 +5118,8 @@ func NewModifyApplicationProxyRuleResponse() (response *ModifyApplicationProxyRu
//
// 可能返回的错误码:
// INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
+// OPERATIONDENIED = "OperationDenied"
+// OPERATIONDENIED_L4PROXYINBANNEDSTATUS = "OperationDenied.L4ProxyInBannedStatus"
func (c *Client) ModifyApplicationProxyRule(request *ModifyApplicationProxyRuleRequest) (response *ModifyApplicationProxyRuleResponse, err error) {
return c.ModifyApplicationProxyRuleWithContext(context.Background(), request)
}
@@ -3957,6 +5129,8 @@ func (c *Client) ModifyApplicationProxyRule(request *ModifyApplicationProxyRuleR
//
// 可能返回的错误码:
// INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
+// OPERATIONDENIED = "OperationDenied"
+// OPERATIONDENIED_L4PROXYINBANNEDSTATUS = "OperationDenied.L4ProxyInBannedStatus"
func (c *Client) ModifyApplicationProxyRuleWithContext(ctx context.Context, request *ModifyApplicationProxyRuleRequest) (response *ModifyApplicationProxyRuleResponse, err error) {
if request == nil {
request = NewModifyApplicationProxyRuleRequest()
@@ -3995,7 +5169,8 @@ func NewModifyApplicationProxyRuleStatusResponse() (response *ModifyApplicationP
// 修改应用代理规则的状态
//
// 可能返回的错误码:
-// INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
+// OPERATIONDENIED = "OperationDenied"
+// OPERATIONDENIED_L4PROXYINBANNEDSTATUS = "OperationDenied.L4ProxyInBannedStatus"
func (c *Client) ModifyApplicationProxyRuleStatus(request *ModifyApplicationProxyRuleStatusRequest) (response *ModifyApplicationProxyRuleStatusResponse, err error) {
return c.ModifyApplicationProxyRuleStatusWithContext(context.Background(), request)
}
@@ -4004,7 +5179,8 @@ func (c *Client) ModifyApplicationProxyRuleStatus(request *ModifyApplicationProx
// 修改应用代理规则的状态
//
// 可能返回的错误码:
-// INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
+// OPERATIONDENIED = "OperationDenied"
+// OPERATIONDENIED_L4PROXYINBANNEDSTATUS = "OperationDenied.L4ProxyInBannedStatus"
func (c *Client) ModifyApplicationProxyRuleStatusWithContext(ctx context.Context, request *ModifyApplicationProxyRuleStatusRequest) (response *ModifyApplicationProxyRuleStatusResponse, err error) {
if request == nil {
request = NewModifyApplicationProxyRuleStatusRequest()
@@ -4043,7 +5219,8 @@ func NewModifyApplicationProxyStatusResponse() (response *ModifyApplicationProxy
// 修改应用代理的状态
//
// 可能返回的错误码:
-// INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
+// OPERATIONDENIED = "OperationDenied"
+// OPERATIONDENIED_L4PROXYINBANNEDSTATUS = "OperationDenied.L4ProxyInBannedStatus"
func (c *Client) ModifyApplicationProxyStatus(request *ModifyApplicationProxyStatusRequest) (response *ModifyApplicationProxyStatusResponse, err error) {
return c.ModifyApplicationProxyStatusWithContext(context.Background(), request)
}
@@ -4052,7 +5229,8 @@ func (c *Client) ModifyApplicationProxyStatus(request *ModifyApplicationProxySta
// 修改应用代理的状态
//
// 可能返回的错误码:
-// INVALIDPARAMETER_PARAMETERERROR = "InvalidParameter.ParameterError"
+// OPERATIONDENIED = "OperationDenied"
+// OPERATIONDENIED_L4PROXYINBANNEDSTATUS = "OperationDenied.L4ProxyInBannedStatus"
func (c *Client) ModifyApplicationProxyStatusWithContext(ctx context.Context, request *ModifyApplicationProxyStatusRequest) (response *ModifyApplicationProxyStatusResponse, err error) {
if request == nil {
request = NewModifyApplicationProxyStatusRequest()
@@ -4187,6 +5365,7 @@ func NewModifyDefaultCertificateResponse() (response *ModifyDefaultCertificateRe
// 修改默认证书状态
//
// 可能返回的错误码:
+// FAILEDOPERATION_INVALIDZONESTATUS = "FailedOperation.InvalidZoneStatus"
// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError"
// OPERATIONDENIED = "OperationDenied"
// RESOURCEUNAVAILABLE_CERTNOTFOUND = "ResourceUnavailable.CertNotFound"
@@ -4198,6 +5377,7 @@ func (c *Client) ModifyDefaultCertificate(request *ModifyDefaultCertificateReque
// 修改默认证书状态
//
// 可能返回的错误码:
+// FAILEDOPERATION_INVALIDZONESTATUS = "FailedOperation.InvalidZoneStatus"
// INTERNALERROR_SYSTEMERROR = "InternalError.SystemError"
// OPERATIONDENIED = "OperationDenied"
// RESOURCEUNAVAILABLE_CERTNOTFOUND = "ResourceUnavailable.CertNotFound"
@@ -4298,7 +5478,7 @@ func NewModifyDnssecResponse() (response *ModifyDnssecResponse) {
}
// ModifyDnssec
-// 修改 DNSSEC 状态
+// 设置站点DNSSEC状态
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
@@ -4307,7 +5487,7 @@ func (c *Client) ModifyDnssec(request *ModifyDnssecRequest) (response *ModifyDns
}
// ModifyDnssec
-// 修改 DNSSEC 状态
+// 设置站点DNSSEC状态
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
@@ -4408,6 +5588,7 @@ func NewModifyLoadBalancingResponse() (response *ModifyLoadBalancingResponse) {
//
// 可能返回的错误码:
// OPERATIONDENIED = "OperationDenied"
+// RESOURCENOTFOUND = "ResourceNotFound"
func (c *Client) ModifyLoadBalancing(request *ModifyLoadBalancingRequest) (response *ModifyLoadBalancingResponse, err error) {
return c.ModifyLoadBalancingWithContext(context.Background(), request)
}
@@ -4417,6 +5598,7 @@ func (c *Client) ModifyLoadBalancing(request *ModifyLoadBalancingRequest) (respo
//
// 可能返回的错误码:
// OPERATIONDENIED = "OperationDenied"
+// RESOURCENOTFOUND = "ResourceNotFound"
func (c *Client) ModifyLoadBalancingWithContext(ctx context.Context, request *ModifyLoadBalancingRequest) (response *ModifyLoadBalancingResponse, err error) {
if request == nil {
request = NewModifyLoadBalancingRequest()
@@ -4481,6 +5663,54 @@ func (c *Client) ModifyLoadBalancingStatusWithContext(ctx context.Context, reque
return
}
+func NewModifyLogTopicTaskRequest() (request *ModifyLogTopicTaskRequest) {
+ request = &ModifyLogTopicTaskRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "ModifyLogTopicTask")
+
+
+ return
+}
+
+func NewModifyLogTopicTaskResponse() (response *ModifyLogTopicTaskResponse) {
+ response = &ModifyLogTopicTaskResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+}
+
+// ModifyLogTopicTask
+// 本接口(ModifyLogTopicTask)用于修改日志推送任务信息。
+//
+// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
+func (c *Client) ModifyLogTopicTask(request *ModifyLogTopicTaskRequest) (response *ModifyLogTopicTaskResponse, err error) {
+ return c.ModifyLogTopicTaskWithContext(context.Background(), request)
+}
+
+// ModifyLogTopicTask
+// 本接口(ModifyLogTopicTask)用于修改日志推送任务信息。
+//
+// 可能返回的错误码:
+// FAILEDOPERATION = "FailedOperation"
+func (c *Client) ModifyLogTopicTaskWithContext(ctx context.Context, request *ModifyLogTopicTaskRequest) (response *ModifyLogTopicTaskResponse, err error) {
+ if request == nil {
+ request = NewModifyLogTopicTaskRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("ModifyLogTopicTask require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewModifyLogTopicTaskResponse()
+ err = c.Send(request, response)
+ return
+}
+
func NewModifyOriginGroupRequest() (request *ModifyOriginGroupRequest) {
request = &ModifyOriginGroupRequest{
BaseRequest: &tchttp.BaseRequest{},
@@ -4500,7 +5730,7 @@ func NewModifyOriginGroupResponse() (response *ModifyOriginGroupResponse) {
}
// ModifyOriginGroup
-// 源站组修改
+// 修改源站组
//
// 可能返回的错误码:
// OPERATIONDENIED = "OperationDenied"
@@ -4509,7 +5739,7 @@ func (c *Client) ModifyOriginGroup(request *ModifyOriginGroupRequest) (response
}
// ModifyOriginGroup
-// 源站组修改
+// 修改源站组
//
// 可能返回的错误码:
// OPERATIONDENIED = "OperationDenied"
@@ -4551,7 +5781,7 @@ func NewModifyRuleResponse() (response *ModifyRuleResponse) {
// 修改规则引擎规则。
//
// 可能返回的错误码:
-// INVALIDPARAMETER_INVALIDRULEENGINETARGETSEXTENSION = "InvalidParameter.InvalidRuleEngineTargetsExtension"
+// INVALIDPARAMETER_INVALIDURLREDIRECTURL = "InvalidParameter.InvalidUrlRedirectUrl"
func (c *Client) ModifyRule(request *ModifyRuleRequest) (response *ModifyRuleResponse, err error) {
return c.ModifyRuleWithContext(context.Background(), request)
}
@@ -4560,7 +5790,7 @@ func (c *Client) ModifyRule(request *ModifyRuleRequest) (response *ModifyRuleRes
// 修改规则引擎规则。
//
// 可能返回的错误码:
-// INVALIDPARAMETER_INVALIDRULEENGINETARGETSEXTENSION = "InvalidParameter.InvalidRuleEngineTargetsExtension"
+// INVALIDPARAMETER_INVALIDURLREDIRECTURL = "InvalidParameter.InvalidUrlRedirectUrl"
func (c *Client) ModifyRuleWithContext(ctx context.Context, request *ModifyRuleRequest) (response *ModifyRuleResponse, err error) {
if request == nil {
request = NewModifyRuleRequest()
@@ -4599,7 +5829,7 @@ func NewModifyRulePriorityResponse() (response *ModifyRulePriorityResponse) {
// 修改规则引擎规则优先级
//
// 可能返回的错误码:
-// INVALIDPARAMETER_INVALIDRULEENGINETARGETSEXTENSION = "InvalidParameter.InvalidRuleEngineTargetsExtension"
+// INVALIDPARAMETER_INVALIDURLREDIRECTURL = "InvalidParameter.InvalidUrlRedirectUrl"
func (c *Client) ModifyRulePriority(request *ModifyRulePriorityRequest) (response *ModifyRulePriorityResponse, err error) {
return c.ModifyRulePriorityWithContext(context.Background(), request)
}
@@ -4608,7 +5838,7 @@ func (c *Client) ModifyRulePriority(request *ModifyRulePriorityRequest) (respons
// 修改规则引擎规则优先级
//
// 可能返回的错误码:
-// INVALIDPARAMETER_INVALIDRULEENGINETARGETSEXTENSION = "InvalidParameter.InvalidRuleEngineTargetsExtension"
+// INVALIDPARAMETER_INVALIDURLREDIRECTURL = "InvalidParameter.InvalidUrlRedirectUrl"
func (c *Client) ModifyRulePriorityWithContext(ctx context.Context, request *ModifyRulePriorityRequest) (response *ModifyRulePriorityResponse, err error) {
if request == nil {
request = NewModifyRulePriorityRequest()
@@ -4677,6 +5907,54 @@ func (c *Client) ModifySecurityPolicyWithContext(ctx context.Context, request *M
return
}
+func NewModifySecurityWafGroupPolicyRequest() (request *ModifySecurityWafGroupPolicyRequest) {
+ request = &ModifySecurityWafGroupPolicyRequest{
+ BaseRequest: &tchttp.BaseRequest{},
+ }
+
+ request.Init().WithApiInfo("teo", APIVersion, "ModifySecurityWafGroupPolicy")
+
+
+ return
+}
+
+func NewModifySecurityWafGroupPolicyResponse() (response *ModifySecurityWafGroupPolicyResponse) {
+ response = &ModifySecurityWafGroupPolicyResponse{
+ BaseResponse: &tchttp.BaseResponse{},
+ }
+ return
+}
+
+// ModifySecurityWafGroupPolicy
+// 修改安全配置托管规则
+//
+// 可能返回的错误码:
+// INVALIDPARAMETER_SECURITY = "InvalidParameter.Security"
+func (c *Client) ModifySecurityWafGroupPolicy(request *ModifySecurityWafGroupPolicyRequest) (response *ModifySecurityWafGroupPolicyResponse, err error) {
+ return c.ModifySecurityWafGroupPolicyWithContext(context.Background(), request)
+}
+
+// ModifySecurityWafGroupPolicy
+// 修改安全配置托管规则
+//
+// 可能返回的错误码:
+// INVALIDPARAMETER_SECURITY = "InvalidParameter.Security"
+func (c *Client) ModifySecurityWafGroupPolicyWithContext(ctx context.Context, request *ModifySecurityWafGroupPolicyRequest) (response *ModifySecurityWafGroupPolicyResponse, err error) {
+ if request == nil {
+ request = NewModifySecurityWafGroupPolicyRequest()
+ }
+
+ if c.GetCredential() == nil {
+ return nil, errors.New("ModifySecurityWafGroupPolicy require credential")
+ }
+
+ request.SetContext(ctx)
+
+ response = NewModifySecurityWafGroupPolicyResponse()
+ err = c.Send(request, response)
+ return
+}
+
func NewModifyZoneRequest() (request *ModifyZoneRequest) {
request = &ModifyZoneRequest{
BaseRequest: &tchttp.BaseRequest{},
@@ -4696,7 +5974,7 @@ func NewModifyZoneResponse() (response *ModifyZoneResponse) {
}
// ModifyZone
-// 用该站点信息
+// 修改站点信息。
//
// 可能返回的错误码:
// OPERATIONDENIED = "OperationDenied"
@@ -4707,7 +5985,7 @@ func (c *Client) ModifyZone(request *ModifyZoneRequest) (response *ModifyZoneRes
}
// ModifyZone
-// 用该站点信息
+// 修改站点信息。
//
// 可能返回的错误码:
// OPERATIONDENIED = "OperationDenied"
@@ -4748,7 +6026,7 @@ func NewModifyZoneCnameSpeedUpResponse() (response *ModifyZoneCnameSpeedUpRespon
}
// ModifyZoneCnameSpeedUp
-// 开启,关闭 CNAME 加速
+// 开启,关闭 CNAME 加速。
//
// 可能返回的错误码:
// OPERATIONDENIED = "OperationDenied"
@@ -4758,7 +6036,7 @@ func (c *Client) ModifyZoneCnameSpeedUp(request *ModifyZoneCnameSpeedUpRequest)
}
// ModifyZoneCnameSpeedUp
-// 开启,关闭 CNAME 加速
+// 开启,关闭 CNAME 加速。
//
// 可能返回的错误码:
// OPERATIONDENIED = "OperationDenied"
@@ -4803,7 +6081,6 @@ func NewModifyZoneSettingResponse() (response *ModifyZoneSettingResponse) {
// 可能返回的错误码:
// INVALIDPARAMETER_INVALIDCACHEONLYONSWITCH = "InvalidParameter.InvalidCacheOnlyOnSwitch"
// INVALIDPARAMETER_INVALIDCLIENTIPHEADERNAME = "InvalidParameter.InvalidClientIpHeaderName"
-// INVALIDPARAMETER_INVALIDDYNAMICROUTINEBILLING = "InvalidParameter.InvalidDynamicRoutineBilling"
// INVALIDPARAMETER_INVALIDORIGIN = "InvalidParameter.InvalidOrigin"
// INVALIDPARAMETER_INVALIDPOSTMAXSIZEBILLING = "InvalidParameter.InvalidPostMaxSizeBilling"
// INVALIDPARAMETER_INVALIDREQUESTHEADERNAME = "InvalidParameter.InvalidRequestHeaderName"
@@ -4824,7 +6101,6 @@ func (c *Client) ModifyZoneSetting(request *ModifyZoneSettingRequest) (response
// 可能返回的错误码:
// INVALIDPARAMETER_INVALIDCACHEONLYONSWITCH = "InvalidParameter.InvalidCacheOnlyOnSwitch"
// INVALIDPARAMETER_INVALIDCLIENTIPHEADERNAME = "InvalidParameter.InvalidClientIpHeaderName"
-// INVALIDPARAMETER_INVALIDDYNAMICROUTINEBILLING = "InvalidParameter.InvalidDynamicRoutineBilling"
// INVALIDPARAMETER_INVALIDORIGIN = "InvalidParameter.InvalidOrigin"
// INVALIDPARAMETER_INVALIDPOSTMAXSIZEBILLING = "InvalidParameter.InvalidPostMaxSizeBilling"
// INVALIDPARAMETER_INVALIDREQUESTHEADERNAME = "InvalidParameter.InvalidRequestHeaderName"
@@ -4870,7 +6146,7 @@ func NewModifyZoneStatusResponse() (response *ModifyZoneStatusResponse) {
}
// ModifyZoneStatus
-// 用于开启,关闭站点
+// 用于开启,关闭站点。
//
// 可能返回的错误码:
// RESOURCENOTFOUND = "ResourceNotFound"
@@ -4880,7 +6156,7 @@ func (c *Client) ModifyZoneStatus(request *ModifyZoneStatusRequest) (response *M
}
// ModifyZoneStatus
-// 用于开启,关闭站点
+// 用于开启,关闭站点。
//
// 可能返回的错误码:
// RESOURCENOTFOUND = "ResourceNotFound"
@@ -4920,7 +6196,7 @@ func NewReclaimZoneResponse() (response *ReclaimZoneResponse) {
}
// ReclaimZone
-// 站点被其他用户接入后,验证了站点所有权之后,可以找回该站点
+// 站点被其他用户接入后,验证了站点所有权之后,可以找回该站点。
//
// 可能返回的错误码:
// RESOURCENOTFOUND = "ResourceNotFound"
@@ -4930,7 +6206,7 @@ func (c *Client) ReclaimZone(request *ReclaimZoneRequest) (response *ReclaimZone
}
// ReclaimZone
-// 站点被其他用户接入后,验证了站点所有权之后,可以找回该站点
+// 站点被其他用户接入后,验证了站点所有权之后,可以找回该站点。
//
// 可能返回的错误码:
// RESOURCENOTFOUND = "ResourceNotFound"
@@ -4951,52 +6227,52 @@ func (c *Client) ReclaimZoneWithContext(ctx context.Context, request *ReclaimZon
return
}
-func NewScanDnsRecordsRequest() (request *ScanDnsRecordsRequest) {
- request = &ScanDnsRecordsRequest{
+func NewSwitchLogTopicTaskRequest() (request *SwitchLogTopicTaskRequest) {
+ request = &SwitchLogTopicTaskRequest{
BaseRequest: &tchttp.BaseRequest{},
}
- request.Init().WithApiInfo("teo", APIVersion, "ScanDnsRecords")
+ request.Init().WithApiInfo("teo", APIVersion, "SwitchLogTopicTask")
return
}
-func NewScanDnsRecordsResponse() (response *ScanDnsRecordsResponse) {
- response = &ScanDnsRecordsResponse{
+func NewSwitchLogTopicTaskResponse() (response *SwitchLogTopicTaskResponse) {
+ response = &SwitchLogTopicTaskResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
-// ScanDnsRecords
-// 扫描站点历史解析记录
+// SwitchLogTopicTask
+// 本接口(SwitchLogTopicTask)用于开启/关闭推送任务。
//
// 可能返回的错误码:
// RESOURCENOTFOUND = "ResourceNotFound"
// RESOURCEUNAVAILABLE = "ResourceUnavailable"
-func (c *Client) ScanDnsRecords(request *ScanDnsRecordsRequest) (response *ScanDnsRecordsResponse, err error) {
- return c.ScanDnsRecordsWithContext(context.Background(), request)
+func (c *Client) SwitchLogTopicTask(request *SwitchLogTopicTaskRequest) (response *SwitchLogTopicTaskResponse, err error) {
+ return c.SwitchLogTopicTaskWithContext(context.Background(), request)
}
-// ScanDnsRecords
-// 扫描站点历史解析记录
+// SwitchLogTopicTask
+// 本接口(SwitchLogTopicTask)用于开启/关闭推送任务。
//
// 可能返回的错误码:
// RESOURCENOTFOUND = "ResourceNotFound"
// RESOURCEUNAVAILABLE = "ResourceUnavailable"
-func (c *Client) ScanDnsRecordsWithContext(ctx context.Context, request *ScanDnsRecordsRequest) (response *ScanDnsRecordsResponse, err error) {
+func (c *Client) SwitchLogTopicTaskWithContext(ctx context.Context, request *SwitchLogTopicTaskRequest) (response *SwitchLogTopicTaskResponse, err error) {
if request == nil {
- request = NewScanDnsRecordsRequest()
+ request = NewSwitchLogTopicTaskRequest()
}
if c.GetCredential() == nil {
- return nil, errors.New("ScanDnsRecords require credential")
+ return nil, errors.New("SwitchLogTopicTask require credential")
}
request.SetContext(ctx)
- response = NewScanDnsRecordsResponse()
+ response = NewSwitchLogTopicTaskResponse()
err = c.Send(request, response)
return
}
diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220106/errors.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901/errors.go
similarity index 80%
rename from vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220106/errors.go
rename to vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901/errors.go
index ced4592f31..5b30716279 100644
--- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220106/errors.go
+++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901/errors.go
@@ -12,11 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package v20220106
+package v20220901
const (
// 此产品的特有错误码
+ // CAM签名/鉴权错误。
+ AUTHFAILURE = "AuthFailure"
+
// DryRun 操作,代表请求将会是成功的,只是多传了 DryRun 参数。
DRYRUNOPERATION = "DryRunOperation"
@@ -26,6 +29,15 @@ const (
// 证书不存在。
FAILEDOPERATION_CERTIFICATENOTFOUND = "FailedOperation.CertificateNotFound"
+ // 创建日志集失败,请检查日志集名是否已存在。
+ FAILEDOPERATION_CREATECLSLOGSETFAILED = "FailedOperation.CreateClsLogSetFailed"
+
+ // 创建日志主题任务失败,请检查日志主题名或任务名是否已存在。
+ FAILEDOPERATION_CREATECLSLOGTOPICTASKFAILED = "FailedOperation.CreateClsLogTopicTaskFailed"
+
+ // 站点状态不正确。
+ FAILEDOPERATION_INVALIDZONESTATUS = "FailedOperation.InvalidZoneStatus"
+
// 内部错误。
INTERNALERROR = "InternalError"
@@ -53,7 +65,7 @@ const (
// 后端服务路由地址错误。
INTERNALERROR_ROUTEERROR = "InternalError.RouteError"
- // 内部错误。
+ // 系统错误。
INTERNALERROR_SYSTEMERROR = "InternalError.SystemError"
// 参数错误。
@@ -71,8 +83,8 @@ const (
// 无效的客户端IP请求头。
INVALIDPARAMETER_INVALIDCLIENTIPHEADERNAME = "InvalidParameter.InvalidClientIpHeaderName"
- // 套餐包不支持智能加速配置。
- INVALIDPARAMETER_INVALIDDYNAMICROUTINEBILLING = "InvalidParameter.InvalidDynamicRoutineBilling"
+ // 不合法的过滤字段。
+ INVALIDPARAMETER_INVALIDFILTERNAME = "InvalidParameter.InvalidFilterName"
// 无效的源站。
INVALIDPARAMETER_INVALIDORIGIN = "InvalidParameter.InvalidOrigin"
@@ -86,11 +98,8 @@ const (
// 无套餐包。
INVALIDPARAMETER_INVALIDRESOURCEIDBILLING = "InvalidParameter.InvalidResourceIdBilling"
- // 无效的规则引擎条件。
- INVALIDPARAMETER_INVALIDRULEENGINETARGET = "InvalidParameter.InvalidRuleEngineTarget"
-
- // 无效的规则引擎文件后缀条件。
- INVALIDPARAMETER_INVALIDRULEENGINETARGETSEXTENSION = "InvalidParameter.InvalidRuleEngineTargetsExtension"
+ // URL重写的目标URL无效。
+ INVALIDPARAMETER_INVALIDURLREDIRECTURL = "InvalidParameter.InvalidUrlRedirectUrl"
// 无效的WebSocket。
INVALIDPARAMETER_INVALIDWEBSOCKETTIMEOUT = "InvalidParameter.InvalidWebSocketTimeout"
@@ -161,6 +170,9 @@ const (
// 域名尚未备案。
OPERATIONDENIED_DOMAINNOICP = "OperationDenied.DomainNoICP"
+ // 4层代理资源处于封禁中,禁止操作。
+ OPERATIONDENIED_L4PROXYINBANNEDSTATUS = "OperationDenied.L4ProxyInBannedStatus"
+
// 资源被占用。
RESOURCEINUSE = "ResourceInUse"
@@ -176,15 +188,24 @@ const (
// 资源不可用。
RESOURCEUNAVAILABLE = "ResourceUnavailable"
+ // 无剩余可创建新任务的域名。
+ RESOURCEUNAVAILABLE_AVAILABLEDOMAINNOTFOUND = "ResourceUnavailable.AvailableDomainNotFound"
+
// 证书不存在或未授权。
RESOURCEUNAVAILABLE_CERTNOTFOUND = "ResourceUnavailable.CertNotFound"
// 域名不存在或未开启代理。
RESOURCEUNAVAILABLE_HOSTNOTFOUND = "ResourceUnavailable.HostNotFound"
+ // 未拉取到已开启代理的zone信息。
+ RESOURCEUNAVAILABLE_PROXYZONENOTFOUND = "ResourceUnavailable.ProxyZoneNotFound"
+
// 站点不存在或不属于该账号。
RESOURCEUNAVAILABLE_ZONENOTFOUND = "ResourceUnavailable.ZoneNotFound"
+ // 未授权操作。
+ UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
+
// Cam 未授权。
UNAUTHORIZEDOPERATION_CAMUNAUTHORIZED = "UnauthorizedOperation.CamUnauthorized"
@@ -193,4 +214,13 @@ const (
// 子账户没有操作权限,请添加权限后继续操作。
UNAUTHORIZEDOPERATION_NOPERMISSION = "UnauthorizedOperation.NoPermission"
+
+ // 后端服务器发生未知错误。
+ UNAUTHORIZEDOPERATION_UNKNOWN = "UnauthorizedOperation.Unknown"
+
+ // 未知参数错误。
+ UNKNOWNPARAMETER = "UnknownParameter"
+
+ // 操作不支持。
+ UNSUPPORTEDOPERATION = "UnsupportedOperation"
)
diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220106/models.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901/models.go
similarity index 53%
rename from vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220106/models.go
rename to vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901/models.go
index 4dc9141090..4833a75107 100644
--- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220106/models.go
+++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901/models.go
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package v20220106
+package v20220901
import (
"encoding/json"
@@ -20,85 +20,192 @@ import (
tchttp "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http"
)
-type ACLCondition struct {
- // 匹配字段
+type AccelerateType struct {
+ // 加速开关。取值范围:
+ // on:打开;
+ // off:关闭。
+ Switch *string `json:"Switch,omitempty" name:"Switch"`
+}
+
+type AclCondition struct {
+ // 匹配字段,取值有:
+ // host:请求域名;
+ // sip:客户端IP;
+ // ua:User-Agent;
+ // cookie:会话 Cookie;
+ // cgi:CGI 脚本;
+ // xff:XFF 扩展头部;
+ // url:请求 URL;
+ // accept:请求内容类型;
+ // method:请求方式;
+ // header:请求头部;
+ // sip_proto:网络层协议。
MatchFrom *string `json:"MatchFrom,omitempty" name:"MatchFrom"`
- // 匹配字符串
+ // 匹配字符串。当 MatchFrom 为 header 时,可以填入 header 的 key 作为参数。
MatchParam *string `json:"MatchParam,omitempty" name:"MatchParam"`
- // 匹配关系
+ // 匹配关系,取值有:
+ // equal:字符串等于;
+ // not_equal:数值不等于;
+ // include:字符包含;
+ // not_include:字符不包含;
+ // match:ip匹配;
+ // not_match:ip不匹配;
+ // include_area:地域包含;
+ // is_empty:存在字段但值为空;
+ // not_exists:不存在关键字段;
+ // regexp:正则匹配;
+ // len_gt:数值大于;
+ // len_lt:数值小于;
+ // len_eq:数值等于;
+ // match_prefix:前缀匹配;
+ // match_suffix:后缀匹配;
+ // wildcard:通配符。
Operator *string `json:"Operator,omitempty" name:"Operator"`
- // 匹配内容
+ // 匹配内容。
MatchContent *string `json:"MatchContent,omitempty" name:"MatchContent"`
}
-type ACLUserRule struct {
- // 规则名
+type AclConfig struct {
+ // 开关,取值有:
+ // on:开启;
+ // off:关闭。
+ Switch *string `json:"Switch,omitempty" name:"Switch"`
+
+ // 用户自定义规则。
+ AclUserRules []*AclUserRule `json:"AclUserRules,omitempty" name:"AclUserRules"`
+}
+
+type AclUserRule struct {
+ // 规则名。
RuleName *string `json:"RuleName,omitempty" name:"RuleName"`
- // 动作
+ // 处罚动作,取值有:
+ // trans:放行;
+ // drop:拦截;
+ // monitor:观察;
+ // ban:IP封禁;
+ // redirect:重定向;
+ // page:指定页面;
+ // alg:Javascript挑战。
Action *string `json:"Action,omitempty" name:"Action"`
- // 状态
+ // 规则状态,取值有:
+ // on:生效;
+ // off:失效。
RuleStatus *string `json:"RuleStatus,omitempty" name:"RuleStatus"`
- // ACL规则
- Conditions []*ACLCondition `json:"Conditions,omitempty" name:"Conditions"`
+ // 自定义规则。
+ AclConditions []*AclCondition `json:"AclConditions,omitempty" name:"AclConditions"`
- // 规则优先级
+ // 规则优先级,取值范围0-100。
RulePriority *int64 `json:"RulePriority,omitempty" name:"RulePriority"`
- // 规则id
+ // 规则Id。仅出参使用。
// 注意:此字段可能返回 null,表示取不到有效值。
RuleID *int64 `json:"RuleID,omitempty" name:"RuleID"`
- // 更新时间
+ // 更新时间。仅出参使用。
// 注意:此字段可能返回 null,表示取不到有效值。
UpdateTime *string `json:"UpdateTime,omitempty" name:"UpdateTime"`
- // ip封禁的惩罚时间
+ // ip封禁的惩罚时间,取值范围0-2天。默认为0。
// 注意:此字段可能返回 null,表示取不到有效值。
PunishTime *int64 `json:"PunishTime,omitempty" name:"PunishTime"`
- // ip封禁的惩罚时间单位
+ // ip封禁的惩罚时间单位,取值有:
+ // second:秒;
+ // minutes:分;
+ // hour:小时。默认为second。
// 注意:此字段可能返回 null,表示取不到有效值。
PunishTimeUnit *string `json:"PunishTimeUnit,omitempty" name:"PunishTimeUnit"`
- // 自定义返回页面的名称
+ // 自定义返回页面的名称。默认为空字符串。
// 注意:此字段可能返回 null,表示取不到有效值。
Name *string `json:"Name,omitempty" name:"Name"`
- // 自定义返回页面的实例id
+ // 自定义返回页面的实例id。默认为0。
// 注意:此字段可能返回 null,表示取不到有效值。
PageId *int64 `json:"PageId,omitempty" name:"PageId"`
- // 重定向时候的地址,必须为本用户接入的站点子域名
+ // 重定向时候的地址,必须为本用户接入的站点子域名。默认为空字符串。
// 注意:此字段可能返回 null,表示取不到有效值。
RedirectUrl *string `json:"RedirectUrl,omitempty" name:"RedirectUrl"`
- // 重定向时候的返回码
+ // 重定向时候的返回码。默认为0。
// 注意:此字段可能返回 null,表示取不到有效值。
ResponseCode *int64 `json:"ResponseCode,omitempty" name:"ResponseCode"`
}
-type AclConfig struct {
- // 开关
- Switch *string `json:"Switch,omitempty" name:"Switch"`
+type Action struct {
+ // 常规功能操作,选择该类型的功能项有:
+ // 访问URL 重写(AccessUrlRedirect);
+ // 回源 URL 重写 (UpstreamUrlRedirect);
+ // QUIC(QUIC);
+ // WebSocket (WebSocket);
+ // 视频拖拽(VideoSeek);
+ // Token 鉴权(Authentication);
+ // 自定义CacheKey(CacheKey);
+ // 节点缓存 TTL (Cache);
+ // 浏览器缓存 TTL(MaxAge);
+ // 离线缓存(OfflineCache);
+ // 智能加速(SmartRouting);
+ // 分片回源(RangeOriginPull);
+ // HTTP/2 回源(UpstreamHttp2);
+ // Host Header 重写(HostHeader);
+ // 强制 HTTPS(ForceRedirect);
+ // 回源 HTTPS(OriginPullProtocol);
+ // 缓存预刷新(CachePrefresh);
+ // 智能压缩(Compression);
+ // Hsts;
+ // ClientIpHeader;
+ // TlsVersion;
+ // OcspStapling。
+ // HTTP/2 访问(Http2)。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ NormalAction *NormalAction `json:"NormalAction,omitempty" name:"NormalAction"`
+
+ // 带有请求头/响应头的功能操作,选择该类型的功能项有:
+ // 修改 HTTP 请求头(RequestHeader);
+ // 修改HTTP响应头(ResponseHeader)。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ RewriteAction *RewriteAction `json:"RewriteAction,omitempty" name:"RewriteAction"`
+
+ // 带有状态码的功能操作,选择该类型的功能项有:
+ // 自定义错误页面(ErrorPage);
+ // 状态码缓存 TTL(StatusCodeCache)。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ CodeAction *CodeAction `json:"CodeAction,omitempty" name:"CodeAction"`
+}
- // ACL用户规则
- UserRules []*ACLUserRule `json:"UserRules,omitempty" name:"UserRules"`
+type AdvancedFilter struct {
+ // 需要过滤的字段。
+ Name *string `json:"Name,omitempty" name:"Name"`
+
+ // 字段的过滤值。
+ Values []*string `json:"Values,omitempty" name:"Values"`
+
+ // 是否启用模糊查询。
+ Fuzzy *bool `json:"Fuzzy,omitempty" name:"Fuzzy"`
}
type AiRule struct {
- // smart_status_close-关闭;smart_status_open-拦截处置;
- // smart_status_observe-观察处置
- // 注意:此字段可能返回 null,表示取不到有效值。
+ // AI规则引擎状态,取值有:
+ // smart_status_close:关闭;
+ // smart_status_open:拦截处置;
+ // smart_status_observe:观察处置。
Mode *string `json:"Mode,omitempty" name:"Mode"`
}
type ApplicationProxy struct {
+ // 站点ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 站点名称。
+ ZoneName *string `json:"ZoneName,omitempty" name:"ZoneName"`
+
// 代理ID。
ProxyId *string `json:"ProxyId,omitempty" name:"ProxyId"`
@@ -106,11 +213,22 @@ type ApplicationProxy struct {
// 当ProxyType=instance时,表示代理名称。
ProxyName *string `json:"ProxyName,omitempty" name:"ProxyName"`
+ // 四层代理模式,取值有:
+ // hostname:表示子域名模式;
+ // instance:表示实例模式。
+ ProxyType *string `json:"ProxyType,omitempty" name:"ProxyType"`
+
// 调度模式,取值有:
// ip:表示Anycast IP调度;
// domain:表示CNAME调度。
PlatType *string `json:"PlatType,omitempty" name:"PlatType"`
+ // 加速区域,取值有:
+ // mainland:中国大陆境内;
+ // overseas:全球(不含中国大陆)。
+ // 默认值:overseas
+ Area *string `json:"Area,omitempty" name:"Area"`
+
// 是否开启安全,取值有:
// 0:关闭安全;
// 1:开启安全。
@@ -121,14 +239,8 @@ type ApplicationProxy struct {
// 1:开启加速。
AccelerateType *int64 `json:"AccelerateType,omitempty" name:"AccelerateType"`
- // 字段已经废弃。
- ForwardClientIp *string `json:"ForwardClientIp,omitempty" name:"ForwardClientIp"`
-
- // 字段已经废弃。
- SessionPersist *bool `json:"SessionPersist,omitempty" name:"SessionPersist"`
-
- // 规则列表。
- Rule []*ApplicationProxyRule `json:"Rule,omitempty" name:"Rule"`
+ // 会话保持时间。
+ SessionPersistTime *uint64 `json:"SessionPersistTime,omitempty" name:"SessionPersistTime"`
// 状态,取值有:
// online:启用;
@@ -138,45 +250,28 @@ type ApplicationProxy struct {
// fail:部署失败/停用失败。
Status *string `json:"Status,omitempty" name:"Status"`
+ // 封禁状态,取值有:
+ // banned:已封禁;
+ // banning:封禁中;
+ // recover:已解封;
+ // recovering:解封禁中。
+ BanStatus *string `json:"BanStatus,omitempty" name:"BanStatus"`
+
// 调度信息。
ScheduleValue []*string `json:"ScheduleValue,omitempty" name:"ScheduleValue"`
- // 更新时间。
- UpdateTime *string `json:"UpdateTime,omitempty" name:"UpdateTime"`
-
- // 站点ID。
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
-
- // 站点名称。
- ZoneName *string `json:"ZoneName,omitempty" name:"ZoneName"`
-
- // 会话保持时间。
- SessionPersistTime *uint64 `json:"SessionPersistTime,omitempty" name:"SessionPersistTime"`
-
- // 四层代理模式,取值有:
- // hostname:表示子域名模式;
- // instance:表示实例模式。
- ProxyType *string `json:"ProxyType,omitempty" name:"ProxyType"`
-
// 当ProxyType=hostname时:
// 表示代理加速唯一标识。
HostId *string `json:"HostId,omitempty" name:"HostId"`
// Ipv6访问配置。
- Ipv6 *Ipv6Access `json:"Ipv6,omitempty" name:"Ipv6"`
+ Ipv6 *Ipv6 `json:"Ipv6,omitempty" name:"Ipv6"`
- // 加速区域,取值有:
- // mainland:中国大陆境内;
- // overseas:全球(不含中国大陆)。
- // 默认值:overseas
- Area *string `json:"Area,omitempty" name:"Area"`
+ // 更新时间。
+ UpdateTime *string `json:"UpdateTime,omitempty" name:"UpdateTime"`
- // 封禁状态,取值有:
- // banned:已封禁;
- // banning:封禁中;
- // recover:已解封;
- // recovering:解封禁中。
- BanStatus *string `json:"BanStatus,omitempty" name:"BanStatus"`
+ // 规则列表。
+ ApplicationProxyRules []*ApplicationProxyRule `json:"ApplicationProxyRules,omitempty" name:"ApplicationProxyRules"`
}
type ApplicationProxyRule struct {
@@ -219,32 +314,51 @@ type ApplicationProxyRule struct {
// TOA:TOA(仅Proto=TCP时可选);
// PPV1:Proxy Protocol传递,协议版本V1(仅Proto=TCP时可选);
// PPV2:Proxy Protocol传递,协议版本V2;
- // OFF:不传递。
+ // OFF:不传递。默认值:OFF。
ForwardClientIp *string `json:"ForwardClientIp,omitempty" name:"ForwardClientIp"`
// 是否开启会话保持,取值有:
// true:开启;
- // false:关闭。
+ // false:关闭。默认值:false。
SessionPersist *bool `json:"SessionPersist,omitempty" name:"SessionPersist"`
}
-type BotConfig struct {
- // bot开关
- Switch *string `json:"Switch,omitempty" name:"Switch"`
+type AscriptionInfo struct {
+ // 主机记录。
+ Subdomain *string `json:"Subdomain,omitempty" name:"Subdomain"`
+
+ // 记录类型。
+ RecordType *string `json:"RecordType,omitempty" name:"RecordType"`
+
+ // 记录值。
+ RecordValue *string `json:"RecordValue,omitempty" name:"RecordValue"`
+}
+
+type BillingDataFilter struct {
+ // 参数名称,取值范围:
+ // zone:站点名
+ // host:域名
+ // proxy: 四层实例
+ // plan: 套餐
+ Type *string `json:"Type,omitempty" name:"Type"`
- // 预置规则
- ManagedRule *BotManagedRule `json:"ManagedRule,omitempty" name:"ManagedRule"`
+ // 参数值
+ Value *string `json:"Value,omitempty" name:"Value"`
+}
- // 保留
- UaBotRule *BotManagedRule `json:"UaBotRule,omitempty" name:"UaBotRule"`
+type BotConfig struct {
+ // bot开关,取值有:
+ // on:开启;
+ // off:关闭。
+ Switch *string `json:"Switch,omitempty" name:"Switch"`
- // 保留
- IspBotRule *BotManagedRule `json:"IspBotRule,omitempty" name:"IspBotRule"`
+ // 通用详细基础规则。如果为null,默认使用历史配置。
+ BotManagedRule *BotManagedRule `json:"BotManagedRule,omitempty" name:"BotManagedRule"`
- // 用户画像规则
- PortraitRule *BotPortraitRule `json:"PortraitRule,omitempty" name:"PortraitRule"`
+ // 用户画像规则。如果为null,默认使用历史配置。
+ BotPortraitRule *BotPortraitRule `json:"BotPortraitRule,omitempty" name:"BotPortraitRule"`
- // Bot智能分析
+ // Bot智能分析。如果为null,默认使用历史配置。
// 注意:此字段可能返回 null,表示取不到有效值。
IntelligenceRule *IntelligenceRule `json:"IntelligenceRule,omitempty" name:"IntelligenceRule"`
}
@@ -262,7 +376,7 @@ type BotLog struct {
// URI。
RequestUri *string `json:"RequestUri,omitempty" name:"RequestUri"`
- // 当前该字段无效。
+ // 攻击类型。
// 注意:此字段可能返回 null,表示取不到有效值。
AttackType *string `json:"AttackType,omitempty" name:"AttackType"`
@@ -272,11 +386,11 @@ type BotLog struct {
// 攻击内容。
AttackContent *string `json:"AttackContent,omitempty" name:"AttackContent"`
- // 当前该字段无效 。
+ // 攻击等级。
// 注意:此字段可能返回 null,表示取不到有效值。
RiskLevel *string `json:"RiskLevel,omitempty" name:"RiskLevel"`
- // 当前该字段无效 。
+ // 规则ID。
// 注意:此字段可能返回 null,表示取不到有效值。
RuleId *uint64 `json:"RuleId,omitempty" name:"RuleId"`
@@ -286,26 +400,26 @@ type BotLog struct {
// 请求(事件)ID。
EventId *string `json:"EventId,omitempty" name:"EventId"`
- // 该字段当前无效。
+ // 处置方式。
// 注意:此字段可能返回 null,表示取不到有效值。
DisposalMethod *string `json:"DisposalMethod,omitempty" name:"DisposalMethod"`
- // 该字段当前无效。
+ // HTTP日志。
// 注意:此字段可能返回 null,表示取不到有效值。
HttpLog *string `json:"HttpLog,omitempty" name:"HttpLog"`
// user agent。
Ua *string `json:"Ua,omitempty" name:"Ua"`
- // 该字段当前无效。
+ // 检出方法。
// 注意:此字段可能返回 null,表示取不到有效值。
DetectionMethod *string `json:"DetectionMethod,omitempty" name:"DetectionMethod"`
- // 该字段当前无效。
+ // 置信度。
// 注意:此字段可能返回 null,表示取不到有效值。
Confidence *string `json:"Confidence,omitempty" name:"Confidence"`
- // 该字段当前无效。
+ // 恶意度。
// 注意:此字段可能返回 null,表示取不到有效值。
Maliciousness *string `json:"Maliciousness,omitempty" name:"Maliciousness"`
@@ -318,346 +432,176 @@ type BotLog struct {
Label *string `json:"Label,omitempty" name:"Label"`
}
-type BotLogData struct {
- // Bot攻击日志数据集合。
- // 注意:此字段可能返回 null,表示取不到有效值。
- List []*BotLog `json:"List,omitempty" name:"List"`
-
- // 分页拉取的起始页号。最小值:1。
- // 注意:此字段可能返回 null,表示取不到有效值。
- PageNo *int64 `json:"PageNo,omitempty" name:"PageNo"`
-
- // 分页拉取的最大返回结果数。最大值:1000。
- // 注意:此字段可能返回 null,表示取不到有效值。
- PageSize *int64 `json:"PageSize,omitempty" name:"PageSize"`
-
- // 总页数。
- // 注意:此字段可能返回 null,表示取不到有效值。
- Pages *int64 `json:"Pages,omitempty" name:"Pages"`
-
- // 总条数。
- // 注意:此字段可能返回 null,表示取不到有效值。
- TotalSize *int64 `json:"TotalSize,omitempty" name:"TotalSize"`
-}
-
type BotManagedRule struct {
- // 想开启的规则id
- // 注意:此字段可能返回 null,表示取不到有效值。
- ManagedIds []*int64 `json:"ManagedIds,omitempty" name:"ManagedIds"`
-
- // 本规则的id
- RuleID *int64 `json:"RuleID,omitempty" name:"RuleID"`
-
- // drop/trans/monitor/alg
+ // 触发规则后的处置方式,取值有:
+ // drop:拦截;
+ // trans:放行;
+ // alg:Javascript挑战;
+ // monitor:观察。
Action *string `json:"Action,omitempty" name:"Action"`
- // ip封禁的惩罚时间
- // 注意:此字段可能返回 null,表示取不到有效值。
- PunishTime *int64 `json:"PunishTime,omitempty" name:"PunishTime"`
-
- // 单位
- // 注意:此字段可能返回 null,表示取不到有效值。
- PunishTimeUnit *string `json:"PunishTimeUnit,omitempty" name:"PunishTimeUnit"`
-
- // 自定义返回页面的名称
- // 注意:此字段可能返回 null,表示取不到有效值。
- Name *string `json:"Name,omitempty" name:"Name"`
-
- // 自定义返回页面的实例id
- // 注意:此字段可能返回 null,表示取不到有效值。
- PageId *int64 `json:"PageId,omitempty" name:"PageId"`
-
- // 重定向时候的地址,必须为本用户接入的站点子域名,使用URLENCODE
- // 注意:此字段可能返回 null,表示取不到有效值。
- RedirectUrl *string `json:"RedirectUrl,omitempty" name:"RedirectUrl"`
-
- // 重定向时候的返回码
- // 注意:此字段可能返回 null,表示取不到有效值。
- ResponseCode *int64 `json:"ResponseCode,omitempty" name:"ResponseCode"`
+ // 本规则的ID。仅出参使用。
+ RuleID *int64 `json:"RuleID,omitempty" name:"RuleID"`
- // 放行的规则ID
+ // 放行的规则ID。默认所有规则不配置放行。
// 注意:此字段可能返回 null,表示取不到有效值。
TransManagedIds []*int64 `json:"TransManagedIds,omitempty" name:"TransManagedIds"`
- // JS挑战的规则ID
+ // JS挑战的规则ID。默认所有规则不配置JS挑战。
// 注意:此字段可能返回 null,表示取不到有效值。
AlgManagedIds []*int64 `json:"AlgManagedIds,omitempty" name:"AlgManagedIds"`
- // 数字验证码的规则ID
+ // 数字验证码的规则ID。默认所有规则不配置数字验证码。
// 注意:此字段可能返回 null,表示取不到有效值。
CapManagedIds []*int64 `json:"CapManagedIds,omitempty" name:"CapManagedIds"`
- // 观察的规则ID
+ // 观察的规则ID。默认所有规则不配置观察。
// 注意:此字段可能返回 null,表示取不到有效值。
MonManagedIds []*int64 `json:"MonManagedIds,omitempty" name:"MonManagedIds"`
- // 拦截的规则ID
+ // 拦截的规则ID。默认所有规则不配置拦截。
// 注意:此字段可能返回 null,表示取不到有效值。
DropManagedIds []*int64 `json:"DropManagedIds,omitempty" name:"DropManagedIds"`
}
type BotManagedRuleDetail struct {
- // 规则ID
+ // 规则ID。
RuleId *int64 `json:"RuleId,omitempty" name:"RuleId"`
- // 规则描述
+ // 规则描述。
Description *string `json:"Description,omitempty" name:"Description"`
- // 规则分类
+ // 规则分类。
RuleTypeName *string `json:"RuleTypeName,omitempty" name:"RuleTypeName"`
- // 该规则开启/关闭
+ // 该规则开启/关闭状态。
Status *string `json:"Status,omitempty" name:"Status"`
}
type BotPortraitRule struct {
- // 本规则的id
- // 注意:此字段可能返回 null,表示取不到有效值。
+ // 本功能的开关,取值有:
+ // on:开启;
+ // off:关闭。
+ Switch *string `json:"Switch,omitempty" name:"Switch"`
+
+ // 本规则的ID。仅出参使用。
RuleID *int64 `json:"RuleID,omitempty" name:"RuleID"`
- // JS挑战的规则ID
+ // JS挑战的规则ID。默认所有规则不配置JS挑战。
// 注意:此字段可能返回 null,表示取不到有效值。
AlgManagedIds []*int64 `json:"AlgManagedIds,omitempty" name:"AlgManagedIds"`
- // 数字验证码的规则ID
+ // 数字验证码的规则ID。默认所有规则不配置数字验证码。
// 注意:此字段可能返回 null,表示取不到有效值。
CapManagedIds []*int64 `json:"CapManagedIds,omitempty" name:"CapManagedIds"`
- // 观察的规则ID
+ // 观察的规则ID。默认所有规则不配置观察。
// 注意:此字段可能返回 null,表示取不到有效值。
MonManagedIds []*int64 `json:"MonManagedIds,omitempty" name:"MonManagedIds"`
- // 拦截的规则ID
+ // 拦截的规则ID。默认所有规则不配置拦截。
// 注意:此字段可能返回 null,表示取不到有效值。
DropManagedIds []*int64 `json:"DropManagedIds,omitempty" name:"DropManagedIds"`
+}
- // 本功能的开关
- // 注意:此字段可能返回 null,表示取不到有效值。
+type CC struct {
+ // Waf开关,取值为:
+ // on:开启;
+ // off:关闭。
Switch *string `json:"Switch,omitempty" name:"Switch"`
+
+ // 策略ID。
+ PolicyId *int64 `json:"PolicyId,omitempty" name:"PolicyId"`
}
type CCInterceptEvent struct {
- // 客户端ip
- // 注意:此字段可能返回 null,表示取不到有效值。
+ // 客户端IP。
ClientIp *string `json:"ClientIp,omitempty" name:"ClientIp"`
- // 拦截次数/min
- // 注意:此字段可能返回 null,表示取不到有效值。
+ // 拦截次数/min。
InterceptNum *int64 `json:"InterceptNum,omitempty" name:"InterceptNum"`
- // 速拦截时间,分钟时间/min,单位为s
+ // 速拦截时间,分钟时间/min,单位为s。
InterceptTime *int64 `json:"InterceptTime,omitempty" name:"InterceptTime"`
}
-type CCInterceptEventData struct {
- // 攻击事件数据集合
+type Cache struct {
+ // 缓存配置开关,取值有:
+ // on:开启;
+ // off:关闭。
+ Switch *string `json:"Switch,omitempty" name:"Switch"`
+
+ // 缓存过期时间设置。
+ // 单位为秒,最大可设置为 365 天。
// 注意:此字段可能返回 null,表示取不到有效值。
- List []*CCInterceptEvent `json:"List,omitempty" name:"List"`
+ CacheTime *int64 `json:"CacheTime,omitempty" name:"CacheTime"`
- // 当前页
+ // 是否开启强制缓存,取值有:
+ // on:开启;
+ // off:关闭。
// 注意:此字段可能返回 null,表示取不到有效值。
- PageNo *int64 `json:"PageNo,omitempty" name:"PageNo"`
+ IgnoreCacheControl *string `json:"IgnoreCacheControl,omitempty" name:"IgnoreCacheControl"`
+}
- // 每页展示条数
+type CacheConfig struct {
+ // 缓存配置。
// 注意:此字段可能返回 null,表示取不到有效值。
- PageSize *int64 `json:"PageSize,omitempty" name:"PageSize"`
+ Cache *Cache `json:"Cache,omitempty" name:"Cache"`
- // 总页数
+ // 不缓存配置。
// 注意:此字段可能返回 null,表示取不到有效值。
- Pages *int64 `json:"Pages,omitempty" name:"Pages"`
+ NoCache *NoCache `json:"NoCache,omitempty" name:"NoCache"`
- // 总条数
+ // 遵循源站配置。
// 注意:此字段可能返回 null,表示取不到有效值。
- TotalSize *int64 `json:"TotalSize,omitempty" name:"TotalSize"`
+ FollowOrigin *FollowOrigin `json:"FollowOrigin,omitempty" name:"FollowOrigin"`
}
-type CCLog struct {
- // 攻击请求时间,采用unix秒级时间戳。
- AttackTime *uint64 `json:"AttackTime,omitempty" name:"AttackTime"`
-
- // 客户端ip。
- AttackSip *string `json:"AttackSip,omitempty" name:"AttackSip"`
-
- // 受攻击域名。
- AttackDomain *string `json:"AttackDomain,omitempty" name:"AttackDomain"`
-
- // URI。
- RequestUri *string `json:"RequestUri,omitempty" name:"RequestUri"`
-
- // 命中次数。
- HitCount *uint64 `json:"HitCount,omitempty" name:"HitCount"`
-
- // IP所在国家iso-3166中alpha-2编码,编码信息请参考[ISO-3166](https://git.woa.com/edgeone/iso-3166/blob/master/all/all.json)。
- SipCountryCode *string `json:"SipCountryCode,omitempty" name:"SipCountryCode"`
-
- // 请求(事件)ID。
- EventId *string `json:"EventId,omitempty" name:"EventId"`
-
- // 当前该字段已废弃。
+type CacheKey struct {
+ // 是否开启全路径缓存,取值有:
+ // on:开启全路径缓存(即关闭参数忽略);
+ // off:关闭全路径缓存(即开启参数忽略)。
// 注意:此字段可能返回 null,表示取不到有效值。
- DisposalMethod *string `json:"DisposalMethod,omitempty" name:"DisposalMethod"`
+ FullUrlCache *string `json:"FullUrlCache,omitempty" name:"FullUrlCache"`
- // 当前该字段已废弃。
+ // 是否忽略大小写缓存,取值有:
+ // on:忽略;
+ // off:不忽略。
// 注意:此字段可能返回 null,表示取不到有效值。
- HttpLog *string `json:"HttpLog,omitempty" name:"HttpLog"`
+ IgnoreCase *string `json:"IgnoreCase,omitempty" name:"IgnoreCase"`
- // 当前该字段已废弃。
+ // CacheKey中包含请求参数。
// 注意:此字段可能返回 null,表示取不到有效值。
- RuleId *uint64 `json:"RuleId,omitempty" name:"RuleId"`
+ QueryString *QueryString `json:"QueryString,omitempty" name:"QueryString"`
+}
- // 当前该字段已废弃。
- // 注意:此字段可能返回 null,表示取不到有效值。
- RiskLevel *string `json:"RiskLevel,omitempty" name:"RiskLevel"`
+type CachePrefresh struct {
+ // 缓存预刷新配置开关,取值有:
+ // on:开启;
+ // off:关闭。
+ Switch *string `json:"Switch,omitempty" name:"Switch"`
- // User Agent,仅自定义规则日志中存在。
+ // 缓存预刷新百分比,取值范围:1-99。
// 注意:此字段可能返回 null,表示取不到有效值。
- Ua *string `json:"Ua,omitempty" name:"Ua"`
+ Percent *int64 `json:"Percent,omitempty" name:"Percent"`
+}
- // 请求方法,仅自定义规则日志中存在。
- // 注意:此字段可能返回 null,表示取不到有效值。
- RequestMethod *string `json:"RequestMethod,omitempty" name:"RequestMethod"`
+// Predefined struct for user
+type CheckCertificateRequestParams struct {
+ // 证书内容。
+ Certificate *string `json:"Certificate,omitempty" name:"Certificate"`
- // 规则信息列表。
- // 注意:此字段可能返回 null,表示取不到有效值。
- RuleDetailList []*SecRuleRelatedInfo `json:"RuleDetailList,omitempty" name:"RuleDetailList"`
-}
-
-type CCLogData struct {
- // CC拦截日志数据集合。
- // 注意:此字段可能返回 null,表示取不到有效值。
- List []*CCLog `json:"List,omitempty" name:"List"`
-
- // 分页拉取的起始页号。最小值:1。
- PageNo *int64 `json:"PageNo,omitempty" name:"PageNo"`
-
- // 分页拉取的最大返回结果数。最大值:1000。
- PageSize *int64 `json:"PageSize,omitempty" name:"PageSize"`
-
- // 总页数。
- Pages *int64 `json:"Pages,omitempty" name:"Pages"`
-
- // 总条数。
- TotalSize *int64 `json:"TotalSize,omitempty" name:"TotalSize"`
-}
-
-type CacheConfig struct {
- // 缓存配置。
- // 注意:此字段可能返回 null,表示取不到有效值。
- Cache *CacheConfigCache `json:"Cache,omitempty" name:"Cache"`
-
- // 不缓存配置。
- // 注意:此字段可能返回 null,表示取不到有效值。
- NoCache *CacheConfigNoCache `json:"NoCache,omitempty" name:"NoCache"`
-
- // 遵循源站配置。
- // 注意:此字段可能返回 null,表示取不到有效值。
- FollowOrigin *CacheConfigFollowOrigin `json:"FollowOrigin,omitempty" name:"FollowOrigin"`
-}
-
-type CacheConfigCache struct {
- // 缓存配置开关,取值有:
- // on:开启;
- // off:关闭。
- Switch *string `json:"Switch,omitempty" name:"Switch"`
-
- // 缓存过期时间设置。
- // 单位为秒,最大可设置为 365 天。
- // 注意:此字段可能返回 null,表示取不到有效值。
- CacheTime *int64 `json:"CacheTime,omitempty" name:"CacheTime"`
-
- // 是否开启强制缓存,取值有:
- // on:开启;
- // off:关闭。
- // 注意:此字段可能返回 null,表示取不到有效值。
- IgnoreCacheControl *string `json:"IgnoreCacheControl,omitempty" name:"IgnoreCacheControl"`
-}
-
-type CacheConfigFollowOrigin struct {
- // 遵循源站配置开关,取值有:
- // on:开启;
- // off:关闭。
- Switch *string `json:"Switch,omitempty" name:"Switch"`
-}
-
-type CacheConfigNoCache struct {
- // 不缓存配置开关,取值有:
- // on:开启;
- // off:关闭。
- Switch *string `json:"Switch,omitempty" name:"Switch"`
-}
-
-type CacheKey struct {
- // 是否开启全路径缓存,取值有:
- // on:开启全路径缓存(即关闭参数忽略);
- // off:关闭全路径缓存(即开启参数忽略)。
- // 注意:此字段可能返回 null,表示取不到有效值。
- FullUrlCache *string `json:"FullUrlCache,omitempty" name:"FullUrlCache"`
-
- // 是否忽略大小写缓存,取值有:
- // on:忽略;
- // off:不忽略。
- // 注意:此字段可能返回 null,表示取不到有效值。
- IgnoreCase *string `json:"IgnoreCase,omitempty" name:"IgnoreCase"`
-
- // CacheKey中包含请求参数。
- // 注意:此字段可能返回 null,表示取不到有效值。
- QueryString *QueryString `json:"QueryString,omitempty" name:"QueryString"`
-}
-
-type CachePrefresh struct {
- // 缓存预刷新配置开关,取值有:
- // on:开启;
- // off:关闭。
- Switch *string `json:"Switch,omitempty" name:"Switch"`
-
- // 缓存预刷新百分比,取值范围:1-99。
- // 注意:此字段可能返回 null,表示取不到有效值。
- Percent *int64 `json:"Percent,omitempty" name:"Percent"`
-}
-
-type CertFilter struct {
- // 过滤字段名,支持的列表如下:
- // - host:域名。
- // - certId: 证书ID
- // - certAlias: 证书备用名
- // - certType: default: 默认证书, upload: 上传证书, managed:腾讯云证书
- Name *string `json:"Name,omitempty" name:"Name"`
-
- // 过滤字段值
- Values []*string `json:"Values,omitempty" name:"Values"`
-
- // 是否启用模糊查询,仅支持过滤字段名host。
- // 模糊查询时,Value长度最大为1。
- Fuzzy *bool `json:"Fuzzy,omitempty" name:"Fuzzy"`
-}
-
-type CertSort struct {
- // 排序字段,当前支持:
- // createTime,域名创建时间
- // certExpireTime,证书过期时间
- // certDeployTime, 证书部署时间
- Key *string `json:"Key,omitempty" name:"Key"`
-
- // asc/desc,默认desc。
- Sequence *string `json:"Sequence,omitempty" name:"Sequence"`
-}
-
-// Predefined struct for user
-type CheckCertificateRequestParams struct {
- // 证书
- Certificate *string `json:"Certificate,omitempty" name:"Certificate"`
-
- // 私钥
- PrivateKey *string `json:"PrivateKey,omitempty" name:"PrivateKey"`
+ // 私钥内容。
+ PrivateKey *string `json:"PrivateKey,omitempty" name:"PrivateKey"`
}
type CheckCertificateRequest struct {
*tchttp.BaseRequest
- // 证书
+ // 证书内容。
Certificate *string `json:"Certificate,omitempty" name:"Certificate"`
- // 私钥
+ // 私钥内容。
PrivateKey *string `json:"PrivateKey,omitempty" name:"PrivateKey"`
}
@@ -703,7 +647,7 @@ func (r *CheckCertificateResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
-type ClientIp struct {
+type ClientIpHeader struct {
// 配置开关,取值有:
// on:开启;
// off:关闭。
@@ -715,19 +659,86 @@ type ClientIp struct {
HeaderName *string `json:"HeaderName,omitempty" name:"HeaderName"`
}
-type CnameStatus struct {
- // 记录名称
- Name *string `json:"Name,omitempty" name:"Name"`
+type ClientRule struct {
+ // 客户端ip。
+ ClientIp *string `json:"ClientIp,omitempty" name:"ClientIp"`
+
+ // 规则类型。
+ RuleType *string `json:"RuleType,omitempty" name:"RuleType"`
- // CNAME 地址
+ // 规则id。
// 注意:此字段可能返回 null,表示取不到有效值。
- Cname *string `json:"Cname,omitempty" name:"Cname"`
+ RuleId *int64 `json:"RuleId,omitempty" name:"RuleId"`
- // 状态
- // 生效:active
- // 不生效:moved
+ // 规则描述。
// 注意:此字段可能返回 null,表示取不到有效值。
- Status *string `json:"Status,omitempty" name:"Status"`
+ Description *string `json:"Description,omitempty" name:"Description"`
+
+ // 封禁状态,取值有:
+ // block :封禁 ;
+ // allow :放行 。
+ IpStatus *string `json:"IpStatus,omitempty" name:"IpStatus"`
+
+ // 封禁时间,采用unix秒级时间戳。
+ BlockTime *int64 `json:"BlockTime,omitempty" name:"BlockTime"`
+
+ // 每条数据的唯一标识id。
+ Id *string `json:"Id,omitempty" name:"Id"`
+}
+
+type ClsLogTopicInfo struct {
+ // 任务名。
+ TaskName *string `json:"TaskName,omitempty" name:"TaskName"`
+
+ // 站点名称。
+ ZoneName *string `json:"ZoneName,omitempty" name:"ZoneName"`
+
+ // 日志集ID。
+ LogSetId *string `json:"LogSetId,omitempty" name:"LogSetId"`
+
+ // 日志主题ID。
+ TopicId *string `json:"TopicId,omitempty" name:"TopicId"`
+
+ // 任务类型。
+ EntityType *string `json:"EntityType,omitempty" name:"EntityType"`
+
+ // 任务主题保存时间。
+ Period *int64 `json:"Period,omitempty" name:"Period"`
+
+ // 任务主题是否开启。
+ Enabled *bool `json:"Enabled,omitempty" name:"Enabled"`
+
+ // 任务主题是否异常。
+ Deleted *string `json:"Deleted,omitempty" name:"Deleted"`
+
+ // 创建时间。
+ CreateTime *string `json:"CreateTime,omitempty" name:"CreateTime"`
+
+ // 推送目标地址,取值有:
+ // cls: 推送到cls;
+ // custom_enpoint: 自定义推送地址。
+ Target *string `json:"Target,omitempty" name:"Target"`
+
+ // 日志集所属地区。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ LogSetRegion *string `json:"LogSetRegion,omitempty" name:"LogSetRegion"`
+
+ // 站点id。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 加速区域,取值有:
+ // mainland:中国大陆境内;
+ // overseas:全球(不含中国大陆)。
+ Area *string `json:"Area,omitempty" name:"Area"`
+}
+
+type CodeAction struct {
+ // 功能名称,功能名称填写规范可调用接口 [查询规则引擎的设置参数](https://tcloud4api.woa.com/document/product/1657/79433?!preview&!document=1) 查看。
+ Action *string `json:"Action,omitempty" name:"Action"`
+
+ // 操作参数。
+ Parameters []*RuleCodeActionParams `json:"Parameters,omitempty" name:"Parameters"`
}
type Compression struct {
@@ -748,9 +759,6 @@ type CreateApplicationProxyRequestParams struct {
// 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 站点名称。
- ZoneName *string `json:"ZoneName,omitempty" name:"ZoneName"`
-
// 当ProxyType=hostname时,表示域名或子域名;
// 当ProxyType=instance时,表示代理名称。
ProxyName *string `json:"ProxyName,omitempty" name:"ProxyName"`
@@ -770,15 +778,6 @@ type CreateApplicationProxyRequestParams struct {
// 1:开启加速。
AccelerateType *int64 `json:"AccelerateType,omitempty" name:"AccelerateType"`
- // 字段已经废弃。
- SessionPersist *bool `json:"SessionPersist,omitempty" name:"SessionPersist"`
-
- // 字段已经废弃。
- ForwardClientIp *string `json:"ForwardClientIp,omitempty" name:"ForwardClientIp"`
-
- // 规则详细信息。
- Rule []*ApplicationProxyRule `json:"Rule,omitempty" name:"Rule"`
-
// 四层代理模式,取值有:
// hostname:表示子域名模式;
// instance:表示实例模式。不填写使用默认值instance。
@@ -790,7 +789,11 @@ type CreateApplicationProxyRequestParams struct {
// Ipv6访问配置。
// 不填写表示关闭Ipv6访问。
- Ipv6 *Ipv6Access `json:"Ipv6,omitempty" name:"Ipv6"`
+ Ipv6 *Ipv6 `json:"Ipv6,omitempty" name:"Ipv6"`
+
+ // 规则详细信息。
+ // 不填写则不创建规则。
+ ApplicationProxyRules []*ApplicationProxyRule `json:"ApplicationProxyRules,omitempty" name:"ApplicationProxyRules"`
}
type CreateApplicationProxyRequest struct {
@@ -799,9 +802,6 @@ type CreateApplicationProxyRequest struct {
// 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 站点名称。
- ZoneName *string `json:"ZoneName,omitempty" name:"ZoneName"`
-
// 当ProxyType=hostname时,表示域名或子域名;
// 当ProxyType=instance时,表示代理名称。
ProxyName *string `json:"ProxyName,omitempty" name:"ProxyName"`
@@ -821,15 +821,6 @@ type CreateApplicationProxyRequest struct {
// 1:开启加速。
AccelerateType *int64 `json:"AccelerateType,omitempty" name:"AccelerateType"`
- // 字段已经废弃。
- SessionPersist *bool `json:"SessionPersist,omitempty" name:"SessionPersist"`
-
- // 字段已经废弃。
- ForwardClientIp *string `json:"ForwardClientIp,omitempty" name:"ForwardClientIp"`
-
- // 规则详细信息。
- Rule []*ApplicationProxyRule `json:"Rule,omitempty" name:"Rule"`
-
// 四层代理模式,取值有:
// hostname:表示子域名模式;
// instance:表示实例模式。不填写使用默认值instance。
@@ -841,7 +832,11 @@ type CreateApplicationProxyRequest struct {
// Ipv6访问配置。
// 不填写表示关闭Ipv6访问。
- Ipv6 *Ipv6Access `json:"Ipv6,omitempty" name:"Ipv6"`
+ Ipv6 *Ipv6 `json:"Ipv6,omitempty" name:"Ipv6"`
+
+ // 规则详细信息。
+ // 不填写则不创建规则。
+ ApplicationProxyRules []*ApplicationProxyRule `json:"ApplicationProxyRules,omitempty" name:"ApplicationProxyRules"`
}
func (r *CreateApplicationProxyRequest) ToJsonString() string {
@@ -857,17 +852,14 @@ func (r *CreateApplicationProxyRequest) FromJsonString(s string) error {
return err
}
delete(f, "ZoneId")
- delete(f, "ZoneName")
delete(f, "ProxyName")
delete(f, "PlatType")
delete(f, "SecurityType")
delete(f, "AccelerateType")
- delete(f, "SessionPersist")
- delete(f, "ForwardClientIp")
- delete(f, "Rule")
delete(f, "ProxyType")
delete(f, "SessionPersistTime")
delete(f, "Ipv6")
+ delete(f, "ApplicationProxyRules")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateApplicationProxyRequest has unknown keys!", "")
}
@@ -901,18 +893,20 @@ func (r *CreateApplicationProxyResponse) FromJsonString(s string) error {
// Predefined struct for user
type CreateApplicationProxyRuleRequestParams struct {
- // 站点ID
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 代理ID
+ // 代理ID。
ProxyId *string `json:"ProxyId,omitempty" name:"ProxyId"`
- // 协议,取值为TCP或者UDP
+ // 协议,取值有:
+ // TCP:TCP协议;
+ // UDP:UDP协议。
Proto *string `json:"Proto,omitempty" name:"Proto"`
- // 端口,支持格式:
- // 80:80端口
- // 81-90:81至90端口
+ // 源站类型,取值有:
+ // custom:手动添加;
+ // origins:源站组。
Port []*string `json:"Port,omitempty" name:"Port"`
// 源站类型,取值:
@@ -921,41 +915,43 @@ type CreateApplicationProxyRuleRequestParams struct {
OriginType *string `json:"OriginType,omitempty" name:"OriginType"`
// 源站信息:
- // 当OriginType=custom时,表示多个:
- // IP:端口
- // 域名:端口
- // 当OriginType=origins时,包含一个元素,表示源站组ID
+ // 当OriginType=custom时,表示一个或多个源站,如:
+ // OriginValue=["8.8.8.8:80","9.9.9.9:80"]
+ // OriginValue=["test.com:80"];
+ // 当OriginType=origins时,要求有且仅有一个元素,表示源站组ID,如:
+ // OriginValue=["origin-537f5b41-162a-11ed-abaa-525400c5da15"]。
OriginValue []*string `json:"OriginValue,omitempty" name:"OriginValue"`
- // 传递客户端IP,当Proto=TCP时,取值:
- // TOA:TOA
- // PPV1: Proxy Protocol传递,协议版本V1
- // PPV2: Proxy Protocol传递,协议版本V2
- // OFF:不传递
- // 当Proto=UDP时,取值:
- // PPV2: Proxy Protocol传递,协议版本V2
- // OFF:不传递
+ // 传递客户端IP,取值有:
+ // TOA:TOA(仅Proto=TCP时可选);
+ // PPV1:Proxy Protocol传递,协议版本V1(仅Proto=TCP时可选);
+ // PPV2:Proxy Protocol传递,协议版本V2;
+ // OFF:不传递。默认值:OFF。
ForwardClientIp *string `json:"ForwardClientIp,omitempty" name:"ForwardClientIp"`
- // 是否开启会话保持
+ // 是否开启会话保持,取值有:
+ // true:开启;
+ // false:关闭。默认值:false。
SessionPersist *bool `json:"SessionPersist,omitempty" name:"SessionPersist"`
}
type CreateApplicationProxyRuleRequest struct {
*tchttp.BaseRequest
- // 站点ID
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 代理ID
+ // 代理ID。
ProxyId *string `json:"ProxyId,omitempty" name:"ProxyId"`
- // 协议,取值为TCP或者UDP
+ // 协议,取值有:
+ // TCP:TCP协议;
+ // UDP:UDP协议。
Proto *string `json:"Proto,omitempty" name:"Proto"`
- // 端口,支持格式:
- // 80:80端口
- // 81-90:81至90端口
+ // 源站类型,取值有:
+ // custom:手动添加;
+ // origins:源站组。
Port []*string `json:"Port,omitempty" name:"Port"`
// 源站类型,取值:
@@ -964,23 +960,23 @@ type CreateApplicationProxyRuleRequest struct {
OriginType *string `json:"OriginType,omitempty" name:"OriginType"`
// 源站信息:
- // 当OriginType=custom时,表示多个:
- // IP:端口
- // 域名:端口
- // 当OriginType=origins时,包含一个元素,表示源站组ID
+ // 当OriginType=custom时,表示一个或多个源站,如:
+ // OriginValue=["8.8.8.8:80","9.9.9.9:80"]
+ // OriginValue=["test.com:80"];
+ // 当OriginType=origins时,要求有且仅有一个元素,表示源站组ID,如:
+ // OriginValue=["origin-537f5b41-162a-11ed-abaa-525400c5da15"]。
OriginValue []*string `json:"OriginValue,omitempty" name:"OriginValue"`
- // 传递客户端IP,当Proto=TCP时,取值:
- // TOA:TOA
- // PPV1: Proxy Protocol传递,协议版本V1
- // PPV2: Proxy Protocol传递,协议版本V2
- // OFF:不传递
- // 当Proto=UDP时,取值:
- // PPV2: Proxy Protocol传递,协议版本V2
- // OFF:不传递
+ // 传递客户端IP,取值有:
+ // TOA:TOA(仅Proto=TCP时可选);
+ // PPV1:Proxy Protocol传递,协议版本V1(仅Proto=TCP时可选);
+ // PPV2:Proxy Protocol传递,协议版本V2;
+ // OFF:不传递。默认值:OFF。
ForwardClientIp *string `json:"ForwardClientIp,omitempty" name:"ForwardClientIp"`
- // 是否开启会话保持
+ // 是否开启会话保持,取值有:
+ // true:开启;
+ // false:关闭。默认值:false。
SessionPersist *bool `json:"SessionPersist,omitempty" name:"SessionPersist"`
}
@@ -1036,104 +1032,84 @@ func (r *CreateApplicationProxyRuleResponse) FromJsonString(s string) error {
}
// Predefined struct for user
-type CreateApplicationProxyRulesRequestParams struct {
- // 站点ID
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
-
- // 代理ID
- ProxyId *string `json:"ProxyId,omitempty" name:"ProxyId"`
+type CreateCredentialRequestParams struct {
- // 规则列表
- Rule []*ApplicationProxyRule `json:"Rule,omitempty" name:"Rule"`
}
-type CreateApplicationProxyRulesRequest struct {
+type CreateCredentialRequest struct {
*tchttp.BaseRequest
- // 站点ID
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
-
- // 代理ID
- ProxyId *string `json:"ProxyId,omitempty" name:"ProxyId"`
-
- // 规则列表
- Rule []*ApplicationProxyRule `json:"Rule,omitempty" name:"Rule"`
}
-func (r *CreateApplicationProxyRulesRequest) ToJsonString() string {
+func (r *CreateCredentialRequest) 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 *CreateApplicationProxyRulesRequest) FromJsonString(s string) error {
+func (r *CreateCredentialRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "ZoneId")
- delete(f, "ProxyId")
- delete(f, "Rule")
+
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateApplicationProxyRulesRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateCredentialRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type CreateApplicationProxyRulesResponseParams struct {
- // 新增的规则ID数组
- RuleId []*string `json:"RuleId,omitempty" name:"RuleId"`
-
+type CreateCredentialResponseParams struct {
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type CreateApplicationProxyRulesResponse struct {
+type CreateCredentialResponse struct {
*tchttp.BaseResponse
- Response *CreateApplicationProxyRulesResponseParams `json:"Response"`
+ Response *CreateCredentialResponseParams `json:"Response"`
}
-func (r *CreateApplicationProxyRulesResponse) ToJsonString() string {
+func (r *CreateCredentialResponse) 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 *CreateApplicationProxyRulesResponse) FromJsonString(s string) error {
+func (r *CreateCredentialResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
type CreateCustomErrorPageRequestParams struct {
- // zone的id
+ // 站点Id。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 具体所属实体
+ // 子域名。
Entity *string `json:"Entity,omitempty" name:"Entity"`
- // 自定义页面的文件名
+ // 自定义页面的文件名。
Name *string `json:"Name,omitempty" name:"Name"`
- // 自定义页面的内容
+ // 自定义页面的内容,本字段的内容需要将数据经过urlencode后传入。
Content *string `json:"Content,omitempty" name:"Content"`
}
type CreateCustomErrorPageRequest struct {
*tchttp.BaseRequest
- // zone的id
+ // 站点Id。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 具体所属实体
+ // 子域名。
Entity *string `json:"Entity,omitempty" name:"Entity"`
- // 自定义页面的文件名
+ // 自定义页面的文件名。
Name *string `json:"Name,omitempty" name:"Name"`
- // 自定义页面的内容
+ // 自定义页面的内容,本字段的内容需要将数据经过urlencode后传入。
Content *string `json:"Content,omitempty" name:"Content"`
}
@@ -1161,7 +1137,7 @@ func (r *CreateCustomErrorPageRequest) FromJsonString(s string) error {
// Predefined struct for user
type CreateCustomErrorPageResponseParams struct {
- // 自定义页面上传后的唯一id
+ // 自定义页面上传后的唯一id。
PageId *int64 `json:"PageId,omitempty" name:"PageId"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
@@ -1186,50 +1162,70 @@ func (r *CreateCustomErrorPageResponse) FromJsonString(s string) error {
// Predefined struct for user
type CreateDnsRecordRequestParams struct {
- // 站点 ID
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
-
- // 记录类型
+ // DNS记录所属站点ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // DNS记录类型,取值有:
+ // A:将域名指向一个外网 IPv4 地址,如 8.8.8.8;
+ // AAAA:将域名指向一个外网 IPv6 地址;
+ // MX:用于邮箱服务器,相关记录值/优先级参数由邮件注册商提供。存在多条 MX 记录时,优先级越低越优先;
+ // CNAME:将域名指向另一个域名,再由该域名解析出最终 IP 地址;
+ // TXT:对域名进行标识和说明,常用于域名验证和 SPF 记录(反垃圾邮件);
+ // NS:如果需要将子域名交给其他 DNS 服务商解析,则需要添加 NS 记录。根域名无法添加 NS 记录;
+ // CAA:指定可为本站点颁发证书的 CA;
+ // SRV:标识某台服务器使用了某个服务,常见于微软系统的目录管理。
Type *string `json:"Type,omitempty" name:"Type"`
- // 记录名
+ // DNS记录名。
Name *string `json:"Name,omitempty" name:"Name"`
- // 记录内容
+ // DNS记录内容。
Content *string `json:"Content,omitempty" name:"Content"`
- // 代理模式,可选值:dns_only, cdn_only, secure_cdn
+ // 代理模式,取值有:
+ // dns_only:仅DNS解析;
+ // proxied:代理加速。
Mode *string `json:"Mode,omitempty" name:"Mode"`
- // 生存时间值
- Ttl *int64 `json:"Ttl,omitempty" name:"Ttl"`
+ // 缓存时间,数值越小,修改记录各地生效时间越快,默认为300,单位:秒。
+ TTL *int64 `json:"TTL,omitempty" name:"TTL"`
- // 优先级
+ // 该参数在创建MX记录时生效,值越小优先级越高,用户可指定值范围1~50,不指定默认为0。
Priority *int64 `json:"Priority,omitempty" name:"Priority"`
}
type CreateDnsRecordRequest struct {
*tchttp.BaseRequest
- // 站点 ID
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
-
- // 记录类型
+ // DNS记录所属站点ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // DNS记录类型,取值有:
+ // A:将域名指向一个外网 IPv4 地址,如 8.8.8.8;
+ // AAAA:将域名指向一个外网 IPv6 地址;
+ // MX:用于邮箱服务器,相关记录值/优先级参数由邮件注册商提供。存在多条 MX 记录时,优先级越低越优先;
+ // CNAME:将域名指向另一个域名,再由该域名解析出最终 IP 地址;
+ // TXT:对域名进行标识和说明,常用于域名验证和 SPF 记录(反垃圾邮件);
+ // NS:如果需要将子域名交给其他 DNS 服务商解析,则需要添加 NS 记录。根域名无法添加 NS 记录;
+ // CAA:指定可为本站点颁发证书的 CA;
+ // SRV:标识某台服务器使用了某个服务,常见于微软系统的目录管理。
Type *string `json:"Type,omitempty" name:"Type"`
- // 记录名
+ // DNS记录名。
Name *string `json:"Name,omitempty" name:"Name"`
- // 记录内容
+ // DNS记录内容。
Content *string `json:"Content,omitempty" name:"Content"`
- // 代理模式,可选值:dns_only, cdn_only, secure_cdn
+ // 代理模式,取值有:
+ // dns_only:仅DNS解析;
+ // proxied:代理加速。
Mode *string `json:"Mode,omitempty" name:"Mode"`
- // 生存时间值
- Ttl *int64 `json:"Ttl,omitempty" name:"Ttl"`
+ // 缓存时间,数值越小,修改记录各地生效时间越快,默认为300,单位:秒。
+ TTL *int64 `json:"TTL,omitempty" name:"TTL"`
- // 优先级
+ // 该参数在创建MX记录时生效,值越小优先级越高,用户可指定值范围1~50,不指定默认为0。
Priority *int64 `json:"Priority,omitempty" name:"Priority"`
}
@@ -1250,7 +1246,7 @@ func (r *CreateDnsRecordRequest) FromJsonString(s string) error {
delete(f, "Name")
delete(f, "Content")
delete(f, "Mode")
- delete(f, "Ttl")
+ delete(f, "TTL")
delete(f, "Priority")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateDnsRecordRequest has unknown keys!", "")
@@ -1260,109 +1256,143 @@ func (r *CreateDnsRecordRequest) FromJsonString(s string) error {
// Predefined struct for user
type CreateDnsRecordResponseParams struct {
- // 记录 ID
- Id *string `json:"Id,omitempty" name:"Id"`
+ // DNS解析记录ID。
+ DnsRecordId *string `json:"DnsRecordId,omitempty" name:"DnsRecordId"`
- // 记录类型
- Type *string `json:"Type,omitempty" name:"Type"`
+ // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
+}
- // 记录名称
- Name *string `json:"Name,omitempty" name:"Name"`
+type CreateDnsRecordResponse struct {
+ *tchttp.BaseResponse
+ Response *CreateDnsRecordResponseParams `json:"Response"`
+}
- // 记录内容
- Content *string `json:"Content,omitempty" name:"Content"`
+func (r *CreateDnsRecordResponse) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
- // 生存时间值
- Ttl *int64 `json:"Ttl,omitempty" name:"Ttl"`
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *CreateDnsRecordResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
- // 优先级
- Priority *int64 `json:"Priority,omitempty" name:"Priority"`
+// Predefined struct for user
+type CreateIpTableListRequestParams struct {
+ // 站点Id。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 代理模式
- Mode *string `json:"Mode,omitempty" name:"Mode"`
-
- // 解析状态
- // active: 生效
- // pending: 不生效
- Status *string `json:"Status,omitempty" name:"Status"`
+ // 子域名/应用名。
+ Entity *string `json:"Entity,omitempty" name:"Entity"`
- // 已锁定
- Locked *bool `json:"Locked,omitempty" name:"Locked"`
+ // 基础访问管控Ip规则列表。
+ IpTableRules []*IpTableRule `json:"IpTableRules,omitempty" name:"IpTableRules"`
+}
- // 创建时间
- CreatedOn *string `json:"CreatedOn,omitempty" name:"CreatedOn"`
+type CreateIpTableListRequest struct {
+ *tchttp.BaseRequest
+
+ // 站点Id。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 修改时间
- ModifiedOn *string `json:"ModifiedOn,omitempty" name:"ModifiedOn"`
+ // 子域名/应用名。
+ Entity *string `json:"Entity,omitempty" name:"Entity"`
- // 站点 ID
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+ // 基础访问管控Ip规则列表。
+ IpTableRules []*IpTableRule `json:"IpTableRules,omitempty" name:"IpTableRules"`
+}
- // 站点名称
- ZoneName *string `json:"ZoneName,omitempty" name:"ZoneName"`
+func (r *CreateIpTableListRequest) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
- // CNAME 地址
- // 注意:此字段可能返回 null,表示取不到有效值。
- Cname *string `json:"Cname,omitempty" name:"Cname"`
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *CreateIpTableListRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "ZoneId")
+ delete(f, "Entity")
+ delete(f, "IpTableRules")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateIpTableListRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+// Predefined struct for user
+type CreateIpTableListResponseParams struct {
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type CreateDnsRecordResponse struct {
+type CreateIpTableListResponse struct {
*tchttp.BaseResponse
- Response *CreateDnsRecordResponseParams `json:"Response"`
+ Response *CreateIpTableListResponseParams `json:"Response"`
}
-func (r *CreateDnsRecordResponse) ToJsonString() string {
+func (r *CreateIpTableListResponse) 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 *CreateDnsRecordResponse) FromJsonString(s string) error {
+func (r *CreateIpTableListResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
type CreateLoadBalancingRequestParams struct {
- // 站点ID
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 子域名
+ // 负载均衡域名。
Host *string `json:"Host,omitempty" name:"Host"`
- // 代理模式:
- // dns_only: 仅DNS
- // proxied: 开启代理
+ // 代理模式,取值有:
+ // dns_only:仅DNS;
+ // proxied:开启代理。
Type *string `json:"Type,omitempty" name:"Type"`
- // 使用的源站组ID
- OriginId []*string `json:"OriginId,omitempty" name:"OriginId"`
+ // 主源站源站组ID。
+ OriginGroupId *string `json:"OriginGroupId,omitempty" name:"OriginGroupId"`
+
+ // 备用源站源站组ID,当Type=proxied时可以填写,为空表示不使用备用源站。
+ BackupOriginGroupId *string `json:"BackupOriginGroupId,omitempty" name:"BackupOriginGroupId"`
- // 当Type=dns_only表示DNS的TTL时间
+ // 当Type=dns_only时,指解析记录在DNS服务器缓存的生存时间。
+ // 取值范围60-86400,单位:秒,不填写使用默认值:600。
TTL *uint64 `json:"TTL,omitempty" name:"TTL"`
}
type CreateLoadBalancingRequest struct {
*tchttp.BaseRequest
- // 站点ID
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 子域名
+ // 负载均衡域名。
Host *string `json:"Host,omitempty" name:"Host"`
- // 代理模式:
- // dns_only: 仅DNS
- // proxied: 开启代理
+ // 代理模式,取值有:
+ // dns_only:仅DNS;
+ // proxied:开启代理。
Type *string `json:"Type,omitempty" name:"Type"`
- // 使用的源站组ID
- OriginId []*string `json:"OriginId,omitempty" name:"OriginId"`
+ // 主源站源站组ID。
+ OriginGroupId *string `json:"OriginGroupId,omitempty" name:"OriginGroupId"`
+
+ // 备用源站源站组ID,当Type=proxied时可以填写,为空表示不使用备用源站。
+ BackupOriginGroupId *string `json:"BackupOriginGroupId,omitempty" name:"BackupOriginGroupId"`
- // 当Type=dns_only表示DNS的TTL时间
+ // 当Type=dns_only时,指解析记录在DNS服务器缓存的生存时间。
+ // 取值范围60-86400,单位:秒,不填写使用默认值:600。
TTL *uint64 `json:"TTL,omitempty" name:"TTL"`
}
@@ -1381,7 +1411,8 @@ func (r *CreateLoadBalancingRequest) FromJsonString(s string) error {
delete(f, "ZoneId")
delete(f, "Host")
delete(f, "Type")
- delete(f, "OriginId")
+ delete(f, "OriginGroupId")
+ delete(f, "BackupOriginGroupId")
delete(f, "TTL")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateLoadBalancingRequest has unknown keys!", "")
@@ -1391,7 +1422,7 @@ func (r *CreateLoadBalancingRequest) FromJsonString(s string) error {
// Predefined struct for user
type CreateLoadBalancingResponseParams struct {
- // 负载均衡ID
+ // 负载均衡ID。
LoadBalancingId *string `json:"LoadBalancingId,omitempty" name:"LoadBalancingId"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
@@ -1415,52 +1446,252 @@ func (r *CreateLoadBalancingResponse) FromJsonString(s string) error {
}
// Predefined struct for user
-type CreateOriginGroupRequestParams struct {
- // 源站组名称
- OriginName *string `json:"OriginName,omitempty" name:"OriginName"`
+type CreateLogSetRequestParams struct {
+ // 日志集名称。
+ LogSetName *string `json:"LogSetName,omitempty" name:"LogSetName"`
- // 配置类型,当OriginType=self 时,需要填写:
- // area: 按区域配置
- // weight: 按权重配置
- // 当OriginType=third_party/cos 时,不需要填写
- Type *string `json:"Type,omitempty" name:"Type"`
+ // 日志集归属的地域。
+ LogSetRegion *string `json:"LogSetRegion,omitempty" name:"LogSetRegion"`
+}
+
+type CreateLogSetRequest struct {
+ *tchttp.BaseRequest
+
+ // 日志集名称。
+ LogSetName *string `json:"LogSetName,omitempty" name:"LogSetName"`
+
+ // 日志集归属的地域。
+ LogSetRegion *string `json:"LogSetRegion,omitempty" name:"LogSetRegion"`
+}
+
+func (r *CreateLogSetRequest) 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 *CreateLogSetRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "LogSetName")
+ delete(f, "LogSetRegion")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateLogSetRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type CreateLogSetResponseParams struct {
+ // 创建成功的日志集ID。
+ LogSetId *string `json:"LogSetId,omitempty" name:"LogSetId"`
+
+ // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
+}
+
+type CreateLogSetResponse struct {
+ *tchttp.BaseResponse
+ Response *CreateLogSetResponseParams `json:"Response"`
+}
+
+func (r *CreateLogSetResponse) 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 *CreateLogSetResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type CreateLogTopicTaskRequestParams struct {
+ // 日志集ID。
+ LogSetId *string `json:"LogSetId,omitempty" name:"LogSetId"`
+
+ // 日志集所属的地域。
+ LogSetRegion *string `json:"LogSetRegion,omitempty" name:"LogSetRegion"`
- // 源站记录
- Record []*OriginRecord `json:"Record,omitempty" name:"Record"`
+ // 日志集主题名。
+ TopicName *string `json:"TopicName,omitempty" name:"TopicName"`
- // 站点ID
+ // 推送任务的名称。
+ TaskName *string `json:"TaskName,omitempty" name:"TaskName"`
+
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 源站类型
- // self:自有源站
- // third_party:第三方源站
- // cos:腾讯云COS源站
- OriginType *string `json:"OriginType,omitempty" name:"OriginType"`
+ // 站点名称。
+ ZoneName *string `json:"ZoneName,omitempty" name:"ZoneName"`
+
+ // 数据推送类型,取值有:
+ // domain:七层代理日志;
+ // application:四层代理日志;
+ // web-rateLiming:速率限制日志;
+ // web-attack:Web攻击防护日志;
+ // web-rule:自定义规则日志;
+ // web-bot:Bot管理日志。
+ EntityType *string `json:"EntityType,omitempty" name:"EntityType"`
+
+ // 日志主题保存时间,单位为天,取值范围为:1-366。
+ Period *uint64 `json:"Period,omitempty" name:"Period"`
+
+ // 推送任务实体列表。
+ EntityList []*string `json:"EntityList,omitempty" name:"EntityList"`
+
+ // 加速区域,取值有:
+ // mainland:中国大陆境内;
+ // overseas:全球(不含中国大陆)。不填将根据用户的地域智能选择加速区域。
+ Area *string `json:"Area,omitempty" name:"Area"`
}
-type CreateOriginGroupRequest struct {
+type CreateLogTopicTaskRequest struct {
*tchttp.BaseRequest
- // 源站组名称
- OriginName *string `json:"OriginName,omitempty" name:"OriginName"`
+ // 日志集ID。
+ LogSetId *string `json:"LogSetId,omitempty" name:"LogSetId"`
- // 配置类型,当OriginType=self 时,需要填写:
- // area: 按区域配置
- // weight: 按权重配置
- // 当OriginType=third_party/cos 时,不需要填写
- Type *string `json:"Type,omitempty" name:"Type"`
+ // 日志集所属的地域。
+ LogSetRegion *string `json:"LogSetRegion,omitempty" name:"LogSetRegion"`
+
+ // 日志集主题名。
+ TopicName *string `json:"TopicName,omitempty" name:"TopicName"`
+
+ // 推送任务的名称。
+ TaskName *string `json:"TaskName,omitempty" name:"TaskName"`
+
+ // 站点ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 站点名称。
+ ZoneName *string `json:"ZoneName,omitempty" name:"ZoneName"`
+
+ // 数据推送类型,取值有:
+ // domain:七层代理日志;
+ // application:四层代理日志;
+ // web-rateLiming:速率限制日志;
+ // web-attack:Web攻击防护日志;
+ // web-rule:自定义规则日志;
+ // web-bot:Bot管理日志。
+ EntityType *string `json:"EntityType,omitempty" name:"EntityType"`
+
+ // 日志主题保存时间,单位为天,取值范围为:1-366。
+ Period *uint64 `json:"Period,omitempty" name:"Period"`
+
+ // 推送任务实体列表。
+ EntityList []*string `json:"EntityList,omitempty" name:"EntityList"`
+
+ // 加速区域,取值有:
+ // mainland:中国大陆境内;
+ // overseas:全球(不含中国大陆)。不填将根据用户的地域智能选择加速区域。
+ Area *string `json:"Area,omitempty" name:"Area"`
+}
+
+func (r *CreateLogTopicTaskRequest) 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 *CreateLogTopicTaskRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "LogSetId")
+ delete(f, "LogSetRegion")
+ delete(f, "TopicName")
+ delete(f, "TaskName")
+ delete(f, "ZoneId")
+ delete(f, "ZoneName")
+ delete(f, "EntityType")
+ delete(f, "Period")
+ delete(f, "EntityList")
+ delete(f, "Area")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateLogTopicTaskRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type CreateLogTopicTaskResponseParams struct {
+ // 创建成功的主题ID。
+ TopicId *string `json:"TopicId,omitempty" name:"TopicId"`
+
+ // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
+}
+
+type CreateLogTopicTaskResponse struct {
+ *tchttp.BaseResponse
+ Response *CreateLogTopicTaskResponseParams `json:"Response"`
+}
+
+func (r *CreateLogTopicTaskResponse) 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 *CreateLogTopicTaskResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type CreateOriginGroupRequestParams struct {
+ // 站点ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 源站类型,取值有:
+ // self:自有源站;
+ // third_party:第三方源站;
+ // cos:腾讯云COS源站。
+ OriginType *string `json:"OriginType,omitempty" name:"OriginType"`
+
+ // 源站组名称。
+ OriginGroupName *string `json:"OriginGroupName,omitempty" name:"OriginGroupName"`
- // 源站记录
- Record []*OriginRecord `json:"Record,omitempty" name:"Record"`
+ // 源站配置类型,当OriginType=self时,取值有:
+ // area:按区域配置;
+ // weight: 按权重配置;
+ // proto: 按HTTP协议配置。当OriginType=third_party/cos时放空。
+ ConfigurationType *string `json:"ConfigurationType,omitempty" name:"ConfigurationType"`
- // 站点ID
+ // 源站记录信息。
+ OriginRecords []*OriginRecord `json:"OriginRecords,omitempty" name:"OriginRecords"`
+}
+
+type CreateOriginGroupRequest struct {
+ *tchttp.BaseRequest
+
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 源站类型
- // self:自有源站
- // third_party:第三方源站
- // cos:腾讯云COS源站
+ // 源站类型,取值有:
+ // self:自有源站;
+ // third_party:第三方源站;
+ // cos:腾讯云COS源站。
OriginType *string `json:"OriginType,omitempty" name:"OriginType"`
+
+ // 源站组名称。
+ OriginGroupName *string `json:"OriginGroupName,omitempty" name:"OriginGroupName"`
+
+ // 源站配置类型,当OriginType=self时,取值有:
+ // area:按区域配置;
+ // weight: 按权重配置;
+ // proto: 按HTTP协议配置。当OriginType=third_party/cos时放空。
+ ConfigurationType *string `json:"ConfigurationType,omitempty" name:"ConfigurationType"`
+
+ // 源站记录信息。
+ OriginRecords []*OriginRecord `json:"OriginRecords,omitempty" name:"OriginRecords"`
}
func (r *CreateOriginGroupRequest) ToJsonString() string {
@@ -1475,11 +1706,11 @@ func (r *CreateOriginGroupRequest) FromJsonString(s string) error {
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "OriginName")
- delete(f, "Type")
- delete(f, "Record")
delete(f, "ZoneId")
delete(f, "OriginType")
+ delete(f, "OriginGroupName")
+ delete(f, "ConfigurationType")
+ delete(f, "OriginRecords")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateOriginGroupRequest has unknown keys!", "")
}
@@ -1488,8 +1719,8 @@ func (r *CreateOriginGroupRequest) FromJsonString(s string) error {
// Predefined struct for user
type CreateOriginGroupResponseParams struct {
- // 新增的源站组ID
- OriginId *string `json:"OriginId,omitempty" name:"OriginId"`
+ // 源站组ID。
+ OriginGroupId *string `json:"OriginGroupId,omitempty" name:"OriginGroupId"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
@@ -1596,36 +1827,34 @@ func (r *CreatePlanForZoneResponse) FromJsonString(s string) error {
// Predefined struct for user
type CreatePrefetchTaskRequestParams struct {
- // Zone ID
+ // 站点 ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
// 要预热的资源列表,每个元素格式类似如下:
- // http://www.example.com/example.txt
+ // http://www.example.com/example.txt。
Targets []*string `json:"Targets,omitempty" name:"Targets"`
- // 是否对url进行encode
- // 若内容含有非 ASCII 字符集的字符,请开启此开关,编码转换(编码规则遵循 RFC3986)
+ // 是否对url进行encode,若内容含有非 ASCII 字符集的字符,请开启此开关进行编码转换(编码规则遵循 RFC3986)。
EncodeUrl *bool `json:"EncodeUrl,omitempty" name:"EncodeUrl"`
- // 附带的http头部信息
+ // 附带的http头部信息。
Headers []*Header `json:"Headers,omitempty" name:"Headers"`
}
type CreatePrefetchTaskRequest struct {
*tchttp.BaseRequest
- // Zone ID
+ // 站点 ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
// 要预热的资源列表,每个元素格式类似如下:
- // http://www.example.com/example.txt
+ // http://www.example.com/example.txt。
Targets []*string `json:"Targets,omitempty" name:"Targets"`
- // 是否对url进行encode
- // 若内容含有非 ASCII 字符集的字符,请开启此开关,编码转换(编码规则遵循 RFC3986)
+ // 是否对url进行encode,若内容含有非 ASCII 字符集的字符,请开启此开关进行编码转换(编码规则遵循 RFC3986)。
EncodeUrl *bool `json:"EncodeUrl,omitempty" name:"EncodeUrl"`
- // 附带的http头部信息
+ // 附带的http头部信息。
Headers []*Header `json:"Headers,omitempty" name:"Headers"`
}
@@ -1653,10 +1882,10 @@ func (r *CreatePrefetchTaskRequest) FromJsonString(s string) error {
// Predefined struct for user
type CreatePrefetchTaskResponseParams struct {
- // 任务ID
+ // 任务 ID。
JobId *string `json:"JobId,omitempty" name:"JobId"`
- // 失败的任务列表
+ // 失败的任务列表。
// 注意:此字段可能返回 null,表示取不到有效值。
FailedList []*FailReason `json:"FailedList,omitempty" name:"FailedList"`
@@ -1682,58 +1911,58 @@ func (r *CreatePrefetchTaskResponse) FromJsonString(s string) error {
// Predefined struct for user
type CreatePurgeTaskRequestParams struct {
- // Zone ID
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 类型,当前支持的类型:
- // - purge_url:URL
- // - purge_prefix:前缀
- // - purge_host:Hostname
- // - purge_all:全部缓存
+ // 清除缓存类型,取值有:
+ // purge_url:URL;
+ // purge_prefix:前缀;
+ // purge_host:Hostname;
+ // purge_all:全部缓存。
Type *string `json:"Type,omitempty" name:"Type"`
- // 要刷新的资源列表,每个元素格式依据Type而定
- // 1) Type = purge_host 时
- // 形如:www.example.com 或 foo.bar.example.com
- // 2) Type = purge_prefix 时
- // 形如:http://www.example.com/example
- // 3) Type = purge_url 时
- // 形如:https://www.example.com/example.jpg
- // 4)Type = purge_all 时
- // Targets可为空,不需要填写
+ // 要刷新的资源列表,每个元素格式依据Type而定:
+ // 1) Type = purge_host 时:
+ // 形如:www.example.com 或 foo.bar.example.com。
+ // 2) Type = purge_prefix 时:
+ // 形如:http://www.example.com/example。
+ // 3) Type = purge_url 时:
+ // 形如:https://www.example.com/example.jpg。
+ // 4)Type = purge_all 时:
+ // Targets可为空,不需要填写。
Targets []*string `json:"Targets,omitempty" name:"Targets"`
- // 若有编码转换,仅清除编码转换后匹配的资源
- // 若内容含有非 ASCII 字符集的字符,请开启此开关,编码转换(编码规则遵循 RFC3986)
+ // 若有编码转换,仅清除编码转换后匹配的资源。
+ // 若内容含有非 ASCII 字符集的字符,请开启此开关进行编码转换(编码规则遵循 RFC3986)。
EncodeUrl *bool `json:"EncodeUrl,omitempty" name:"EncodeUrl"`
}
type CreatePurgeTaskRequest struct {
*tchttp.BaseRequest
- // Zone ID
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 类型,当前支持的类型:
- // - purge_url:URL
- // - purge_prefix:前缀
- // - purge_host:Hostname
- // - purge_all:全部缓存
+ // 清除缓存类型,取值有:
+ // purge_url:URL;
+ // purge_prefix:前缀;
+ // purge_host:Hostname;
+ // purge_all:全部缓存。
Type *string `json:"Type,omitempty" name:"Type"`
- // 要刷新的资源列表,每个元素格式依据Type而定
- // 1) Type = purge_host 时
- // 形如:www.example.com 或 foo.bar.example.com
- // 2) Type = purge_prefix 时
- // 形如:http://www.example.com/example
- // 3) Type = purge_url 时
- // 形如:https://www.example.com/example.jpg
- // 4)Type = purge_all 时
- // Targets可为空,不需要填写
+ // 要刷新的资源列表,每个元素格式依据Type而定:
+ // 1) Type = purge_host 时:
+ // 形如:www.example.com 或 foo.bar.example.com。
+ // 2) Type = purge_prefix 时:
+ // 形如:http://www.example.com/example。
+ // 3) Type = purge_url 时:
+ // 形如:https://www.example.com/example.jpg。
+ // 4)Type = purge_all 时:
+ // Targets可为空,不需要填写。
Targets []*string `json:"Targets,omitempty" name:"Targets"`
- // 若有编码转换,仅清除编码转换后匹配的资源
- // 若内容含有非 ASCII 字符集的字符,请开启此开关,编码转换(编码规则遵循 RFC3986)
+ // 若有编码转换,仅清除编码转换后匹配的资源。
+ // 若内容含有非 ASCII 字符集的字符,请开启此开关进行编码转换(编码规则遵循 RFC3986)。
EncodeUrl *bool `json:"EncodeUrl,omitempty" name:"EncodeUrl"`
}
@@ -1761,10 +1990,10 @@ func (r *CreatePurgeTaskRequest) FromJsonString(s string) error {
// Predefined struct for user
type CreatePurgeTaskResponseParams struct {
- // 任务ID
+ // 任务ID。
JobId *string `json:"JobId,omitempty" name:"JobId"`
- // 失败的任务列表及原因
+ // 失败的任务列表及原因。
// 注意:此字段可能返回 null,表示取不到有效值。
FailedList []*FailReason `json:"FailedList,omitempty" name:"FailedList"`
@@ -1788,6 +2017,66 @@ func (r *CreatePurgeTaskResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
+// Predefined struct for user
+type CreateReplayTaskRequestParams struct {
+ // 重放任务的 ID 列表。
+ Ids []*string `json:"Ids,omitempty" name:"Ids"`
+}
+
+type CreateReplayTaskRequest struct {
+ *tchttp.BaseRequest
+
+ // 重放任务的 ID 列表。
+ Ids []*string `json:"Ids,omitempty" name:"Ids"`
+}
+
+func (r *CreateReplayTaskRequest) 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 *CreateReplayTaskRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "Ids")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateReplayTaskRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type CreateReplayTaskResponseParams struct {
+ // 此次任务ID。
+ JobId *string `json:"JobId,omitempty" name:"JobId"`
+
+ // 失败的任务列表及原因。
+ FailedList []*FailReason `json:"FailedList,omitempty" name:"FailedList"`
+
+ // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
+}
+
+type CreateReplayTaskResponse struct {
+ *tchttp.BaseResponse
+ Response *CreateReplayTaskResponseParams `json:"Response"`
+}
+
+func (r *CreateReplayTaskResponse) 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 *CreateReplayTaskResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
// Predefined struct for user
type CreateRuleRequestParams struct {
// 站点 ID。
@@ -1802,7 +2091,7 @@ type CreateRuleRequestParams struct {
Status *string `json:"Status,omitempty" name:"Status"`
// 规则内容。
- Rules []*RuleItem `json:"Rules,omitempty" name:"Rules"`
+ Rules []*Rule `json:"Rules,omitempty" name:"Rules"`
}
type CreateRuleRequest struct {
@@ -1820,7 +2109,7 @@ type CreateRuleRequest struct {
Status *string `json:"Status,omitempty" name:"Status"`
// 规则内容。
- Rules []*RuleItem `json:"Rules,omitempty" name:"Rules"`
+ Rules []*Rule `json:"Rules,omitempty" name:"Rules"`
}
func (r *CreateRuleRequest) ToJsonString() string {
@@ -1871,90 +2160,227 @@ func (r *CreateRuleResponse) FromJsonString(s string) error {
}
// Predefined struct for user
-type CreateZoneRequestParams struct {
- // 站点名字
+type CreateSecurityDropPageRequestParams struct {
+ // 站点Id。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 站点子域名。
+ Entity *string `json:"Entity,omitempty" name:"Entity"`
+
+ // 自定义页面的文件名。
Name *string `json:"Name,omitempty" name:"Name"`
- // 接入方式,默认full
- // - full NS接入
- // - partial CNAME接入
- Type *string `json:"Type,omitempty" name:"Type"`
+ // 自定义页面的内容,本字段的内容需要将数据经过urlencode后传入。
+ Content *string `json:"Content,omitempty" name:"Content"`
- // 是否跳过站点历史解析记录扫描
- JumpStart *bool `json:"JumpStart,omitempty" name:"JumpStart"`
+ // 上传的类型,取值有:
+ // file:将页面文件内容进行urlencode编码,填入Content字段;
+ // url:将待上传的url地址进行urlencode编码,填入Content字段,即时下载,内容不会自动更新。
+ Type *string `json:"Type,omitempty" name:"Type"`
- // 资源标签
- Tags []*Tag `json:"Tags,omitempty" name:"Tags"`
+ // 页面所属的模块,取值有:
+ // waf :托管规则模块;
+ // rate:自定义规则模块。
+ Module *string `json:"Module,omitempty" name:"Module"`
}
-type CreateZoneRequest struct {
+type CreateSecurityDropPageRequest struct {
*tchttp.BaseRequest
- // 站点名字
+ // 站点Id。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 站点子域名。
+ Entity *string `json:"Entity,omitempty" name:"Entity"`
+
+ // 自定义页面的文件名。
Name *string `json:"Name,omitempty" name:"Name"`
- // 接入方式,默认full
- // - full NS接入
- // - partial CNAME接入
- Type *string `json:"Type,omitempty" name:"Type"`
+ // 自定义页面的内容,本字段的内容需要将数据经过urlencode后传入。
+ Content *string `json:"Content,omitempty" name:"Content"`
- // 是否跳过站点历史解析记录扫描
- JumpStart *bool `json:"JumpStart,omitempty" name:"JumpStart"`
+ // 上传的类型,取值有:
+ // file:将页面文件内容进行urlencode编码,填入Content字段;
+ // url:将待上传的url地址进行urlencode编码,填入Content字段,即时下载,内容不会自动更新。
+ Type *string `json:"Type,omitempty" name:"Type"`
- // 资源标签
- Tags []*Tag `json:"Tags,omitempty" name:"Tags"`
+ // 页面所属的模块,取值有:
+ // waf :托管规则模块;
+ // rate:自定义规则模块。
+ Module *string `json:"Module,omitempty" name:"Module"`
}
-func (r *CreateZoneRequest) ToJsonString() string {
+func (r *CreateSecurityDropPageRequest) 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 *CreateZoneRequest) FromJsonString(s string) error {
+func (r *CreateSecurityDropPageRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
+ delete(f, "ZoneId")
+ delete(f, "Entity")
delete(f, "Name")
+ delete(f, "Content")
delete(f, "Type")
- delete(f, "JumpStart")
- delete(f, "Tags")
+ delete(f, "Module")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateZoneRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateSecurityDropPageRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type CreateZoneResponseParams struct {
- // 站点ID
- Id *string `json:"Id,omitempty" name:"Id"`
+type CreateSecurityDropPageResponseParams struct {
+ // 自定义页面上传后的唯一id。
+ PageId *int64 `json:"PageId,omitempty" name:"PageId"`
- // 站点名称
- Name *string `json:"Name,omitempty" name:"Name"`
+ // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
+}
- // 站点接入方式
+type CreateSecurityDropPageResponse struct {
+ *tchttp.BaseResponse
+ Response *CreateSecurityDropPageResponseParams `json:"Response"`
+}
+
+func (r *CreateSecurityDropPageResponse) 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 *CreateSecurityDropPageResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type CreateSpeedTestingRequestParams struct {
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 拨测子域名。
+ Host *string `json:"Host,omitempty" name:"Host"`
+}
+
+type CreateSpeedTestingRequest struct {
+ *tchttp.BaseRequest
+
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 拨测子域名。
+ Host *string `json:"Host,omitempty" name:"Host"`
+}
+
+func (r *CreateSpeedTestingRequest) 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 *CreateSpeedTestingRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "ZoneId")
+ delete(f, "Host")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateSpeedTestingRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type CreateSpeedTestingResponseParams struct {
+ // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
+}
+
+type CreateSpeedTestingResponse struct {
+ *tchttp.BaseResponse
+ Response *CreateSpeedTestingResponseParams `json:"Response"`
+}
+
+func (r *CreateSpeedTestingResponse) 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 *CreateSpeedTestingResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type CreateZoneRequestParams struct {
+ // 站点名称。
+ ZoneName *string `json:"ZoneName,omitempty" name:"ZoneName"`
+
+ // 接入方式,取值有:
+ // full:NS接入;
+ // partial:CNAME接入。不填写使用默认值full。
Type *string `json:"Type,omitempty" name:"Type"`
- // 站点状态
- // - pending 未切换NS
- // - active NS 已切换到分配的 NS
- // - moved NS 从腾讯云切走
- Status *string `json:"Status,omitempty" name:"Status"`
+ // 是否跳过站点现有的DNS记录扫描。默认值:false。
+ JumpStart *bool `json:"JumpStart,omitempty" name:"JumpStart"`
- // 当前使用的 NS 列表
- OriginalNameServers []*string `json:"OriginalNameServers,omitempty" name:"OriginalNameServers"`
+ // 资源标签。
+ Tags []*Tag `json:"Tags,omitempty" name:"Tags"`
+}
- // 给用户分配的 NS 列表
- NameServers []*string `json:"NameServers,omitempty" name:"NameServers"`
+type CreateZoneRequest struct {
+ *tchttp.BaseRequest
+
+ // 站点名称。
+ ZoneName *string `json:"ZoneName,omitempty" name:"ZoneName"`
- // 站点创建时间
- CreatedOn *string `json:"CreatedOn,omitempty" name:"CreatedOn"`
+ // 接入方式,取值有:
+ // full:NS接入;
+ // partial:CNAME接入。不填写使用默认值full。
+ Type *string `json:"Type,omitempty" name:"Type"`
- // 站点更新时间
- ModifiedOn *string `json:"ModifiedOn,omitempty" name:"ModifiedOn"`
+ // 是否跳过站点现有的DNS记录扫描。默认值:false。
+ JumpStart *bool `json:"JumpStart,omitempty" name:"JumpStart"`
+
+ // 资源标签。
+ Tags []*Tag `json:"Tags,omitempty" name:"Tags"`
+}
+
+func (r *CreateZoneRequest) 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 *CreateZoneRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "ZoneName")
+ delete(f, "Type")
+ delete(f, "JumpStart")
+ delete(f, "Tags")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateZoneRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type CreateZoneResponseParams struct {
+ // 站点ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
@@ -1976,7 +2402,24 @@ func (r *CreateZoneResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
+type DDoS struct {
+ // 开关,取值有:
+ // on:开启;
+ // off:关闭。
+ Switch *string `json:"Switch,omitempty" name:"Switch"`
+}
+
type DDoSAcl struct {
+ // 端口过滤规则数组。
+ DDoSAclRules []*DDoSAclRule `json:"DDoSAclRules,omitempty" name:"DDoSAclRules"`
+
+ // 清空规则标识,取值有:
+ // off :清空端口过滤规则列表,DDoSAclRules无需填写;
+ // on :配置端口过滤规则,需填写DDoSAclRules参数。
+ Switch *string `json:"Switch,omitempty" name:"Switch"`
+}
+
+type DDoSAclRule struct {
// 目的端口结束,取值范围0-65535。
DportEnd *int64 `json:"DportEnd,omitempty" name:"DportEnd"`
@@ -2000,11 +2443,28 @@ type DDoSAcl struct {
// transmit :放行 ;
// forward :继续防护 。
Action *string `json:"Action,omitempty" name:"Action"`
+}
+
+type DDoSAllowBlock struct {
+ // 黑白名单数组。
+ DDoSAllowBlockRules []*DDoSAllowBlockRule `json:"DDoSAllowBlockRules,omitempty" name:"DDoSAllowBlockRules"`
+
+ // 开关标识防护是否清空,取值有:
+ // off :关闭黑白名单;
+ // on :开启黑白名单,需填写UserAllowBlockIp参数。
+ Switch *string `json:"Switch,omitempty" name:"Switch"`
+}
+
+type DDoSAllowBlockRule struct {
+ // 客户端IP,支持格式有:单IP、IP范围、网段、网段范围。例如"1.1.1.1","1.1.1.2-1.1.1.3","1.2.1.0/24-1.2.2.0/24"。
+ Ip *string `json:"Ip,omitempty" name:"Ip"`
+
+ // 类型,取值有:
+ // block :丢弃 ; allow :允许。
+ Type *string `json:"Type,omitempty" name:"Type"`
- // 是否为系统配置,取值为:
- // 0 :修改配置 ;
- // 1 :系统默认配置 。
- Default *int64 `json:"Default,omitempty" name:"Default"`
+ // 10位时间戳,例如1199116800。不填写系统取当前时间。
+ UpdateTime *int64 `json:"UpdateTime,omitempty" name:"UpdateTime"`
}
type DDoSAntiPly struct {
@@ -2063,31 +2523,86 @@ type DDoSAntiPly struct {
UdpShard *string `json:"UdpShard,omitempty" name:"UdpShard"`
}
-type DDoSApplication struct {
- // 二级域名
- // 注意:此字段可能返回 null,表示取不到有效值。
- Host *string `json:"Host,omitempty" name:"Host"`
+type DDoSAttackEvent struct {
+ // 事件ID。
+ EventId *string `json:"EventId,omitempty" name:"EventId"`
- // 域名状态;
- // init 待切ns
- // offline 需要dns开启站点加速
- // process 在部署中,稍等一会
- // online 正常状态
- // 注意:此字段可能返回 null,表示取不到有效值。
- Status *string `json:"Status,omitempty" name:"Status"`
+ // 攻击类型(对应交互事件名称)。
+ AttackType *string `json:"AttackType,omitempty" name:"AttackType"`
- // 加速开关;on-开启加速;off-关闭加速(AccelerateType:on,SecurityType:on,安全加速,未开防护增强;AccelerateType:off,SecurityType:on,安全加速,开启防护增强;AccelerateType:on,SecurityType:off,内容加速,未开防护增强)
+ // 攻击状态。
+ AttackStatus *int64 `json:"AttackStatus,omitempty" name:"AttackStatus"`
+
+ // 攻击最大带宽。
+ AttackMaxBandWidth *int64 `json:"AttackMaxBandWidth,omitempty" name:"AttackMaxBandWidth"`
+
+ // 攻击包速率峰值。
+ AttackPacketMaxRate *int64 `json:"AttackPacketMaxRate,omitempty" name:"AttackPacketMaxRate"`
+
+ // 攻击开始时间,单位为s。
+ AttackStartTime *int64 `json:"AttackStartTime,omitempty" name:"AttackStartTime"`
+
+ // 攻击结束时间,单位为s。
+ AttackEndTime *int64 `json:"AttackEndTime,omitempty" name:"AttackEndTime"`
+
+ // DDoS策略组ID。
// 注意:此字段可能返回 null,表示取不到有效值。
- AccelerateType *string `json:"AccelerateType,omitempty" name:"AccelerateType"`
+ PolicyId *int64 `json:"PolicyId,omitempty" name:"PolicyId"`
- // 安全开关;on-开启安全;off-关闭安全(AccelerateType:on,SecurityType:on,安全加速,未开防护增强;AccelerateType:off,SecurityType:on,安全加速,开启防护增强;AccelerateType:on,SecurityType:off,内容加速,未开防护增强)
+ // 站点ID。
// 注意:此字段可能返回 null,表示取不到有效值。
- SecurityType *string `json:"SecurityType,omitempty" name:"SecurityType"`
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
}
-type DDoSConfig struct {
- // 开关
- Switch *string `json:"Switch,omitempty" name:"Switch"`
+type DDoSAttackEventDetailData struct {
+ // 攻击状态,取值有:
+ // 1 :观察中 ;
+ // 2 :攻击开始 ;
+ // 3 :攻击结束 。
+ AttackStatus *int64 `json:"AttackStatus,omitempty" name:"AttackStatus"`
+
+ // 攻击类型。
+ AttackType *string `json:"AttackType,omitempty" name:"AttackType"`
+
+ // 结束时间。
+ EndTime *int64 `json:"EndTime,omitempty" name:"EndTime"`
+
+ // 开始时间。
+ StartTime *int64 `json:"StartTime,omitempty" name:"StartTime"`
+
+ // 最大带宽。
+ MaxBandWidth *int64 `json:"MaxBandWidth,omitempty" name:"MaxBandWidth"`
+
+ // 最大包速率。
+ PacketMaxRate *int64 `json:"PacketMaxRate,omitempty" name:"PacketMaxRate"`
+
+ // 事件Id。
+ EventId *string `json:"EventId,omitempty" name:"EventId"`
+
+ // DDoS策略组ID。
+ PolicyId *int64 `json:"PolicyId,omitempty" name:"PolicyId"`
+}
+
+type DDoSAttackSourceEvent struct {
+ // 攻击源ip。
+ AttackSourceIp *string `json:"AttackSourceIp,omitempty" name:"AttackSourceIp"`
+
+ // 地区(国家)。
+ AttackRegion *string `json:"AttackRegion,omitempty" name:"AttackRegion"`
+
+ // 累计攻击流量。
+ AttackFlow *uint64 `json:"AttackFlow,omitempty" name:"AttackFlow"`
+
+ // 累计攻击包量。
+ AttackPacketNum *uint64 `json:"AttackPacketNum,omitempty" name:"AttackPacketNum"`
+}
+
+type DDoSBlockData struct {
+ // 开始时间,采用unix时间戳。
+ StartTime *int64 `json:"StartTime,omitempty" name:"StartTime"`
+
+ // 结束时间,采用unix时间戳。
+ EndTime *int64 `json:"EndTime,omitempty" name:"EndTime"`
}
type DDoSFeaturesFilter struct {
@@ -2183,288 +2698,94 @@ type DDoSGeoIp struct {
// on :不做处理 。
Switch *string `json:"Switch,omitempty" name:"Switch"`
- // 地域信息,ID参考[DescribeSecurityPolicyRegions](https://tcloud4api.woa.com/document/product/1657/76031?!preview&!document=1)。
- RegionId []*int64 `json:"RegionId,omitempty" name:"RegionId"`
+ // 地域信息,ID参考[DescribeSecurityPolicyRegions](https://tcloud4api.woa.com/document/product/1657/81247?!preview&!document=1)。
+ RegionIds []*int64 `json:"RegionIds,omitempty" name:"RegionIds"`
}
-type DDoSStatusInfo struct {
- // 暂不支持,默认值off。
- AiStatus *string `json:"AiStatus,omitempty" name:"AiStatus"`
+type DDoSHost struct {
+ // 二级域名
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Host *string `json:"Host,omitempty" name:"Host"`
- // 废弃字段。
- Appid *string `json:"Appid,omitempty" name:"Appid"`
+ // 域名状态;
+ // init 待切ns
+ // offline 需要dns开启站点加速
+ // process 在部署中,稍等一会
+ // online 正常状态
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Status *string `json:"Status,omitempty" name:"Status"`
- // 策略等级,取值有:
- // low :宽松 ;
- // middle :适中 ;
- // high : 严格。
- PlyLevel *string `json:"PlyLevel,omitempty" name:"PlyLevel"`
-}
+ // 加速开关;on-开启加速;off-关闭加速(AccelerateType:on,SecurityType:on,安全加速,未开防护增强;AccelerateType:off,SecurityType:on,安全加速,开启防护增强;AccelerateType:on,SecurityType:off,内容加速,未开防护增强)
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ AccelerateType *string `json:"AccelerateType,omitempty" name:"AccelerateType"`
-type DDoSUserAllowBlockIP struct {
- // 客户端IP。
- Ip *string `json:"Ip,omitempty" name:"Ip"`
+ // 安全开关;on-开启安全;off-关闭安全(AccelerateType:on,SecurityType:on,安全加速,未开防护增强;AccelerateType:off,SecurityType:on,安全加速,开启防护增强;AccelerateType:on,SecurityType:off,内容加速,未开防护增强)
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ SecurityType *string `json:"SecurityType,omitempty" name:"SecurityType"`
+}
- // 掩码。
- Mask *int64 `json:"Mask,omitempty" name:"Mask"`
+type DDoSMajorAttackEvent struct {
+ // ddos 策略组id。
+ PolicyId *int64 `json:"PolicyId,omitempty" name:"PolicyId"`
- // 类型,取值有:
- // block :丢弃 ;
- // allow :允许。
- Type *string `json:"Type,omitempty" name:"Type"`
+ // 攻击最大带宽。
+ AttackMaxBandWidth *int64 `json:"AttackMaxBandWidth,omitempty" name:"AttackMaxBandWidth"`
- // 10位时间戳,例如1199116800。
- UpdateTime *int64 `json:"UpdateTime,omitempty" name:"UpdateTime"`
+ // 攻击请求时间,采用unix秒级时间戳。
+ AttackTime *int64 `json:"AttackTime,omitempty" name:"AttackTime"`
+}
- // 客户端IP2,设置IP范围时使用,例如 1.1.1.1-1.1.1.2。
- Ip2 *string `json:"Ip2,omitempty" name:"Ip2"`
+type DDoSPacketFilter struct {
+ // 特征过滤规则数组。
+ DDoSFeaturesFilters []*DDoSFeaturesFilter `json:"DDoSFeaturesFilters,omitempty" name:"DDoSFeaturesFilters"`
- // 掩码2,设置IP网段范围时使用,例如 1.1.1.0/24-1.1.2.0/24。
- Mask2 *int64 `json:"Mask2,omitempty" name:"Mask2"`
+ // 特征过滤清空标识,取值有:
+ // off :清空特征过滤规则,无需填写 DDoSFeaturesFilters 参数 ;
+ // on :配置特征过滤规则,需填写 DDoSFeaturesFilters 参数。
+ Switch *string `json:"Switch,omitempty" name:"Switch"`
}
-type DDosAttackEvent struct {
- // ddos 策略组id
+type DDoSRule struct {
+ // DDoS防护等级。如果为null,默认使用历史配置。
// 注意:此字段可能返回 null,表示取不到有效值。
- PolicyId *int64 `json:"PolicyId,omitempty" name:"PolicyId"`
+ DDoSStatusInfo *DDoSStatusInfo `json:"DDoSStatusInfo,omitempty" name:"DDoSStatusInfo"`
- // 攻击类型(对应交互事件名称)
+ // DDoS地域封禁。如果为null,默认使用历史配置。
// 注意:此字段可能返回 null,表示取不到有效值。
- AttackType *string `json:"AttackType,omitempty" name:"AttackType"`
+ DDoSGeoIp *DDoSGeoIp `json:"DDoSGeoIp,omitempty" name:"DDoSGeoIp"`
- // 攻击状态
+ // DDoS黑白名单。如果为null,默认使用历史配置。
// 注意:此字段可能返回 null,表示取不到有效值。
- AttackStatus *int64 `json:"AttackStatus,omitempty" name:"AttackStatus"`
+ DDoSAllowBlock *DDoSAllowBlock `json:"DDoSAllowBlock,omitempty" name:"DDoSAllowBlock"`
- // 攻击最大带宽
+ // DDoS 协议封禁+连接防护。如果为null,默认使用历史配置。
// 注意:此字段可能返回 null,表示取不到有效值。
- AttackMaxBandWidth *int64 `json:"AttackMaxBandWidth,omitempty" name:"AttackMaxBandWidth"`
+ DDoSAntiPly *DDoSAntiPly `json:"DDoSAntiPly,omitempty" name:"DDoSAntiPly"`
- // 攻击包速率峰值
+ // DDoS特征过滤。如果为null,默认使用历史配置。
// 注意:此字段可能返回 null,表示取不到有效值。
- AttackPacketMaxRate *int64 `json:"AttackPacketMaxRate,omitempty" name:"AttackPacketMaxRate"`
+ DDoSPacketFilter *DDoSPacketFilter `json:"DDoSPacketFilter,omitempty" name:"DDoSPacketFilter"`
- // 攻击开始时间 单位为s
+ // DDoS端口过滤。如果为null,默认使用历史配置。
// 注意:此字段可能返回 null,表示取不到有效值。
- AttackStartTime *int64 `json:"AttackStartTime,omitempty" name:"AttackStartTime"`
-
- // 攻击结束时间 单位为s
- // 注意:此字段可能返回 null,表示取不到有效值。
- AttackEndTime *int64 `json:"AttackEndTime,omitempty" name:"AttackEndTime"`
-
- // 事件ID
- // 注意:此字段可能返回 null,表示取不到有效值。
- EventId *string `json:"EventId,omitempty" name:"EventId"`
-
- // 站点id
- // 注意:此字段可能返回 null,表示取不到有效值。
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
-}
-
-type DDosAttackEventData struct {
- // 攻击事件数据集合。
- // 注意:此字段可能返回 null,表示取不到有效值。
- List []*DDosAttackEvent `json:"List,omitempty" name:"List"`
-
- // 分页拉取的起始页号。最小值:1。
- // 注意:此字段可能返回 null,表示取不到有效值。
- PageNo *int64 `json:"PageNo,omitempty" name:"PageNo"`
-
- // 分页拉取的最大返回结果数。最大值:1000。
- // 注意:此字段可能返回 null,表示取不到有效值。
- PageSize *int64 `json:"PageSize,omitempty" name:"PageSize"`
-
- // 总页数。
- // 注意:此字段可能返回 null,表示取不到有效值。
- Pages *int64 `json:"Pages,omitempty" name:"Pages"`
-
- // 总条数。
- // 注意:此字段可能返回 null,表示取不到有效值。
- TotalSize *int64 `json:"TotalSize,omitempty" name:"TotalSize"`
-}
-
-type DDosAttackEventDetailData struct {
- // 攻击状态,取值有:
- // 1 :观察中 ;
- // 2 :攻击开始 ;
- // 3 :攻击结束 。
- AttackStatus *int64 `json:"AttackStatus,omitempty" name:"AttackStatus"`
-
- // 攻击类型。
- AttackType *string `json:"AttackType,omitempty" name:"AttackType"`
-
- // 结束时间。
- EndTime *int64 `json:"EndTime,omitempty" name:"EndTime"`
-
- // 开始时间。
- StartTime *int64 `json:"StartTime,omitempty" name:"StartTime"`
-
- // 最大带宽。
- MaxBandWidth *int64 `json:"MaxBandWidth,omitempty" name:"MaxBandWidth"`
-
- // 最大包速率。
- PacketMaxRate *int64 `json:"PacketMaxRate,omitempty" name:"PacketMaxRate"`
-
- // 事件Id。
- EventId *string `json:"EventId,omitempty" name:"EventId"`
-
- // ddos 策略组id。
- PolicyId *int64 `json:"PolicyId,omitempty" name:"PolicyId"`
-}
-
-type DDosAttackSourceEvent struct {
- // 攻击源ip。
- // 注意:此字段可能返回 null,表示取不到有效值。
- AttackSourceIp *string `json:"AttackSourceIp,omitempty" name:"AttackSourceIp"`
-
- // 地区(国家)。
- // 注意:此字段可能返回 null,表示取不到有效值。
- AttackRegion *string `json:"AttackRegion,omitempty" name:"AttackRegion"`
-
- // 累计攻击流量。
- // 注意:此字段可能返回 null,表示取不到有效值。
- AttackFlow *uint64 `json:"AttackFlow,omitempty" name:"AttackFlow"`
-
- // 累计攻击包量。
- // 注意:此字段可能返回 null,表示取不到有效值。
- AttackPacketNum *uint64 `json:"AttackPacketNum,omitempty" name:"AttackPacketNum"`
-}
-
-type DDosAttackSourceEventData struct {
- // DDos攻击源数据集合。
- // 注意:此字段可能返回 null,表示取不到有效值。
- List []*DDosAttackSourceEvent `json:"List,omitempty" name:"List"`
-
- // 分页拉取的起始页号。最小值:1。
- // 注意:此字段可能返回 null,表示取不到有效值。
- PageNo *int64 `json:"PageNo,omitempty" name:"PageNo"`
-
- // 分页拉取的最大返回结果数。最大值:1000。
- // 注意:此字段可能返回 null,表示取不到有效值。
- PageSize *int64 `json:"PageSize,omitempty" name:"PageSize"`
-
- // 总页数。
- // 注意:此字段可能返回 null,表示取不到有效值。
- Pages *int64 `json:"Pages,omitempty" name:"Pages"`
-
- // 总条数。
- // 注意:此字段可能返回 null,表示取不到有效值。
- TotalSize *int64 `json:"TotalSize,omitempty" name:"TotalSize"`
-}
-
-type DDosMajorAttackEvent struct {
- // ddos 策略组id。
- PolicyId *int64 `json:"PolicyId,omitempty" name:"PolicyId"`
-
- // 攻击最大带宽。
- AttackMaxBandWidth *int64 `json:"AttackMaxBandWidth,omitempty" name:"AttackMaxBandWidth"`
-
- // 攻击请求时间,采用unix秒级时间戳。
- AttackTime *int64 `json:"AttackTime,omitempty" name:"AttackTime"`
-}
-
-type DDosMajorAttackEventData struct {
- // DDosMajorAttackEvent ddos 攻击事件。
- // 注意:此字段可能返回 null,表示取不到有效值。
- List []*DDosMajorAttackEvent `json:"List,omitempty" name:"List"`
-
- // 分页拉取的起始页号。最小值:1。
- // 注意:此字段可能返回 null,表示取不到有效值。
- PageNo *int64 `json:"PageNo,omitempty" name:"PageNo"`
-
- // 分页拉取的最大返回结果数。最大值:1000。
- // 注意:此字段可能返回 null,表示取不到有效值。
- PageSize *int64 `json:"PageSize,omitempty" name:"PageSize"`
-
- // 总页数。
- // 注意:此字段可能返回 null,表示取不到有效值。
- Pages *int64 `json:"Pages,omitempty" name:"Pages"`
-
- // 总条数。
- // 注意:此字段可能返回 null,表示取不到有效值。
- TotalSize *int64 `json:"TotalSize,omitempty" name:"TotalSize"`
-}
-
-type DataItem struct {
- // 时间
- Time *string `json:"Time,omitempty" name:"Time"`
-
- // 数值
- // 注意:此字段可能返回 null,表示取不到有效值。
- Value *uint64 `json:"Value,omitempty" name:"Value"`
-}
-
-type DdosAcls struct {
- // 端口过滤规则数组。
- Acl []*DDoSAcl `json:"Acl,omitempty" name:"Acl"`
-
- // 清空规则标识,取值有:
- // off :清空端口过滤规则列表,Acl无需填写。 ;
- // on :配置端口过滤规则,需填写Acl参数。默认值为on。
- Switch *string `json:"Switch,omitempty" name:"Switch"`
-}
-
-type DdosAllowBlock struct {
- // 黑白名单数组。
- UserAllowBlockIp []*DDoSUserAllowBlockIP `json:"UserAllowBlockIp,omitempty" name:"UserAllowBlockIp"`
-
- // 开关标识防护是否清空,取值有:
- // off :清空黑白名单列表,UserAllowBlockIp无需填写。 ;
- // on :配置黑白名单,需填写UserAllowBlockIp参数。默认值为on。
- Switch *string `json:"Switch,omitempty" name:"Switch"`
-}
-
-type DdosPacketFilter struct {
- // 特征过滤规则数组。
- PacketFilter []*DDoSFeaturesFilter `json:"PacketFilter,omitempty" name:"PacketFilter"`
-
- // 特征过滤清空标识,取值有:
- // off :清空特征过滤规则,无需填写 PacketFilter 参数 ;
- // on :配置特征过滤规则,需填写 PacketFilter 参数。默认值为on。
- Switch *string `json:"Switch,omitempty" name:"Switch"`
-}
-
-type DdosRule struct {
- // DDoS防护等级。
- // 注意:此字段可能返回 null,表示取不到有效值。
- DdosStatusInfo *DDoSStatusInfo `json:"DdosStatusInfo,omitempty" name:"DdosStatusInfo"`
-
- // DDoS地域封禁。
- // 注意:此字段可能返回 null,表示取不到有效值。
- DdosGeoIp *DDoSGeoIp `json:"DdosGeoIp,omitempty" name:"DdosGeoIp"`
-
- // DDoS黑白名单。
- // 注意:此字段可能返回 null,表示取不到有效值。
- DdosAllowBlock *DdosAllowBlock `json:"DdosAllowBlock,omitempty" name:"DdosAllowBlock"`
-
- // DDoS 协议封禁+连接防护。
- // 注意:此字段可能返回 null,表示取不到有效值。
- DdosAntiPly *DDoSAntiPly `json:"DdosAntiPly,omitempty" name:"DdosAntiPly"`
-
- // DDoS特征过滤。
- // 注意:此字段可能返回 null,表示取不到有效值。
- DdosPacketFilter *DdosPacketFilter `json:"DdosPacketFilter,omitempty" name:"DdosPacketFilter"`
-
- // DDoS端口过滤。
- // 注意:此字段可能返回 null,表示取不到有效值。
- DdosAcl *DdosAcls `json:"DdosAcl,omitempty" name:"DdosAcl"`
+ DDoSAcl *DDoSAcl `json:"DDoSAcl,omitempty" name:"DDoSAcl"`
// DDoS开关,取值有:
// on :开启 ;
- // off :关闭 。
+ // off :关闭 。如果为null,默认使用历史配置。
Switch *string `json:"Switch,omitempty" name:"Switch"`
// UDP分片功能是否支持,取值有:
// on :支持 ;
- // off :不支持 。
+ // off :不支持 。仅出参字段,入参无需填写。
UdpShardOpen *string `json:"UdpShardOpen,omitempty" name:"UdpShardOpen"`
- // DDoS源站访问速率限制。
+ // DDoS源站访问速率限制。如果为null,默认使用历史配置。
// 注意:此字段可能返回 null,表示取不到有效值。
- DdosSpeedLimit *DdosSpeedLimit `json:"DdosSpeedLimit,omitempty" name:"DdosSpeedLimit"`
+ DDoSSpeedLimit *DDoSSpeedLimit `json:"DDoSSpeedLimit,omitempty" name:"DDoSSpeedLimit"`
}
-type DdosSpeedLimit struct {
+type DDoSSpeedLimit struct {
// 源站包量限制,支持单位有pps、Kpps、Mpps、Gpps。支持范围1 pps-10000 Gpps。"0 pps"或其他单位数值为0,即不限包。""为不更新。
PackageLimit *string `json:"PackageLimit,omitempty" name:"PackageLimit"`
@@ -2472,68 +2793,73 @@ type DdosSpeedLimit struct {
FluxLimit *string `json:"FluxLimit,omitempty" name:"FluxLimit"`
}
+type DDoSStatusInfo struct {
+ // 策略等级,取值有:
+ // low :宽松 ;
+ // middle :适中 ;
+ // high : 严格。
+ PlyLevel *string `json:"PlyLevel,omitempty" name:"PlyLevel"`
+}
+
type DefaultServerCertInfo struct {
- // 服务器证书 ID, 默认证书ID, 或在 SSL 证书管理进行证书托管时自动生成
+ // 服务器证书 ID。
// 注意:此字段可能返回 null,表示取不到有效值。
CertId *string `json:"CertId,omitempty" name:"CertId"`
- // 证书备注名
+ // 证书备注名。
// 注意:此字段可能返回 null,表示取不到有效值。
Alias *string `json:"Alias,omitempty" name:"Alias"`
- // 证书类型:
- // default: 默认证书
- // upload:用户上传
- // managed:腾讯云托管
+ // 证书类型,取值有:
+ // default: 默认证书;
+ // upload:用户上传;
+ // managed:腾讯云托管。
// 注意:此字段可能返回 null,表示取不到有效值。
Type *string `json:"Type,omitempty" name:"Type"`
- // 证书过期时间
+ // 证书过期时间。
// 注意:此字段可能返回 null,表示取不到有效值。
ExpireTime *string `json:"ExpireTime,omitempty" name:"ExpireTime"`
- // 证书生效时间
+ // 证书生效时间。
// 注意:此字段可能返回 null,表示取不到有效值。
EffectiveTime *string `json:"EffectiveTime,omitempty" name:"EffectiveTime"`
- // 证书公用名
+ // 证书公用名。
// 注意:此字段可能返回 null,表示取不到有效值。
CommonName *string `json:"CommonName,omitempty" name:"CommonName"`
- // 证书SAN域名
+ // 证书SAN域名。
// 注意:此字段可能返回 null,表示取不到有效值。
SubjectAltName []*string `json:"SubjectAltName,omitempty" name:"SubjectAltName"`
- // 证书状态:
- // applying: 证书申请中
- // failed: 证书(申请)失败
- // processing: 证书部署中
- // deployed: 证书已部署
- // disabled: 证书被禁用
+ // 部署状态,取值有:
+ // processing: 部署中;
+ // deployed: 已部署。
// 注意:此字段可能返回 null,表示取不到有效值。
Status *string `json:"Status,omitempty" name:"Status"`
- // Status为失败时,此字段返回失败原因
+ // Status为失败时,此字段返回失败原因。
// 注意:此字段可能返回 null,表示取不到有效值。
Message *string `json:"Message,omitempty" name:"Message"`
}
// Predefined struct for user
type DeleteApplicationProxyRequestParams struct {
- // 站点ID
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 代理ID
+ // 代理ID。
ProxyId *string `json:"ProxyId,omitempty" name:"ProxyId"`
}
type DeleteApplicationProxyRequest struct {
*tchttp.BaseRequest
- // 站点ID
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 代理ID
+ // 代理ID。
ProxyId *string `json:"ProxyId,omitempty" name:"ProxyId"`
}
@@ -2559,9 +2885,6 @@ func (r *DeleteApplicationProxyRequest) FromJsonString(s string) error {
// Predefined struct for user
type DeleteApplicationProxyResponseParams struct {
- // 代理ID
- ProxyId *string `json:"ProxyId,omitempty" name:"ProxyId"`
-
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
@@ -2584,26 +2907,26 @@ func (r *DeleteApplicationProxyResponse) FromJsonString(s string) error {
// Predefined struct for user
type DeleteApplicationProxyRuleRequestParams struct {
- // 站点ID
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 代理ID
+ // 代理ID。
ProxyId *string `json:"ProxyId,omitempty" name:"ProxyId"`
- // 规则ID
+ // 规则ID。
RuleId *string `json:"RuleId,omitempty" name:"RuleId"`
}
type DeleteApplicationProxyRuleRequest struct {
*tchttp.BaseRequest
- // 站点ID
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 代理ID
+ // 代理ID。
ProxyId *string `json:"ProxyId,omitempty" name:"ProxyId"`
- // 规则ID
+ // 规则ID。
RuleId *string `json:"RuleId,omitempty" name:"RuleId"`
}
@@ -2630,9 +2953,6 @@ func (r *DeleteApplicationProxyRuleRequest) FromJsonString(s string) error {
// Predefined struct for user
type DeleteApplicationProxyRuleResponseParams struct {
- // 规则ID
- RuleId *string `json:"RuleId,omitempty" name:"RuleId"`
-
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
@@ -2655,21 +2975,21 @@ func (r *DeleteApplicationProxyRuleResponse) FromJsonString(s string) error {
// Predefined struct for user
type DeleteDnsRecordsRequestParams struct {
- // 站点 ID
+ // 待删除记录所属站点 ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 记录 ID
- Ids []*string `json:"Ids,omitempty" name:"Ids"`
+ // 待删除记录 ID。
+ DnsRecordIds []*string `json:"DnsRecordIds,omitempty" name:"DnsRecordIds"`
}
type DeleteDnsRecordsRequest struct {
*tchttp.BaseRequest
- // 站点 ID
+ // 待删除记录所属站点 ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 记录 ID
- Ids []*string `json:"Ids,omitempty" name:"Ids"`
+ // 待删除记录 ID。
+ DnsRecordIds []*string `json:"DnsRecordIds,omitempty" name:"DnsRecordIds"`
}
func (r *DeleteDnsRecordsRequest) ToJsonString() string {
@@ -2685,7 +3005,7 @@ func (r *DeleteDnsRecordsRequest) FromJsonString(s string) error {
return err
}
delete(f, "ZoneId")
- delete(f, "Ids")
+ delete(f, "DnsRecordIds")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteDnsRecordsRequest has unknown keys!", "")
}
@@ -2694,9 +3014,6 @@ func (r *DeleteDnsRecordsRequest) FromJsonString(s string) error {
// Predefined struct for user
type DeleteDnsRecordsResponseParams struct {
- // 记录 ID
- Ids []*string `json:"Ids,omitempty" name:"Ids"`
-
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
@@ -2719,20 +3036,20 @@ func (r *DeleteDnsRecordsResponse) FromJsonString(s string) error {
// Predefined struct for user
type DeleteLoadBalancingRequestParams struct {
- // 站点ID
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 负载均衡ID
+ // 负载均衡ID。
LoadBalancingId *string `json:"LoadBalancingId,omitempty" name:"LoadBalancingId"`
}
type DeleteLoadBalancingRequest struct {
*tchttp.BaseRequest
- // 站点ID
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 负载均衡ID
+ // 负载均衡ID。
LoadBalancingId *string `json:"LoadBalancingId,omitempty" name:"LoadBalancingId"`
}
@@ -2758,9 +3075,6 @@ func (r *DeleteLoadBalancingRequest) FromJsonString(s string) error {
// Predefined struct for user
type DeleteLoadBalancingResponseParams struct {
- // 负载均衡ID
- LoadBalancingId *string `json:"LoadBalancingId,omitempty" name:"LoadBalancingId"`
-
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
@@ -2782,22 +3096,83 @@ func (r *DeleteLoadBalancingResponse) FromJsonString(s string) error {
}
// Predefined struct for user
-type DeleteOriginGroupRequestParams struct {
- // 源站组ID
- OriginId *string `json:"OriginId,omitempty" name:"OriginId"`
+type DeleteLogTopicTaskRequestParams struct {
+ // 待删除的推送任务ID。
+ TopicId *string `json:"TopicId,omitempty" name:"TopicId"`
+
+ // 推送任务所属日志集地域。
+ LogSetRegion *string `json:"LogSetRegion,omitempty" name:"LogSetRegion"`
+}
+
+type DeleteLogTopicTaskRequest struct {
+ *tchttp.BaseRequest
+
+ // 待删除的推送任务ID。
+ TopicId *string `json:"TopicId,omitempty" name:"TopicId"`
+
+ // 推送任务所属日志集地域。
+ LogSetRegion *string `json:"LogSetRegion,omitempty" name:"LogSetRegion"`
+}
+
+func (r *DeleteLogTopicTaskRequest) 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 *DeleteLogTopicTaskRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "TopicId")
+ delete(f, "LogSetRegion")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteLogTopicTaskRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DeleteLogTopicTaskResponseParams struct {
+ // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
+}
+
+type DeleteLogTopicTaskResponse struct {
+ *tchttp.BaseResponse
+ Response *DeleteLogTopicTaskResponseParams `json:"Response"`
+}
+
+func (r *DeleteLogTopicTaskResponse) 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 *DeleteLogTopicTaskResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
- // 站点ID
+// Predefined struct for user
+type DeleteOriginGroupRequestParams struct {
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 源站组ID。
+ OriginGroupId *string `json:"OriginGroupId,omitempty" name:"OriginGroupId"`
}
type DeleteOriginGroupRequest struct {
*tchttp.BaseRequest
- // 源站组ID
- OriginId *string `json:"OriginId,omitempty" name:"OriginId"`
-
- // 站点ID
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 源站组ID。
+ OriginGroupId *string `json:"OriginGroupId,omitempty" name:"OriginGroupId"`
}
func (r *DeleteOriginGroupRequest) ToJsonString() string {
@@ -2812,8 +3187,8 @@ func (r *DeleteOriginGroupRequest) FromJsonString(s string) error {
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "OriginId")
delete(f, "ZoneId")
+ delete(f, "OriginGroupId")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteOriginGroupRequest has unknown keys!", "")
}
@@ -2822,9 +3197,6 @@ func (r *DeleteOriginGroupRequest) FromJsonString(s string) error {
// Predefined struct for user
type DeleteOriginGroupResponseParams struct {
- // 源站组ID
- OriginId *string `json:"OriginId,omitempty" name:"OriginId"`
-
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
@@ -2908,15 +3280,15 @@ func (r *DeleteRulesResponse) FromJsonString(s string) error {
// Predefined struct for user
type DeleteZoneRequestParams struct {
- // 站点 ID
- Id *string `json:"Id,omitempty" name:"Id"`
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
}
type DeleteZoneRequest struct {
*tchttp.BaseRequest
- // 站点 ID
- Id *string `json:"Id,omitempty" name:"Id"`
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
}
func (r *DeleteZoneRequest) ToJsonString() string {
@@ -2931,7 +3303,7 @@ func (r *DeleteZoneRequest) FromJsonString(s string) error {
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "Id")
+ delete(f, "ZoneId")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteZoneRequest has unknown keys!", "")
}
@@ -2940,9 +3312,6 @@ func (r *DeleteZoneRequest) FromJsonString(s string) error {
// Predefined struct for user
type DeleteZoneResponseParams struct {
- // 站点 ID
- Id *string `json:"Id,omitempty" name:"Id"`
-
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
@@ -2964,224 +3333,156 @@ func (r *DeleteZoneResponse) FromJsonString(s string) error {
}
// Predefined struct for user
-type DescribeApplicationProxyDetailRequestParams struct {
+type DescribeAddableEntityListRequestParams struct {
// 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 实例ID。
- ProxyId *string `json:"ProxyId,omitempty" name:"ProxyId"`
+ // 推送数据类型,取值有:
+ // domain:七层加速日志;
+ // application:四层加速日志;
+ // web-rateLiming:速率限制日志;
+ // web-attack:web攻击防护日志;
+ // web-rule:自定义规则日志;
+ // web-bot:Bot管理日志。
+ EntityType *string `json:"EntityType,omitempty" name:"EntityType"`
}
-type DescribeApplicationProxyDetailRequest struct {
+type DescribeAddableEntityListRequest struct {
*tchttp.BaseRequest
// 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 实例ID。
- ProxyId *string `json:"ProxyId,omitempty" name:"ProxyId"`
+ // 推送数据类型,取值有:
+ // domain:七层加速日志;
+ // application:四层加速日志;
+ // web-rateLiming:速率限制日志;
+ // web-attack:web攻击防护日志;
+ // web-rule:自定义规则日志;
+ // web-bot:Bot管理日志。
+ EntityType *string `json:"EntityType,omitempty" name:"EntityType"`
}
-func (r *DescribeApplicationProxyDetailRequest) ToJsonString() string {
+func (r *DescribeAddableEntityListRequest) 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 *DescribeApplicationProxyDetailRequest) FromJsonString(s string) error {
+func (r *DescribeAddableEntityListRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
delete(f, "ZoneId")
- delete(f, "ProxyId")
+ delete(f, "EntityType")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeApplicationProxyDetailRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAddableEntityListRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeApplicationProxyDetailResponseParams struct {
- // 实例ID。
- ProxyId *string `json:"ProxyId,omitempty" name:"ProxyId"`
-
- // 当ProxyType=hostname时,表示域名或子域名;
- // 当ProxyType=instance时,表示代理名称。
- ProxyName *string `json:"ProxyName,omitempty" name:"ProxyName"`
+type DescribeAddableEntityListResponseParams struct {
+ // 查询结果的总条数。
+ TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"`
- // 调度模式,取值有:
- // ip:表示Anycast IP调度;
- // domain:表示CNAME调度。
- PlatType *string `json:"PlatType,omitempty" name:"PlatType"`
+ // 可添加的实体列表。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ EntityList []*string `json:"EntityList,omitempty" name:"EntityList"`
- // 是否开启安全,取值有:
- // 0:关闭安全;
- // 1:开启安全。
- SecurityType *int64 `json:"SecurityType,omitempty" name:"SecurityType"`
+ // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
+}
- // 是否开启加速,取值有:
- // 0:关闭加速;
- // 1:开启加速。
- AccelerateType *int64 `json:"AccelerateType,omitempty" name:"AccelerateType"`
+type DescribeAddableEntityListResponse struct {
+ *tchttp.BaseResponse
+ Response *DescribeAddableEntityListResponseParams `json:"Response"`
+}
- // 字段已经废弃。
- ForwardClientIp *string `json:"ForwardClientIp,omitempty" name:"ForwardClientIp"`
-
- // 字段已经废弃。
- SessionPersist *bool `json:"SessionPersist,omitempty" name:"SessionPersist"`
-
- // 规则列表。
- Rule []*ApplicationProxyRule `json:"Rule,omitempty" name:"Rule"`
-
- // 状态,取值有:
- // online:启用;
- // offline:停用;
- // progress:部署中。
- Status *string `json:"Status,omitempty" name:"Status"`
-
- // 调度信息。
- ScheduleValue []*string `json:"ScheduleValue,omitempty" name:"ScheduleValue"`
-
- // 更新时间。
- UpdateTime *string `json:"UpdateTime,omitempty" name:"UpdateTime"`
-
- // 站点ID。
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
-
- // 站点名称。
- ZoneName *string `json:"ZoneName,omitempty" name:"ZoneName"`
-
- // 会话保持时间。
- SessionPersistTime *uint64 `json:"SessionPersistTime,omitempty" name:"SessionPersistTime"`
-
- // 四层代理模式,取值有:
- // hostname:表示子域名模式;
- // instance:表示实例模式。
- ProxyType *string `json:"ProxyType,omitempty" name:"ProxyType"`
-
- // 当ProxyType=hostname时:
- // 表示代理加速唯一标识。
- HostId *string `json:"HostId,omitempty" name:"HostId"`
-
- // IPv6访问配置。
- Ipv6 *Ipv6Access `json:"Ipv6,omitempty" name:"Ipv6"`
-
- // 加速区域,取值有:
- // mainland:中国大陆境内;
- // overseas:全球(不含中国大陆)。
- Area *string `json:"Area,omitempty" name:"Area"`
-
- // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
- RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
-}
-
-type DescribeApplicationProxyDetailResponse struct {
- *tchttp.BaseResponse
- Response *DescribeApplicationProxyDetailResponseParams `json:"Response"`
-}
-
-func (r *DescribeApplicationProxyDetailResponse) ToJsonString() string {
+func (r *DescribeAddableEntityListResponse) 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 *DescribeApplicationProxyDetailResponse) FromJsonString(s string) error {
+func (r *DescribeAddableEntityListResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeApplicationProxyRequestParams struct {
- // 站点ID。
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
-
+type DescribeApplicationProxiesRequestParams struct {
// 分页查询偏移量,默认为0。
Offset *int64 `json:"Offset,omitempty" name:"Offset"`
- // 分页查询限制数目,默认为10,最大可设置为1000。
+ // 分页查询限制数目。默认值:20,最大值:1000。
Limit *int64 `json:"Limit,omitempty" name:"Limit"`
- // 代理ID。
- // 当ProxyId为空时,表示查询站点下所有应用代理的列表。
- ProxyId *string `json:"ProxyId,omitempty" name:"ProxyId"`
+ // 过滤条件,Filters.Values的上限为20。详细的过滤条件如下:proxy-id
按照【代理ID】进行过滤。代理ID形如:proxy-ev2sawbwfd。
类型:String
必选:否zone-id
按照【站点ID】进行过滤。站点ID形如:zone-vawer2vadg。
类型:String
必选:否
+ Filters []*Filter `json:"Filters,omitempty" name:"Filters"`
}
-type DescribeApplicationProxyRequest struct {
+type DescribeApplicationProxiesRequest struct {
*tchttp.BaseRequest
- // 站点ID。
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
-
// 分页查询偏移量,默认为0。
Offset *int64 `json:"Offset,omitempty" name:"Offset"`
- // 分页查询限制数目,默认为10,最大可设置为1000。
+ // 分页查询限制数目。默认值:20,最大值:1000。
Limit *int64 `json:"Limit,omitempty" name:"Limit"`
- // 代理ID。
- // 当ProxyId为空时,表示查询站点下所有应用代理的列表。
- ProxyId *string `json:"ProxyId,omitempty" name:"ProxyId"`
+ // 过滤条件,Filters.Values的上限为20。详细的过滤条件如下:proxy-id
按照【代理ID】进行过滤。代理ID形如:proxy-ev2sawbwfd。
类型:String
必选:否zone-id
按照【站点ID】进行过滤。站点ID形如:zone-vawer2vadg。
类型:String
必选:否
+ Filters []*Filter `json:"Filters,omitempty" name:"Filters"`
}
-func (r *DescribeApplicationProxyRequest) ToJsonString() string {
+func (r *DescribeApplicationProxiesRequest) 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 *DescribeApplicationProxyRequest) FromJsonString(s string) error {
+func (r *DescribeApplicationProxiesRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "ZoneId")
delete(f, "Offset")
delete(f, "Limit")
- delete(f, "ProxyId")
+ delete(f, "Filters")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeApplicationProxyRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeApplicationProxiesRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeApplicationProxyResponseParams struct {
+type DescribeApplicationProxiesResponseParams struct {
// 应用代理列表。
- Data []*ApplicationProxy `json:"Data,omitempty" name:"Data"`
+ ApplicationProxies []*ApplicationProxy `json:"ApplicationProxies,omitempty" name:"ApplicationProxies"`
// 记录总数。
TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
- // 字段已废弃。
- Quota *int64 `json:"Quota,omitempty" name:"Quota"`
-
- // 当ProxyId为空时,表示套餐内PlatType为ip的Anycast IP的实例数量。
- IpCount *uint64 `json:"IpCount,omitempty" name:"IpCount"`
-
- // 当ProxyId为空时,表示套餐内PlatType为domain的CNAME的实例数量。
- DomainCount *uint64 `json:"DomainCount,omitempty" name:"DomainCount"`
-
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeApplicationProxyResponse struct {
+type DescribeApplicationProxiesResponse struct {
*tchttp.BaseResponse
- Response *DescribeApplicationProxyResponseParams `json:"Response"`
+ Response *DescribeApplicationProxiesResponseParams `json:"Response"`
}
-func (r *DescribeApplicationProxyResponse) ToJsonString() string {
+func (r *DescribeApplicationProxiesResponse) 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 *DescribeApplicationProxyResponse) FromJsonString(s string) error {
+func (r *DescribeApplicationProxiesResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
@@ -3218,7 +3519,7 @@ func (r *DescribeAvailablePlansRequest) FromJsonString(s string) error {
type DescribeAvailablePlansResponseParams struct {
// 当前账户可购买套餐类型及相关信息。
// 注意:此字段可能返回 null,表示取不到有效值。
- PlanInfoList []*PlanInfo `json:"PlanInfoList,omitempty" name:"PlanInfoList"`
+ PlanInfo []*PlanInfo `json:"PlanInfo,omitempty" name:"PlanInfo"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
@@ -3241,43 +3542,43 @@ func (r *DescribeAvailablePlansResponse) FromJsonString(s string) error {
}
// Predefined struct for user
-type DescribeBotLogRequestParams struct {
+type DescribeBillingDataRequestParams struct {
// 起始时间。
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
// 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 分页拉取的最大返回结果数。最大值:1000。
- PageSize *int64 `json:"PageSize,omitempty" name:"PageSize"`
-
- // 分页拉取的起始页号。最小值:1。
- PageNo *int64 `json:"PageNo,omitempty" name:"PageNo"`
-
- // 站点集合,不填默认查询所有站点。
- ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
-
- // 域名集合,不填默认查询所有子域名。
- Domains []*string `json:"Domains,omitempty" name:"Domains"`
+ // 时间粒度, 支持指定以下几种粒度:
+ //
+ // - min:1分钟粒度;
+ // - 5min:5分钟粒度;
+ // - hour:1小时粒度;
+ // - day:天粒度;
+ //
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
- // 筛选条件,取值有:
- // action :执行动作(处置方式);
- // sipCountryCode :ip所在国家 ;
- // attackIp :攻击ip ;
- // ruleId :规则id ;
- // eventId :事件id ;
- // ua :用户代理 ;
- // requestMethod :请求方法 ;
- // uri :统一资源标识符 。
- QueryCondition []*QueryCondition `json:"QueryCondition,omitempty" name:"QueryCondition"`
+ // 指标名,支持:
+ //
+ // - acc_flux: 内容加速流量用量;
+ // - quic_request: QUIC 请求数用量;
+ // - sec_flux: 安全流量用量;
+ // - sec_request_clean: 安全干净流量请求数;
+ //
+ MetricName *string `json:"MetricName,omitempty" name:"MetricName"`
- // 数据归属地区,取值有:
- // overseas :全球(除中国大陆地区)数据 ;
- // mainland :中国大陆地区数据 。不填默认查询overseas。
- Area *string `json:"Area,omitempty" name:"Area"`
+ // 筛选条件. 支持:
+ //
+ // - zone: 站点级数据;
+ // - plan: 套餐级数据;
+ // - service: l4 / l7分别筛选四七层数据;
+ // - tagKey: 标签Key;
+ // - tagValue: 标签Value。
+ //
+ Filters []*BillingDataFilter `json:"Filters,omitempty" name:"Filters"`
}
-type DescribeBotLogRequest struct {
+type DescribeBillingDataRequest struct {
*tchttp.BaseRequest
// 起始时间。
@@ -3286,595 +3587,754 @@ type DescribeBotLogRequest struct {
// 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 分页拉取的最大返回结果数。最大值:1000。
- PageSize *int64 `json:"PageSize,omitempty" name:"PageSize"`
-
- // 分页拉取的起始页号。最小值:1。
- PageNo *int64 `json:"PageNo,omitempty" name:"PageNo"`
-
- // 站点集合,不填默认查询所有站点。
- ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
-
- // 域名集合,不填默认查询所有子域名。
- Domains []*string `json:"Domains,omitempty" name:"Domains"`
+ // 时间粒度, 支持指定以下几种粒度:
+ //
+ // - min:1分钟粒度;
+ // - 5min:5分钟粒度;
+ // - hour:1小时粒度;
+ // - day:天粒度;
+ //
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
- // 筛选条件,取值有:
- // action :执行动作(处置方式);
- // sipCountryCode :ip所在国家 ;
- // attackIp :攻击ip ;
- // ruleId :规则id ;
- // eventId :事件id ;
- // ua :用户代理 ;
- // requestMethod :请求方法 ;
- // uri :统一资源标识符 。
- QueryCondition []*QueryCondition `json:"QueryCondition,omitempty" name:"QueryCondition"`
+ // 指标名,支持:
+ //
+ // - acc_flux: 内容加速流量用量;
+ // - quic_request: QUIC 请求数用量;
+ // - sec_flux: 安全流量用量;
+ // - sec_request_clean: 安全干净流量请求数;
+ //
+ MetricName *string `json:"MetricName,omitempty" name:"MetricName"`
- // 数据归属地区,取值有:
- // overseas :全球(除中国大陆地区)数据 ;
- // mainland :中国大陆地区数据 。不填默认查询overseas。
- Area *string `json:"Area,omitempty" name:"Area"`
+ // 筛选条件. 支持:
+ //
+ // - zone: 站点级数据;
+ // - plan: 套餐级数据;
+ // - service: l4 / l7分别筛选四七层数据;
+ // - tagKey: 标签Key;
+ // - tagValue: 标签Value。
+ //
+ Filters []*BillingDataFilter `json:"Filters,omitempty" name:"Filters"`
}
-func (r *DescribeBotLogRequest) ToJsonString() string {
+func (r *DescribeBillingDataRequest) 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 *DescribeBotLogRequest) FromJsonString(s string) error {
+func (r *DescribeBillingDataRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
delete(f, "StartTime")
delete(f, "EndTime")
- delete(f, "PageSize")
- delete(f, "PageNo")
- delete(f, "ZoneIds")
- delete(f, "Domains")
- delete(f, "QueryCondition")
- delete(f, "Area")
+ delete(f, "Interval")
+ delete(f, "MetricName")
+ delete(f, "Filters")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeBotLogRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeBillingDataRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeBotLogResponseParams struct {
- // Bot攻击数据内容。
- Data *BotLogData `json:"Data,omitempty" name:"Data"`
-
- // 请求响应状态,取值有:
- // 1 :失败 ;
- // 0 :成功 。
- Status *int64 `json:"Status,omitempty" name:"Status"`
+type DescribeBillingDataResponseParams struct {
+ // 统计曲线数据
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Data []*DnsData `json:"Data,omitempty" name:"Data"`
- // 请求响应信息。
- Msg *string `json:"Msg,omitempty" name:"Msg"`
+ // 时间粒度
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeBotLogResponse struct {
+type DescribeBillingDataResponse struct {
*tchttp.BaseResponse
- Response *DescribeBotLogResponseParams `json:"Response"`
+ Response *DescribeBillingDataResponseParams `json:"Response"`
}
-func (r *DescribeBotLogResponse) ToJsonString() string {
+func (r *DescribeBillingDataResponse) 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 *DescribeBotLogResponse) FromJsonString(s string) error {
+func (r *DescribeBillingDataResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeBotManagedRulesRequestParams struct {
- // 一级域名
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+type DescribeBotClientIpListRequestParams struct {
+ // 开始时间。
+ StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // 子域名/应用名
- Entity *string `json:"Entity,omitempty" name:"Entity"`
+ // 结束时间。
+ EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
+
+ // 站点集合,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+
+ // 子域名列表,不填默认选择全部子域名。
+ Domains []*string `json:"Domains,omitempty" name:"Domains"`
+
+ // 查询时间粒度,取值有:
+ // min :1分钟;
+ // 5min :5分钟;
+ // hour :1小时;
+ // day :1天。 不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
- // 页数
- Page *int64 `json:"Page,omitempty" name:"Page"`
+ // 筛选条件,key可选的值有:
+ // action: 执行动作。
+ QueryCondition []*QueryCondition `json:"QueryCondition,omitempty" name:"QueryCondition"`
- // 每页数量
- PerPage *int64 `json:"PerPage,omitempty" name:"PerPage"`
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
- // idcid/sipbot/uabot规则类型,空代表拉取全部
- RuleType *string `json:"RuleType,omitempty" name:"RuleType"`
+ // 分页的偏移量,默认值为0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+
+ // 数据归属地区,取值有:
+ // overseas :全球(除中国大陆地区)数据;
+ // mainland :中国大陆地区数据。 不填将根据用户所在地智能选择地区。
+ Area *string `json:"Area,omitempty" name:"Area"`
}
-type DescribeBotManagedRulesRequest struct {
+type DescribeBotClientIpListRequest struct {
*tchttp.BaseRequest
- // 一级域名
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+ // 开始时间。
+ StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // 子域名/应用名
- Entity *string `json:"Entity,omitempty" name:"Entity"`
+ // 结束时间。
+ EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 页数
- Page *int64 `json:"Page,omitempty" name:"Page"`
+ // 站点集合,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // 每页数量
- PerPage *int64 `json:"PerPage,omitempty" name:"PerPage"`
+ // 子域名列表,不填默认选择全部子域名。
+ Domains []*string `json:"Domains,omitempty" name:"Domains"`
- // idcid/sipbot/uabot规则类型,空代表拉取全部
- RuleType *string `json:"RuleType,omitempty" name:"RuleType"`
+ // 查询时间粒度,取值有:
+ // min :1分钟;
+ // 5min :5分钟;
+ // hour :1小时;
+ // day :1天。 不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
+
+ // 筛选条件,key可选的值有:
+ // action: 执行动作。
+ QueryCondition []*QueryCondition `json:"QueryCondition,omitempty" name:"QueryCondition"`
+
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
+
+ // 分页的偏移量,默认值为0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+
+ // 数据归属地区,取值有:
+ // overseas :全球(除中国大陆地区)数据;
+ // mainland :中国大陆地区数据。 不填将根据用户所在地智能选择地区。
+ Area *string `json:"Area,omitempty" name:"Area"`
}
-func (r *DescribeBotManagedRulesRequest) ToJsonString() string {
+func (r *DescribeBotClientIpListRequest) 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 *DescribeBotManagedRulesRequest) FromJsonString(s string) error {
+func (r *DescribeBotClientIpListRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "ZoneId")
- delete(f, "Entity")
- delete(f, "Page")
- delete(f, "PerPage")
- delete(f, "RuleType")
+ delete(f, "StartTime")
+ delete(f, "EndTime")
+ delete(f, "ZoneIds")
+ delete(f, "Domains")
+ delete(f, "Interval")
+ delete(f, "QueryCondition")
+ delete(f, "Limit")
+ delete(f, "Offset")
+ delete(f, "Area")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeBotManagedRulesRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeBotClientIpListRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeBotManagedRulesResponseParams struct {
- // 本次返回的规则数
- Count *int64 `json:"Count,omitempty" name:"Count"`
-
- // Bot规则
- Rules []*BotManagedRuleDetail `json:"Rules,omitempty" name:"Rules"`
+type DescribeBotClientIpListResponseParams struct {
+ // 客户端Ip相关数据列表。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Data []*SecClientIp `json:"Data,omitempty" name:"Data"`
- // 总规则数
- Total *int64 `json:"Total,omitempty" name:"Total"`
+ // 查询结果的总条数。
+ TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeBotManagedRulesResponse struct {
+type DescribeBotClientIpListResponse struct {
*tchttp.BaseResponse
- Response *DescribeBotManagedRulesResponseParams `json:"Response"`
+ Response *DescribeBotClientIpListResponseParams `json:"Response"`
}
-func (r *DescribeBotManagedRulesResponse) ToJsonString() string {
+func (r *DescribeBotClientIpListResponse) 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 *DescribeBotManagedRulesResponse) FromJsonString(s string) error {
+func (r *DescribeBotClientIpListResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeCnameStatusRequestParams struct {
- // 站点 ID
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+type DescribeBotDataRequestParams struct {
+ // 开始时间。
+ StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
+
+ // 结束时间。
+ EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
+
+ // 统计指标列表,取值有:
+ // bot_interceptNum :bot拦截次数 ;
+ // bot_noneRequestNum :未分类bot请求次数 ;
+ // bot_maliciousRequestNum:恶意bot请求次数 ;
+ // bot_suspectedRequestNum :疑似bot请求次数 ;
+ // bot_friendlyRequestNum :友好bot请求次数 ;
+ // bot_normalRequestNum :正常bot请求次数 。
+ MetricNames []*string `json:"MetricNames,omitempty" name:"MetricNames"`
+
+ // 查询的子域名列表,不填默认选择全部子域名。
+ Domains []*string `json:"Domains,omitempty" name:"Domains"`
+
+ // 站点列表,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+
+ // 查询时间粒度,取值有:
+ // min:1分钟;
+ // 5min:5分钟;
+ // hour:1小时;
+ // day:1天。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
- // 域名列表
- Names []*string `json:"Names,omitempty" name:"Names"`
+ // 筛选条件,key可选的值有:
+ // action:执行动作 。
+ QueryCondition []*QueryCondition `json:"QueryCondition,omitempty" name:"QueryCondition"`
+
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。 不填将根据用户所在地智能选择地区。
+ Area *string `json:"Area,omitempty" name:"Area"`
}
-type DescribeCnameStatusRequest struct {
+type DescribeBotDataRequest struct {
*tchttp.BaseRequest
- // 站点 ID
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+ // 开始时间。
+ StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
+
+ // 结束时间。
+ EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
+
+ // 统计指标列表,取值有:
+ // bot_interceptNum :bot拦截次数 ;
+ // bot_noneRequestNum :未分类bot请求次数 ;
+ // bot_maliciousRequestNum:恶意bot请求次数 ;
+ // bot_suspectedRequestNum :疑似bot请求次数 ;
+ // bot_friendlyRequestNum :友好bot请求次数 ;
+ // bot_normalRequestNum :正常bot请求次数 。
+ MetricNames []*string `json:"MetricNames,omitempty" name:"MetricNames"`
+
+ // 查询的子域名列表,不填默认选择全部子域名。
+ Domains []*string `json:"Domains,omitempty" name:"Domains"`
+
+ // 站点列表,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+
+ // 查询时间粒度,取值有:
+ // min:1分钟;
+ // 5min:5分钟;
+ // hour:1小时;
+ // day:1天。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
- // 域名列表
- Names []*string `json:"Names,omitempty" name:"Names"`
+ // 筛选条件,key可选的值有:
+ // action:执行动作 。
+ QueryCondition []*QueryCondition `json:"QueryCondition,omitempty" name:"QueryCondition"`
+
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。 不填将根据用户所在地智能选择地区。
+ Area *string `json:"Area,omitempty" name:"Area"`
}
-func (r *DescribeCnameStatusRequest) ToJsonString() string {
+func (r *DescribeBotDataRequest) 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 *DescribeCnameStatusRequest) FromJsonString(s string) error {
+func (r *DescribeBotDataRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "ZoneId")
- delete(f, "Names")
+ delete(f, "StartTime")
+ delete(f, "EndTime")
+ delete(f, "MetricNames")
+ delete(f, "Domains")
+ delete(f, "ZoneIds")
+ delete(f, "Interval")
+ delete(f, "QueryCondition")
+ delete(f, "Area")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeCnameStatusRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeBotDataRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeCnameStatusResponseParams struct {
- // 状态列表
- Status []*CnameStatus `json:"Status,omitempty" name:"Status"`
+type DescribeBotDataResponseParams struct {
+ // Bot攻击的数据列表。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Data []*SecEntry `json:"Data,omitempty" name:"Data"`
+
+ // 查询结果的总条数。
+ TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeCnameStatusResponse struct {
+type DescribeBotDataResponse struct {
*tchttp.BaseResponse
- Response *DescribeCnameStatusResponseParams `json:"Response"`
+ Response *DescribeBotDataResponseParams `json:"Response"`
}
-func (r *DescribeCnameStatusResponse) ToJsonString() string {
+func (r *DescribeBotDataResponse) 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 *DescribeCnameStatusResponse) FromJsonString(s string) error {
+func (r *DescribeBotDataResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeDDoSPolicyRequestParams struct {
- // 策略组id
- PolicyId *int64 `json:"PolicyId,omitempty" name:"PolicyId"`
-
- // 一级域名zone
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
-}
+type DescribeBotHitRuleDetailRequestParams struct {
+ // 开始时间。
+ StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
-type DescribeDDoSPolicyRequest struct {
- *tchttp.BaseRequest
-
- // 策略组id
- PolicyId *int64 `json:"PolicyId,omitempty" name:"PolicyId"`
+ // 结束时间。
+ EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 一级域名zone
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
-}
+ // 站点集合,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
-func (r *DescribeDDoSPolicyRequest) ToJsonString() string {
- b, _ := json.Marshal(r)
- return string(b)
-}
+ // 子域名列表,不填默认选择全部子域名。
+ Domains []*string `json:"Domains,omitempty" name:"Domains"`
+
+ // 查询时间粒度,取值有:
+ // min:1分钟;
+ // 5min:5分钟;
+ // hour:1小时;
+ // day:1天。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
+
+ // 筛选条件,key可选的值有:
+ // action: 执行动作。
+ QueryCondition []*QueryCondition `json:"QueryCondition,omitempty" name:"QueryCondition"`
+
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
+
+ // 分页的偏移量,默认值为0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
+ Area *string `json:"Area,omitempty" name:"Area"`
+}
+
+type DescribeBotHitRuleDetailRequest struct {
+ *tchttp.BaseRequest
+
+ // 开始时间。
+ StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
+
+ // 结束时间。
+ EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
+
+ // 站点集合,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+
+ // 子域名列表,不填默认选择全部子域名。
+ Domains []*string `json:"Domains,omitempty" name:"Domains"`
+
+ // 查询时间粒度,取值有:
+ // min:1分钟;
+ // 5min:5分钟;
+ // hour:1小时;
+ // day:1天。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
+
+ // 筛选条件,key可选的值有:
+ // action: 执行动作。
+ QueryCondition []*QueryCondition `json:"QueryCondition,omitempty" name:"QueryCondition"`
+
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
+
+ // 分页的偏移量,默认值为0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
+ Area *string `json:"Area,omitempty" name:"Area"`
+}
+
+func (r *DescribeBotHitRuleDetailRequest) 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 *DescribeDDoSPolicyRequest) FromJsonString(s string) error {
+func (r *DescribeBotHitRuleDetailRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "PolicyId")
- delete(f, "ZoneId")
+ delete(f, "StartTime")
+ delete(f, "EndTime")
+ delete(f, "ZoneIds")
+ delete(f, "Domains")
+ delete(f, "Interval")
+ delete(f, "QueryCondition")
+ delete(f, "Limit")
+ delete(f, "Offset")
+ delete(f, "Area")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDDoSPolicyRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeBotHitRuleDetailRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeDDoSPolicyResponseParams struct {
- // DDoS防护配置
- DdosRule *DdosRule `json:"DdosRule,omitempty" name:"DdosRule"`
+type DescribeBotHitRuleDetailResponseParams struct {
+ // 命中规则列表。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Data []*SecHitRuleInfo `json:"Data,omitempty" name:"Data"`
+
+ // 查询结果的总条数。
+ TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeDDoSPolicyResponse struct {
+type DescribeBotHitRuleDetailResponse struct {
*tchttp.BaseResponse
- Response *DescribeDDoSPolicyResponseParams `json:"Response"`
+ Response *DescribeBotHitRuleDetailResponseParams `json:"Response"`
}
-func (r *DescribeDDoSPolicyResponse) ToJsonString() string {
+func (r *DescribeBotHitRuleDetailResponse) 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 *DescribeDDoSPolicyResponse) FromJsonString(s string) error {
+func (r *DescribeBotHitRuleDetailResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeDDosAttackDataRequestParams struct {
- // 开始时间。
+type DescribeBotLogRequestParams struct {
+ // 开始时间
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
// 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 统计指标列表,取值有:
- // ddos_attackMaxBandwidth :攻击带宽峰值 ;
- // ddos_attackMaxPackageRate:攻击包速率峰值 ;
- // ddos_attackBandwidth :攻击带宽曲线 ;
- // ddos_attackPackageRate :攻击包速率曲线 。
- MetricNames []*string `json:"MetricNames,omitempty" name:"MetricNames"`
-
- // 站点id列表,不填默认选择全部站点。
+ // 查询的站点集合,不填默认查询所有站点。
ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // ddos策略组id列表,不填默认选择全部策略id。
- PolicyIds []*int64 `json:"PolicyIds,omitempty" name:"PolicyIds"`
-
- // 端口号。
- Port *int64 `json:"Port,omitempty" name:"Port"`
+ // 查询的域名集合,不填默认查询所有子域名。
+ Domains []*string `json:"Domains,omitempty" name:"Domains"`
- // 协议类型,取值有:
- // tcp ;
- // udp ;
- // all 。
- ProtocolType *string `json:"ProtocolType,omitempty" name:"ProtocolType"`
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
- // 攻击类型,取值有:
- // flood ;
- // icmpFlood ;
- // all 。
- AttackType *string `json:"AttackType,omitempty" name:"AttackType"`
+ // 分页的偏移量,默认值为0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
- // 查询时间粒度,取值有:
- // min :1分钟 ;
- // 5min :5分钟 ;
- // hour :1小时 ;
- // day :1天 。
- Interval *string `json:"Interval,omitempty" name:"Interval"`
+ // 筛选条件,当前key的可选条件有:
+ // action:执行动作(处置方式);
+ // sipCountryCode:ip所在国家;
+ // attackIp:攻击ip;
+ // ruleId:规则id;
+ // eventId:事件id;
+ // ua:用户代理;
+ // requestMethod:请求方法;
+ // uri:统一资源标识符 。
+ QueryCondition []*QueryCondition `json:"QueryCondition,omitempty" name:"QueryCondition"`
// 数据归属地区,取值有:
- // overseas :全球(除中国大陆地区)数据 ;
- // mainland :中国大陆地区数据 。不填默认查询overseas。
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
Area *string `json:"Area,omitempty" name:"Area"`
}
-type DescribeDDosAttackDataRequest struct {
+type DescribeBotLogRequest struct {
*tchttp.BaseRequest
- // 开始时间。
+ // 开始时间
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
// 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 统计指标列表,取值有:
- // ddos_attackMaxBandwidth :攻击带宽峰值 ;
- // ddos_attackMaxPackageRate:攻击包速率峰值 ;
- // ddos_attackBandwidth :攻击带宽曲线 ;
- // ddos_attackPackageRate :攻击包速率曲线 。
- MetricNames []*string `json:"MetricNames,omitempty" name:"MetricNames"`
-
- // 站点id列表,不填默认选择全部站点。
+ // 查询的站点集合,不填默认查询所有站点。
ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // ddos策略组id列表,不填默认选择全部策略id。
- PolicyIds []*int64 `json:"PolicyIds,omitempty" name:"PolicyIds"`
-
- // 端口号。
- Port *int64 `json:"Port,omitempty" name:"Port"`
+ // 查询的域名集合,不填默认查询所有子域名。
+ Domains []*string `json:"Domains,omitempty" name:"Domains"`
- // 协议类型,取值有:
- // tcp ;
- // udp ;
- // all 。
- ProtocolType *string `json:"ProtocolType,omitempty" name:"ProtocolType"`
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
- // 攻击类型,取值有:
- // flood ;
- // icmpFlood ;
- // all 。
- AttackType *string `json:"AttackType,omitempty" name:"AttackType"`
+ // 分页的偏移量,默认值为0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
- // 查询时间粒度,取值有:
- // min :1分钟 ;
- // 5min :5分钟 ;
- // hour :1小时 ;
- // day :1天 。
- Interval *string `json:"Interval,omitempty" name:"Interval"`
+ // 筛选条件,当前key的可选条件有:
+ // action:执行动作(处置方式);
+ // sipCountryCode:ip所在国家;
+ // attackIp:攻击ip;
+ // ruleId:规则id;
+ // eventId:事件id;
+ // ua:用户代理;
+ // requestMethod:请求方法;
+ // uri:统一资源标识符 。
+ QueryCondition []*QueryCondition `json:"QueryCondition,omitempty" name:"QueryCondition"`
// 数据归属地区,取值有:
- // overseas :全球(除中国大陆地区)数据 ;
- // mainland :中国大陆地区数据 。不填默认查询overseas。
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
Area *string `json:"Area,omitempty" name:"Area"`
}
-func (r *DescribeDDosAttackDataRequest) ToJsonString() string {
+func (r *DescribeBotLogRequest) 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 *DescribeDDosAttackDataRequest) FromJsonString(s string) error {
+func (r *DescribeBotLogRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
delete(f, "StartTime")
delete(f, "EndTime")
- delete(f, "MetricNames")
delete(f, "ZoneIds")
- delete(f, "PolicyIds")
- delete(f, "Port")
- delete(f, "ProtocolType")
- delete(f, "AttackType")
- delete(f, "Interval")
+ delete(f, "Domains")
+ delete(f, "Limit")
+ delete(f, "Offset")
+ delete(f, "QueryCondition")
delete(f, "Area")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDDosAttackDataRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeBotLogRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeDDosAttackDataResponseParams struct {
- // DDos攻击数据内容。
+type DescribeBotLogResponseParams struct {
+ // Bot攻击数据信息列表。
// 注意:此字段可能返回 null,表示取不到有效值。
- Data []*SecEntry `json:"Data,omitempty" name:"Data"`
-
- // 请求响应状态,取值有:
- // 1 :失败 ;
- // 0 :成功 。
- Status *int64 `json:"Status,omitempty" name:"Status"`
-
- // 请求响应信息。
- Msg *string `json:"Msg,omitempty" name:"Msg"`
+ Data []*BotLog `json:"Data,omitempty" name:"Data"`
- // 查询时间粒度,取值有:
- // min :1分钟 ;
- // 5min :5分钟 ;
- // hour :1小时 ;
- // day :1天 。
- Interval *string `json:"Interval,omitempty" name:"Interval"`
+ // 查询结果的总条数。
+ TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeDDosAttackDataResponse struct {
+type DescribeBotLogResponse struct {
*tchttp.BaseResponse
- Response *DescribeDDosAttackDataResponseParams `json:"Response"`
+ Response *DescribeBotLogResponseParams `json:"Response"`
}
-func (r *DescribeDDosAttackDataResponse) ToJsonString() string {
+func (r *DescribeBotLogResponse) 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 *DescribeDDosAttackDataResponse) FromJsonString(s string) error {
+func (r *DescribeBotLogResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeDDosAttackEventDetailRequestParams struct {
- // 事件id。
- EventId *string `json:"EventId,omitempty" name:"EventId"`
+type DescribeBotManagedRulesRequestParams struct {
+ // 站点Id。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 数据归属地区,取值有:
- // overseas :全球(除中国大陆地区)数据 ;
- // mainland :中国大陆地区数据 。不填默认查询overseas。
- Area *string `json:"Area,omitempty" name:"Area"`
+ // 子域名。
+ Entity *string `json:"Entity,omitempty" name:"Entity"`
+
+ // 分页查询偏移量。默认值:0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+
+ // 分页查询限制数目。默认值:20,最大值:1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
+
+ // 规则类型,取值有:
+ // idcid;
+ // sipbot;
+ // uabot。传空或不传,即全部类型。
+ RuleType *string `json:"RuleType,omitempty" name:"RuleType"`
}
-type DescribeDDosAttackEventDetailRequest struct {
+type DescribeBotManagedRulesRequest struct {
*tchttp.BaseRequest
- // 事件id。
- EventId *string `json:"EventId,omitempty" name:"EventId"`
+ // 站点Id。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 数据归属地区,取值有:
- // overseas :全球(除中国大陆地区)数据 ;
- // mainland :中国大陆地区数据 。不填默认查询overseas。
- Area *string `json:"Area,omitempty" name:"Area"`
+ // 子域名。
+ Entity *string `json:"Entity,omitempty" name:"Entity"`
+
+ // 分页查询偏移量。默认值:0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+
+ // 分页查询限制数目。默认值:20,最大值:1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
+
+ // 规则类型,取值有:
+ // idcid;
+ // sipbot;
+ // uabot。传空或不传,即全部类型。
+ RuleType *string `json:"RuleType,omitempty" name:"RuleType"`
}
-func (r *DescribeDDosAttackEventDetailRequest) ToJsonString() string {
+func (r *DescribeBotManagedRulesRequest) 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 *DescribeDDosAttackEventDetailRequest) FromJsonString(s string) error {
+func (r *DescribeBotManagedRulesRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "EventId")
- delete(f, "Area")
+ delete(f, "ZoneId")
+ delete(f, "Entity")
+ delete(f, "Offset")
+ delete(f, "Limit")
+ delete(f, "RuleType")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDDosAttackEventDetailRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeBotManagedRulesRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeDDosAttackEventDetailResponseParams struct {
- // DDos攻击事件详情。
- Data *DDosAttackEventDetailData `json:"Data,omitempty" name:"Data"`
+type DescribeBotManagedRulesResponseParams struct {
+ // 本次返回的规则数。
+ Count *int64 `json:"Count,omitempty" name:"Count"`
- // 请求响应状态,取值有:
- // 1 :失败 ;
- // 0 :成功 。
- Status *int64 `json:"Status,omitempty" name:"Status"`
+ // Bot规则。
+ BotManagedRuleDetails []*BotManagedRuleDetail `json:"BotManagedRuleDetails,omitempty" name:"BotManagedRuleDetails"`
- // 请求响应信息。
- Msg *string `json:"Msg,omitempty" name:"Msg"`
+ // 总规则数。
+ Total *int64 `json:"Total,omitempty" name:"Total"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeDDosAttackEventDetailResponse struct {
+type DescribeBotManagedRulesResponse struct {
*tchttp.BaseResponse
- Response *DescribeDDosAttackEventDetailResponseParams `json:"Response"`
+ Response *DescribeBotManagedRulesResponseParams `json:"Response"`
}
-func (r *DescribeDDosAttackEventDetailResponse) ToJsonString() string {
+func (r *DescribeBotManagedRulesResponse) 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 *DescribeDDosAttackEventDetailResponse) FromJsonString(s string) error {
+func (r *DescribeBotManagedRulesResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeDDosAttackEventRequestParams struct {
+type DescribeBotTopDataRequestParams struct {
// 开始时间。
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
// 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 分页拉取的最大返回结果数。最大值:1000。
- PageSize *int64 `json:"PageSize,omitempty" name:"PageSize"`
+ // 统计指标列表,取值有:
+ // bot_requestNum_labelType:请求次数标签类型分布排行;
+ // bot_requestNum_url:请求次数url分布排行;
+ // bot_cipRequestNum_region:请求次数区域客户端ip分布排行。
+ MetricName *string `json:"MetricName,omitempty" name:"MetricName"`
- // 分页拉取的起始页号。最小值:1。
- PageNo *int64 `json:"PageNo,omitempty" name:"PageNo"`
+ // 站点集合,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // ddos策略组id列表,不填默认选择全部策略Id。
- PolicyIds []*int64 `json:"PolicyIds,omitempty" name:"PolicyIds"`
+ // 域名集合,不填默认选择全部子域名。
+ Domains []*string `json:"Domains,omitempty" name:"Domains"`
- // 站点id列表,不填默认选择全部站点。
- ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+ // 查询前多少个数据,最多值为1000,不填默认默认为:10, 表示查询前top 10的数据。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
- // 协议类型,取值有:
- // tcp ;
- // udp ;
- // all 。
- ProtocolType *string `json:"ProtocolType,omitempty" name:"ProtocolType"`
+ // 查询时间粒度,取值有:
+ // min:1分钟;
+ // 5min:5分钟;
+ // hour:1小时;
+ // day:1天。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
- // 是否展示详情,取值有:
- // Y :展示 ;
- // N :不展示 。默认为Y。
- IsShowDetail *string `json:"IsShowDetail,omitempty" name:"IsShowDetail"`
+ // 筛选条件,key可选的值有:
+ // action:执行动作 。
+ QueryCondition []*QueryCondition `json:"QueryCondition,omitempty" name:"QueryCondition"`
// 数据归属地区,取值有:
- // overseas :全球(除中国大陆地区)数据 ;
- // mainland :中国大陆地区数据 。不填默认查询overseas。
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
Area *string `json:"Area,omitempty" name:"Area"`
}
-type DescribeDDosAttackEventRequest struct {
+type DescribeBotTopDataRequest struct {
*tchttp.BaseRequest
// 开始时间。
@@ -3883,408 +4343,324 @@ type DescribeDDosAttackEventRequest struct {
// 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 分页拉取的最大返回结果数。最大值:1000。
- PageSize *int64 `json:"PageSize,omitempty" name:"PageSize"`
+ // 统计指标列表,取值有:
+ // bot_requestNum_labelType:请求次数标签类型分布排行;
+ // bot_requestNum_url:请求次数url分布排行;
+ // bot_cipRequestNum_region:请求次数区域客户端ip分布排行。
+ MetricName *string `json:"MetricName,omitempty" name:"MetricName"`
- // 分页拉取的起始页号。最小值:1。
- PageNo *int64 `json:"PageNo,omitempty" name:"PageNo"`
+ // 站点集合,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // ddos策略组id列表,不填默认选择全部策略Id。
- PolicyIds []*int64 `json:"PolicyIds,omitempty" name:"PolicyIds"`
+ // 域名集合,不填默认选择全部子域名。
+ Domains []*string `json:"Domains,omitempty" name:"Domains"`
- // 站点id列表,不填默认选择全部站点。
- ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+ // 查询前多少个数据,最多值为1000,不填默认默认为:10, 表示查询前top 10的数据。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
- // 协议类型,取值有:
- // tcp ;
- // udp ;
- // all 。
- ProtocolType *string `json:"ProtocolType,omitempty" name:"ProtocolType"`
+ // 查询时间粒度,取值有:
+ // min:1分钟;
+ // 5min:5分钟;
+ // hour:1小时;
+ // day:1天。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
- // 是否展示详情,取值有:
- // Y :展示 ;
- // N :不展示 。默认为Y。
- IsShowDetail *string `json:"IsShowDetail,omitempty" name:"IsShowDetail"`
+ // 筛选条件,key可选的值有:
+ // action:执行动作 。
+ QueryCondition []*QueryCondition `json:"QueryCondition,omitempty" name:"QueryCondition"`
// 数据归属地区,取值有:
- // overseas :全球(除中国大陆地区)数据 ;
- // mainland :中国大陆地区数据 。不填默认查询overseas。
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
Area *string `json:"Area,omitempty" name:"Area"`
}
-func (r *DescribeDDosAttackEventRequest) ToJsonString() string {
+func (r *DescribeBotTopDataRequest) 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 *DescribeDDosAttackEventRequest) FromJsonString(s string) error {
+func (r *DescribeBotTopDataRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
delete(f, "StartTime")
delete(f, "EndTime")
- delete(f, "PageSize")
- delete(f, "PageNo")
- delete(f, "PolicyIds")
+ delete(f, "MetricName")
delete(f, "ZoneIds")
- delete(f, "ProtocolType")
- delete(f, "IsShowDetail")
+ delete(f, "Domains")
+ delete(f, "Limit")
+ delete(f, "Interval")
+ delete(f, "QueryCondition")
delete(f, "Area")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDDosAttackEventRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeBotTopDataRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeDDosAttackEventResponseParams struct {
- // DDos攻击事件数据。
- Data *DDosAttackEventData `json:"Data,omitempty" name:"Data"`
-
- // 请求响应状态,取值有:
- // 1 :失败 ;
- // 0 :成功 。
- Status *int64 `json:"Status,omitempty" name:"Status"`
+type DescribeBotTopDataResponseParams struct {
+ // Bot攻击TopN数据列表。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Data []*TopEntry `json:"Data,omitempty" name:"Data"`
- // 请求响应信息。
- Msg *string `json:"Msg,omitempty" name:"Msg"`
+ // 查询结果的总条数。
+ TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeDDosAttackEventResponse struct {
+type DescribeBotTopDataResponse struct {
*tchttp.BaseResponse
- Response *DescribeDDosAttackEventResponseParams `json:"Response"`
+ Response *DescribeBotTopDataResponseParams `json:"Response"`
}
-func (r *DescribeDDosAttackEventResponse) ToJsonString() string {
+func (r *DescribeBotTopDataResponse) 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 *DescribeDDosAttackEventResponse) FromJsonString(s string) error {
+func (r *DescribeBotTopDataResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeDDosAttackSourceEventRequestParams struct {
- // 开始时间。
- StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
+type DescribeClientRuleListRequestParams struct {
+ // 查询的站点ID.
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 结束时间。
- EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
+ // 查询的子域名。
+ Domain *string `json:"Domain,omitempty" name:"Domain"`
- // 分页拉取的最大返回结果数。最大值:1000。
- PageSize *int64 `json:"PageSize,omitempty" name:"PageSize"`
+ // 规则类型,取值有:
+ // acl:自定义规则;
+ // rate:限速规则。不填表示查询所有规则。
+ RuleType *string `json:"RuleType,omitempty" name:"RuleType"`
- // 分页拉取的起始页号。最小值:1。
- PageNo *int64 `json:"PageNo,omitempty" name:"PageNo"`
+ // 规则ID。
+ RuleId *int64 `json:"RuleId,omitempty" name:"RuleId"`
- // ddos策略组id 集合,不填默认选择全部策略id。
- PolicyIds []*int64 `json:"PolicyIds,omitempty" name:"PolicyIds"`
+ // 客户端IP。
+ SourceClientIp *string `json:"SourceClientIp,omitempty" name:"SourceClientIp"`
- // 站点集合,不填默认选择全部站点。
- ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
- // 协议类型,取值有:
- // tcp ;
- // udp ;
- // all 。
- ProtocolType *string `json:"ProtocolType,omitempty" name:"ProtocolType"`
+ // 分页的偏移量,默认值为0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
// 数据归属地区,取值有:
- // overseas :全球(除中国大陆地区)数据 ;
- // mainland :中国大陆地区数据 。不填默认查询overseas。
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
Area *string `json:"Area,omitempty" name:"Area"`
}
-type DescribeDDosAttackSourceEventRequest struct {
+type DescribeClientRuleListRequest struct {
*tchttp.BaseRequest
- // 开始时间。
- StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
+ // 查询的站点ID.
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 结束时间。
- EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
+ // 查询的子域名。
+ Domain *string `json:"Domain,omitempty" name:"Domain"`
- // 分页拉取的最大返回结果数。最大值:1000。
- PageSize *int64 `json:"PageSize,omitempty" name:"PageSize"`
+ // 规则类型,取值有:
+ // acl:自定义规则;
+ // rate:限速规则。不填表示查询所有规则。
+ RuleType *string `json:"RuleType,omitempty" name:"RuleType"`
- // 分页拉取的起始页号。最小值:1。
- PageNo *int64 `json:"PageNo,omitempty" name:"PageNo"`
+ // 规则ID。
+ RuleId *int64 `json:"RuleId,omitempty" name:"RuleId"`
- // ddos策略组id 集合,不填默认选择全部策略id。
- PolicyIds []*int64 `json:"PolicyIds,omitempty" name:"PolicyIds"`
+ // 客户端IP。
+ SourceClientIp *string `json:"SourceClientIp,omitempty" name:"SourceClientIp"`
- // 站点集合,不填默认选择全部站点。
- ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
- // 协议类型,取值有:
- // tcp ;
- // udp ;
- // all 。
- ProtocolType *string `json:"ProtocolType,omitempty" name:"ProtocolType"`
+ // 分页的偏移量,默认值为0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
// 数据归属地区,取值有:
- // overseas :全球(除中国大陆地区)数据 ;
- // mainland :中国大陆地区数据 。不填默认查询overseas。
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
Area *string `json:"Area,omitempty" name:"Area"`
}
-func (r *DescribeDDosAttackSourceEventRequest) ToJsonString() string {
+func (r *DescribeClientRuleListRequest) 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 *DescribeDDosAttackSourceEventRequest) FromJsonString(s string) error {
+func (r *DescribeClientRuleListRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "StartTime")
- delete(f, "EndTime")
- delete(f, "PageSize")
- delete(f, "PageNo")
- delete(f, "PolicyIds")
- delete(f, "ZoneIds")
- delete(f, "ProtocolType")
+ delete(f, "ZoneId")
+ delete(f, "Domain")
+ delete(f, "RuleType")
+ delete(f, "RuleId")
+ delete(f, "SourceClientIp")
+ delete(f, "Limit")
+ delete(f, "Offset")
delete(f, "Area")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDDosAttackSourceEventRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClientRuleListRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeDDosAttackSourceEventResponseParams struct {
- // DDos攻击源数据。
- Data *DDosAttackSourceEventData `json:"Data,omitempty" name:"Data"`
-
- // 请求响应状态,取值有:
- // 1 :失败 ;
- // 0 :成功 。
- Status *int64 `json:"Status,omitempty" name:"Status"`
+type DescribeClientRuleListResponseParams struct {
+ // 封禁客户端数据列表。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Data []*ClientRule `json:"Data,omitempty" name:"Data"`
- // 请求响应信息。
- Msg *string `json:"Msg,omitempty" name:"Msg"`
+ // 查询结果的总条数。
+ TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeDDosAttackSourceEventResponse struct {
+type DescribeClientRuleListResponse struct {
*tchttp.BaseResponse
- Response *DescribeDDosAttackSourceEventResponseParams `json:"Response"`
+ Response *DescribeClientRuleListResponseParams `json:"Response"`
}
-func (r *DescribeDDosAttackSourceEventResponse) ToJsonString() string {
+func (r *DescribeClientRuleListResponse) 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 *DescribeDDosAttackSourceEventResponse) FromJsonString(s string) error {
+func (r *DescribeClientRuleListResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeDDosAttackTopDataRequestParams struct {
- // 开始时间。
- StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
-
- // 结束时间。
- EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
-
- // 统计指标列表,取值有:
- // ddos_attackFlux_protocol :攻击总流量协议类型分布排行 ;
- // ddos_attackPackageNum_protocol :攻击总包量协议类型分布排行 ;
- // ddos_attackNum_attackType :攻击总次数攻击类型分布排行 ;
- // ddos_attackNum_sregion :攻击总次数攻击源地区分布排行 ;
- // ddos_attackFlux_sip :攻击总流量攻击源ip分布排行 ;
- // ddos_attackFlux_sregion :攻击总流量攻击源地区分布排行 。
- MetricName *string `json:"MetricName,omitempty" name:"MetricName"`
-
- // 查询前多少个,传值为0返回全量。
- Limit *int64 `json:"Limit,omitempty" name:"Limit"`
-
- // 站点id集合,不填默认选择全部站点。
- ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
-
- // ddos策略组id 集合,不填默认选择全部策略id。
- PolicyIds []*int64 `json:"PolicyIds,omitempty" name:"PolicyIds"`
-
- // 端口号。
- Port *int64 `json:"Port,omitempty" name:"Port"`
-
- // 协议类型,取值有:
- // tcp ;
- // udp ;
- // all 。
- ProtocolType *string `json:"ProtocolType,omitempty" name:"ProtocolType"`
-
- // 攻击类型,取值有:
- // flood ;
- // icmpFlood ;
- // all 。
- AttackType *string `json:"AttackType,omitempty" name:"AttackType"`
-
- // 数据归属地区,取值有:
- // overseas :全球(除中国大陆地区)数据 ;
- // mainland :中国大陆地区数据 。不填默认查询overseas。
- Area *string `json:"Area,omitempty" name:"Area"`
+type DescribeContentQuotaRequestParams struct {
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
}
-type DescribeDDosAttackTopDataRequest struct {
+type DescribeContentQuotaRequest struct {
*tchttp.BaseRequest
- // 开始时间。
- StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
-
- // 结束时间。
- EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
-
- // 统计指标列表,取值有:
- // ddos_attackFlux_protocol :攻击总流量协议类型分布排行 ;
- // ddos_attackPackageNum_protocol :攻击总包量协议类型分布排行 ;
- // ddos_attackNum_attackType :攻击总次数攻击类型分布排行 ;
- // ddos_attackNum_sregion :攻击总次数攻击源地区分布排行 ;
- // ddos_attackFlux_sip :攻击总流量攻击源ip分布排行 ;
- // ddos_attackFlux_sregion :攻击总流量攻击源地区分布排行 。
- MetricName *string `json:"MetricName,omitempty" name:"MetricName"`
-
- // 查询前多少个,传值为0返回全量。
- Limit *int64 `json:"Limit,omitempty" name:"Limit"`
-
- // 站点id集合,不填默认选择全部站点。
- ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
-
- // ddos策略组id 集合,不填默认选择全部策略id。
- PolicyIds []*int64 `json:"PolicyIds,omitempty" name:"PolicyIds"`
-
- // 端口号。
- Port *int64 `json:"Port,omitempty" name:"Port"`
-
- // 协议类型,取值有:
- // tcp ;
- // udp ;
- // all 。
- ProtocolType *string `json:"ProtocolType,omitempty" name:"ProtocolType"`
-
- // 攻击类型,取值有:
- // flood ;
- // icmpFlood ;
- // all 。
- AttackType *string `json:"AttackType,omitempty" name:"AttackType"`
-
- // 数据归属地区,取值有:
- // overseas :全球(除中国大陆地区)数据 ;
- // mainland :中国大陆地区数据 。不填默认查询overseas。
- Area *string `json:"Area,omitempty" name:"Area"`
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
}
-func (r *DescribeDDosAttackTopDataRequest) ToJsonString() string {
+func (r *DescribeContentQuotaRequest) 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 *DescribeDDosAttackTopDataRequest) FromJsonString(s string) error {
+func (r *DescribeContentQuotaRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "StartTime")
- delete(f, "EndTime")
- delete(f, "MetricName")
- delete(f, "Limit")
- delete(f, "ZoneIds")
- delete(f, "PolicyIds")
- delete(f, "Port")
- delete(f, "ProtocolType")
- delete(f, "AttackType")
- delete(f, "Area")
+ delete(f, "ZoneId")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDDosAttackTopDataRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeContentQuotaRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeDDosAttackTopDataResponseParams struct {
- // top数据内容
- Data []*TopNEntry `json:"Data,omitempty" name:"Data"`
-
- // 请求响应状态,取值有:
- // 1 :失败 ;
- // 0 :成功 。
- Status *int64 `json:"Status,omitempty" name:"Status"`
+type DescribeContentQuotaResponseParams struct {
+ // 刷新相关配额。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ PurgeQuota []*Quota `json:"PurgeQuota,omitempty" name:"PurgeQuota"`
- // 请求响应消息。
- Msg *string `json:"Msg,omitempty" name:"Msg"`
+ // 预热相关配额。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ PrefetchQuota []*Quota `json:"PrefetchQuota,omitempty" name:"PrefetchQuota"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeDDosAttackTopDataResponse struct {
+type DescribeContentQuotaResponse struct {
*tchttp.BaseResponse
- Response *DescribeDDosAttackTopDataResponseParams `json:"Response"`
+ Response *DescribeContentQuotaResponseParams `json:"Response"`
}
-func (r *DescribeDDosAttackTopDataResponse) ToJsonString() string {
+func (r *DescribeContentQuotaResponse) 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 *DescribeDDosAttackTopDataResponse) FromJsonString(s string) error {
+func (r *DescribeContentQuotaResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeDDosMajorAttackEventRequestParams struct {
+type DescribeDDoSAttackDataRequestParams struct {
// 开始时间。
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
// 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 分页拉取的最大返回结果数。最大值:1000。
- PageSize *int64 `json:"PageSize,omitempty" name:"PageSize"`
+ // 统计指标列表,取值有:
+ // ddos_attackMaxBandwidth:攻击带宽峰值;
+ // ddos_attackMaxPackageRate:攻击包速率峰值 ;
+ // ddos_attackBandwidth:攻击带宽曲线;
+ // ddos_attackPackageRate:攻击包速率曲线。
+ MetricNames []*string `json:"MetricNames,omitempty" name:"MetricNames"`
+
+ // 端口号。
+ Port *int64 `json:"Port,omitempty" name:"Port"`
+
+ // 攻击类型,取值有:
+ // flood:泛洪攻击;
+ // icmpFlood:icmp泛洪攻击;
+ // all:全部攻击类型。不填默认为all,表示查询全部攻击类型。
+ AttackType *string `json:"AttackType,omitempty" name:"AttackType"`
- // 分页拉取的起始页号。最小值:1。
- PageNo *int64 `json:"PageNo,omitempty" name:"PageNo"`
+ // 站点集合,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // ddos 策略组id集合,不填默认选择全部策略id。
+ // DDOS策略组id列表,不填默认选择全部策略id。
PolicyIds []*int64 `json:"PolicyIds,omitempty" name:"PolicyIds"`
// 协议类型,取值有:
- // tcp ;
- // udp ;
- // all 。
+ // tcp:tcp协议;
+ // udp:udp协议;
+ // all:全部协议。不填默认为all,表示获取全部协议类型。
ProtocolType *string `json:"ProtocolType,omitempty" name:"ProtocolType"`
- // 站点id列表,不填默认选择全部站点。
- ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+ // 查询时间粒度,取值有:
+ // min:1分钟;
+ // 5min:5分钟;
+ // hour:1小时;
+ // day:1天。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
// 数据归属地区,取值有:
- // overseas :全球(除中国大陆地区)数据 ;
- // mainland :中国大陆地区数据 。不填默认查询overseas。
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
Area *string `json:"Area,omitempty" name:"Area"`
}
-type DescribeDDosMajorAttackEventRequest struct {
+type DescribeDDoSAttackDataRequest struct {
*tchttp.BaseRequest
// 开始时间。
@@ -4293,2006 +4669,3173 @@ type DescribeDDosMajorAttackEventRequest struct {
// 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 分页拉取的最大返回结果数。最大值:1000。
- PageSize *int64 `json:"PageSize,omitempty" name:"PageSize"`
+ // 统计指标列表,取值有:
+ // ddos_attackMaxBandwidth:攻击带宽峰值;
+ // ddos_attackMaxPackageRate:攻击包速率峰值 ;
+ // ddos_attackBandwidth:攻击带宽曲线;
+ // ddos_attackPackageRate:攻击包速率曲线。
+ MetricNames []*string `json:"MetricNames,omitempty" name:"MetricNames"`
+
+ // 端口号。
+ Port *int64 `json:"Port,omitempty" name:"Port"`
+
+ // 攻击类型,取值有:
+ // flood:泛洪攻击;
+ // icmpFlood:icmp泛洪攻击;
+ // all:全部攻击类型。不填默认为all,表示查询全部攻击类型。
+ AttackType *string `json:"AttackType,omitempty" name:"AttackType"`
- // 分页拉取的起始页号。最小值:1。
- PageNo *int64 `json:"PageNo,omitempty" name:"PageNo"`
+ // 站点集合,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // ddos 策略组id集合,不填默认选择全部策略id。
+ // DDOS策略组id列表,不填默认选择全部策略id。
PolicyIds []*int64 `json:"PolicyIds,omitempty" name:"PolicyIds"`
// 协议类型,取值有:
- // tcp ;
- // udp ;
- // all 。
+ // tcp:tcp协议;
+ // udp:udp协议;
+ // all:全部协议。不填默认为all,表示获取全部协议类型。
ProtocolType *string `json:"ProtocolType,omitempty" name:"ProtocolType"`
- // 站点id列表,不填默认选择全部站点。
- ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+ // 查询时间粒度,取值有:
+ // min:1分钟;
+ // 5min:5分钟;
+ // hour:1小时;
+ // day:1天。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
// 数据归属地区,取值有:
- // overseas :全球(除中国大陆地区)数据 ;
- // mainland :中国大陆地区数据 。不填默认查询overseas。
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
Area *string `json:"Area,omitempty" name:"Area"`
}
-func (r *DescribeDDosMajorAttackEventRequest) ToJsonString() string {
+func (r *DescribeDDoSAttackDataRequest) 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 *DescribeDDosMajorAttackEventRequest) FromJsonString(s string) error {
+func (r *DescribeDDoSAttackDataRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
delete(f, "StartTime")
delete(f, "EndTime")
- delete(f, "PageSize")
- delete(f, "PageNo")
+ delete(f, "MetricNames")
+ delete(f, "Port")
+ delete(f, "AttackType")
+ delete(f, "ZoneIds")
delete(f, "PolicyIds")
delete(f, "ProtocolType")
- delete(f, "ZoneIds")
+ delete(f, "Interval")
delete(f, "Area")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDDosMajorAttackEventRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDDoSAttackDataRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeDDosMajorAttackEventResponseParams struct {
- // DDos查询主攻击事件。
- Data *DDosMajorAttackEventData `json:"Data,omitempty" name:"Data"`
-
- // 请求响应状态,取值有:
- // 1 :失败 ;
- // 0 :成功 。
- Status *int64 `json:"Status,omitempty" name:"Status"`
+type DescribeDDoSAttackDataResponseParams struct {
+ // DDoS攻击数据内容列表。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Data []*SecEntry `json:"Data,omitempty" name:"Data"`
- // 请求响应消息。
- Msg *string `json:"Msg,omitempty" name:"Msg"`
+ // 查询结果的总条数。
+ TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeDDosMajorAttackEventResponse struct {
+type DescribeDDoSAttackDataResponse struct {
*tchttp.BaseResponse
- Response *DescribeDDosMajorAttackEventResponseParams `json:"Response"`
+ Response *DescribeDDoSAttackDataResponseParams `json:"Response"`
}
-func (r *DescribeDDosMajorAttackEventResponse) ToJsonString() string {
+func (r *DescribeDDoSAttackDataResponse) 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 *DescribeDDosMajorAttackEventResponse) FromJsonString(s string) error {
+func (r *DescribeDDoSAttackDataResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeDefaultCertificatesRequestParams struct {
- // Zone ID
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+type DescribeDDoSAttackEventDetailRequestParams struct {
+ // 查询的事件ID。
+ EventId *string `json:"EventId,omitempty" name:"EventId"`
+
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
+ Area *string `json:"Area,omitempty" name:"Area"`
}
-type DescribeDefaultCertificatesRequest struct {
+type DescribeDDoSAttackEventDetailRequest struct {
*tchttp.BaseRequest
- // Zone ID
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+ // 查询的事件ID。
+ EventId *string `json:"EventId,omitempty" name:"EventId"`
+
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
+ Area *string `json:"Area,omitempty" name:"Area"`
}
-func (r *DescribeDefaultCertificatesRequest) ToJsonString() string {
+func (r *DescribeDDoSAttackEventDetailRequest) 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 *DescribeDefaultCertificatesRequest) FromJsonString(s string) error {
+func (r *DescribeDDoSAttackEventDetailRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "ZoneId")
+ delete(f, "EventId")
+ delete(f, "Area")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDefaultCertificatesRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDDoSAttackEventDetailRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeDefaultCertificatesResponseParams struct {
- // 证书总数
- TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"`
-
- // 默认证书列表
- // 注意:此字段可能返回 null,表示取不到有效值。
- CertInfo []*DefaultServerCertInfo `json:"CertInfo,omitempty" name:"CertInfo"`
+type DescribeDDoSAttackEventDetailResponseParams struct {
+ // DDoS攻击事件详情。
+ Data *DDoSAttackEventDetailData `json:"Data,omitempty" name:"Data"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeDefaultCertificatesResponse struct {
+type DescribeDDoSAttackEventDetailResponse struct {
*tchttp.BaseResponse
- Response *DescribeDefaultCertificatesResponseParams `json:"Response"`
+ Response *DescribeDDoSAttackEventDetailResponseParams `json:"Response"`
}
-func (r *DescribeDefaultCertificatesResponse) ToJsonString() string {
+func (r *DescribeDDoSAttackEventDetailResponse) 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 *DescribeDefaultCertificatesResponse) FromJsonString(s string) error {
+func (r *DescribeDDoSAttackEventDetailResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeDnsDataRequestParams struct {
- // 起始时间
+type DescribeDDoSAttackEventRequestParams struct {
+ // 开始时间。
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // 结束时间
+ // 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 过滤参数
- Filters []*DnsDataFilter `json:"Filters,omitempty" name:"Filters"`
+ // 协议类型,取值有:
+ // tcp:tcp协议;
+ // udp:udp协议;
+ // all:全部协议。默认为: all,表示获取全部协议类型。
+ ProtocolType *string `json:"ProtocolType,omitempty" name:"ProtocolType"`
+
+ // ddos策略组集合,不填默认选择全部策略。
+ PolicyIds []*int64 `json:"PolicyIds,omitempty" name:"PolicyIds"`
- // 时间粒度,默认为1分钟粒度,服务端根据时间范围自适应。
- // 支持指定以下几种粒度:
- // min:1分钟粒度
- // 5min:5分钟粒度
- // hour:1小时粒度
- // day:天粒度
- Interval *string `json:"Interval,omitempty" name:"Interval"`
+ // 站点集合,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
+
+ // 分页的偏移量,默认值为0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+
+ // 是否展示详细信息。
+ ShowDetail *bool `json:"ShowDetail,omitempty" name:"ShowDetail"`
+
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
+ Area *string `json:"Area,omitempty" name:"Area"`
}
-type DescribeDnsDataRequest struct {
+type DescribeDDoSAttackEventRequest struct {
*tchttp.BaseRequest
- // 起始时间
+ // 开始时间。
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // 结束时间
+ // 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 过滤参数
- Filters []*DnsDataFilter `json:"Filters,omitempty" name:"Filters"`
+ // 协议类型,取值有:
+ // tcp:tcp协议;
+ // udp:udp协议;
+ // all:全部协议。默认为: all,表示获取全部协议类型。
+ ProtocolType *string `json:"ProtocolType,omitempty" name:"ProtocolType"`
- // 时间粒度,默认为1分钟粒度,服务端根据时间范围自适应。
- // 支持指定以下几种粒度:
- // min:1分钟粒度
- // 5min:5分钟粒度
- // hour:1小时粒度
- // day:天粒度
- Interval *string `json:"Interval,omitempty" name:"Interval"`
+ // ddos策略组集合,不填默认选择全部策略。
+ PolicyIds []*int64 `json:"PolicyIds,omitempty" name:"PolicyIds"`
+
+ // 站点集合,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
+
+ // 分页的偏移量,默认值为0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+
+ // 是否展示详细信息。
+ ShowDetail *bool `json:"ShowDetail,omitempty" name:"ShowDetail"`
+
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
+ Area *string `json:"Area,omitempty" name:"Area"`
}
-func (r *DescribeDnsDataRequest) ToJsonString() string {
+func (r *DescribeDDoSAttackEventRequest) 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 *DescribeDnsDataRequest) FromJsonString(s string) error {
+func (r *DescribeDDoSAttackEventRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
delete(f, "StartTime")
delete(f, "EndTime")
- delete(f, "Filters")
- delete(f, "Interval")
+ delete(f, "ProtocolType")
+ delete(f, "PolicyIds")
+ delete(f, "ZoneIds")
+ delete(f, "Limit")
+ delete(f, "Offset")
+ delete(f, "ShowDetail")
+ delete(f, "Area")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDnsDataRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDDoSAttackEventRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeDnsDataResponseParams struct {
- // 统计曲线数据
+type DescribeDDoSAttackEventResponseParams struct {
+ // DDOS攻击事件数据列表。
// 注意:此字段可能返回 null,表示取不到有效值。
- Data []*DataItem `json:"Data,omitempty" name:"Data"`
+ Data []*DDoSAttackEvent `json:"Data,omitempty" name:"Data"`
- // 时间粒度
- // 注意:此字段可能返回 null,表示取不到有效值。
- Interval *string `json:"Interval,omitempty" name:"Interval"`
+ // 查询结果的总条数。
+ TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeDnsDataResponse struct {
+type DescribeDDoSAttackEventResponse struct {
*tchttp.BaseResponse
- Response *DescribeDnsDataResponseParams `json:"Response"`
+ Response *DescribeDDoSAttackEventResponseParams `json:"Response"`
}
-func (r *DescribeDnsDataResponse) ToJsonString() string {
+func (r *DescribeDDoSAttackEventResponse) 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 *DescribeDnsDataResponse) FromJsonString(s string) error {
+func (r *DescribeDDoSAttackEventResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeDnsRecordsRequestParams struct {
- // 查询条件过滤器
- Filters []*DnsRecordFilter `json:"Filters,omitempty" name:"Filters"`
+type DescribeDDoSAttackSourceEventRequestParams struct {
+ // 开始时间。
+ StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // 排序
- Order *string `json:"Order,omitempty" name:"Order"`
+ // 结束时间。
+ EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 可选值 asc, desc
- Direction *string `json:"Direction,omitempty" name:"Direction"`
+ // 协议类型,取值有:
+ // tcp:tcp协议;
+ // udp:udp协议;
+ // all:全部协议。不填默认为: all,表示获取全部协议类型。
+ ProtocolType *string `json:"ProtocolType,omitempty" name:"ProtocolType"`
- // 可选值 all, any
- Match *string `json:"Match,omitempty" name:"Match"`
+ // DDoS策略组集合,不填默认选择全部策略。
+ PolicyIds []*int64 `json:"PolicyIds,omitempty" name:"PolicyIds"`
+
+ // 站点集合,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // 分页查询限制数目,默认为 100,最大可设置为 1000
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
Limit *int64 `json:"Limit,omitempty" name:"Limit"`
- // 分页查询偏移量,默认为 0
+ // 分页的偏移量,默认值为0。
Offset *int64 `json:"Offset,omitempty" name:"Offset"`
- // 站点 ID
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
+ Area *string `json:"Area,omitempty" name:"Area"`
}
-type DescribeDnsRecordsRequest struct {
+type DescribeDDoSAttackSourceEventRequest struct {
*tchttp.BaseRequest
- // 查询条件过滤器
- Filters []*DnsRecordFilter `json:"Filters,omitempty" name:"Filters"`
+ // 开始时间。
+ StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // 排序
- Order *string `json:"Order,omitempty" name:"Order"`
+ // 结束时间。
+ EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 可选值 asc, desc
- Direction *string `json:"Direction,omitempty" name:"Direction"`
+ // 协议类型,取值有:
+ // tcp:tcp协议;
+ // udp:udp协议;
+ // all:全部协议。不填默认为: all,表示获取全部协议类型。
+ ProtocolType *string `json:"ProtocolType,omitempty" name:"ProtocolType"`
- // 可选值 all, any
- Match *string `json:"Match,omitempty" name:"Match"`
+ // DDoS策略组集合,不填默认选择全部策略。
+ PolicyIds []*int64 `json:"PolicyIds,omitempty" name:"PolicyIds"`
- // 分页查询限制数目,默认为 100,最大可设置为 1000
+ // 站点集合,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
Limit *int64 `json:"Limit,omitempty" name:"Limit"`
- // 分页查询偏移量,默认为 0
+ // 分页的偏移量,默认值为0。
Offset *int64 `json:"Offset,omitempty" name:"Offset"`
- // 站点 ID
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
+ Area *string `json:"Area,omitempty" name:"Area"`
}
-func (r *DescribeDnsRecordsRequest) ToJsonString() string {
+func (r *DescribeDDoSAttackSourceEventRequest) 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 *DescribeDnsRecordsRequest) FromJsonString(s string) error {
+func (r *DescribeDDoSAttackSourceEventRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "Filters")
- delete(f, "Order")
- delete(f, "Direction")
- delete(f, "Match")
+ delete(f, "StartTime")
+ delete(f, "EndTime")
+ delete(f, "ProtocolType")
+ delete(f, "PolicyIds")
+ delete(f, "ZoneIds")
delete(f, "Limit")
delete(f, "Offset")
- delete(f, "ZoneId")
+ delete(f, "Area")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDnsRecordsRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDDoSAttackSourceEventRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeDnsRecordsResponseParams struct {
- // 总数,用于分页查询
- TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"`
+type DescribeDDoSAttackSourceEventResponseParams struct {
+ // DDoS攻击源数据列表。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Data []*DDoSAttackSourceEvent `json:"Data,omitempty" name:"Data"`
- // DNS 记录列表
- Records []*DnsRecord `json:"Records,omitempty" name:"Records"`
+ // 查询结果的总条数。
+ TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeDnsRecordsResponse struct {
+type DescribeDDoSAttackSourceEventResponse struct {
*tchttp.BaseResponse
- Response *DescribeDnsRecordsResponseParams `json:"Response"`
+ Response *DescribeDDoSAttackSourceEventResponseParams `json:"Response"`
}
-func (r *DescribeDnsRecordsResponse) ToJsonString() string {
+func (r *DescribeDDoSAttackSourceEventResponse) 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 *DescribeDnsRecordsResponse) FromJsonString(s string) error {
+func (r *DescribeDDoSAttackSourceEventResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeDnssecRequestParams struct {
- // 站点 ID
- Id *string `json:"Id,omitempty" name:"Id"`
-}
-
-type DescribeDnssecRequest struct {
+type DescribeDDoSAttackTopDataRequestParams struct {
+ // 开始时间。
+ StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
+
+ // 结束时间。
+ EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
+
+ // 查询的统计指标,取值有:
+ // ddos_attackFlux_protocol:攻击总流量协议类型分布排行;
+ // ddos_attackPackageNum_protocol:攻击总包量协议类型分布排行;
+ // ddos_attackNum_attackType:攻击总次数攻击类型分布排行;
+ // ddos_attackNum_sregion:攻击总次数攻击源地区分布排行;
+ // ddos_attackFlux_sip:攻击总流量攻击源ip分布排行;
+ // ddos_attackFlux_sregion:攻击总流量攻击源地区分布排行。
+ MetricName *string `json:"MetricName,omitempty" name:"MetricName"`
+
+ // 站点ID集合,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+
+ // DDoS策略组ID集合,不填默认选择全部策略ID。
+ PolicyIds []*int64 `json:"PolicyIds,omitempty" name:"PolicyIds"`
+
+ // 攻击类型,取值有:
+ // flood:洪泛攻击;
+ // icmpFlood:icmp洪泛攻击;
+ // all:所有的攻击类型。不填默认为all,表示查询全部攻击类型。
+ AttackType *string `json:"AttackType,omitempty" name:"AttackType"`
+
+ // 协议类型,取值有:
+ // tcp:tcp协议;
+ // udp:udp协议;
+ // all:所有的协议类型。不填默认为all,表示查询所有协议。
+ ProtocolType *string `json:"ProtocolType,omitempty" name:"ProtocolType"`
+
+ // 端口号。
+ Port *int64 `json:"Port,omitempty" name:"Port"`
+
+ // 查询前多少个数据,不填默认默认为10, 表示查询前top 10的数据。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
+
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
+ Area *string `json:"Area,omitempty" name:"Area"`
+}
+
+type DescribeDDoSAttackTopDataRequest struct {
*tchttp.BaseRequest
- // 站点 ID
- Id *string `json:"Id,omitempty" name:"Id"`
+ // 开始时间。
+ StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
+
+ // 结束时间。
+ EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
+
+ // 查询的统计指标,取值有:
+ // ddos_attackFlux_protocol:攻击总流量协议类型分布排行;
+ // ddos_attackPackageNum_protocol:攻击总包量协议类型分布排行;
+ // ddos_attackNum_attackType:攻击总次数攻击类型分布排行;
+ // ddos_attackNum_sregion:攻击总次数攻击源地区分布排行;
+ // ddos_attackFlux_sip:攻击总流量攻击源ip分布排行;
+ // ddos_attackFlux_sregion:攻击总流量攻击源地区分布排行。
+ MetricName *string `json:"MetricName,omitempty" name:"MetricName"`
+
+ // 站点ID集合,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+
+ // DDoS策略组ID集合,不填默认选择全部策略ID。
+ PolicyIds []*int64 `json:"PolicyIds,omitempty" name:"PolicyIds"`
+
+ // 攻击类型,取值有:
+ // flood:洪泛攻击;
+ // icmpFlood:icmp洪泛攻击;
+ // all:所有的攻击类型。不填默认为all,表示查询全部攻击类型。
+ AttackType *string `json:"AttackType,omitempty" name:"AttackType"`
+
+ // 协议类型,取值有:
+ // tcp:tcp协议;
+ // udp:udp协议;
+ // all:所有的协议类型。不填默认为all,表示查询所有协议。
+ ProtocolType *string `json:"ProtocolType,omitempty" name:"ProtocolType"`
+
+ // 端口号。
+ Port *int64 `json:"Port,omitempty" name:"Port"`
+
+ // 查询前多少个数据,不填默认默认为10, 表示查询前top 10的数据。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
+
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
+ Area *string `json:"Area,omitempty" name:"Area"`
}
-func (r *DescribeDnssecRequest) ToJsonString() string {
+func (r *DescribeDDoSAttackTopDataRequest) 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 *DescribeDnssecRequest) FromJsonString(s string) error {
+func (r *DescribeDDoSAttackTopDataRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "Id")
+ delete(f, "StartTime")
+ delete(f, "EndTime")
+ delete(f, "MetricName")
+ delete(f, "ZoneIds")
+ delete(f, "PolicyIds")
+ delete(f, "AttackType")
+ delete(f, "ProtocolType")
+ delete(f, "Port")
+ delete(f, "Limit")
+ delete(f, "Area")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDnssecRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDDoSAttackTopDataRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeDnssecResponseParams struct {
- // 站点 ID
- Id *string `json:"Id,omitempty" name:"Id"`
-
- // 站点名称
- Name *string `json:"Name,omitempty" name:"Name"`
-
- // DNSSEC 状态
- // - enabled 开启
- // - disabled 关闭
- Status *string `json:"Status,omitempty" name:"Status"`
-
- // DNSSEC 相关信息
+type DescribeDDoSAttackTopDataResponseParams struct {
+ // DDoS攻击Top数据列表。
// 注意:此字段可能返回 null,表示取不到有效值。
- Dnssec *DnssecInfo `json:"Dnssec,omitempty" name:"Dnssec"`
+ Data []*TopEntry `json:"Data,omitempty" name:"Data"`
- // 修改时间
- ModifiedOn *string `json:"ModifiedOn,omitempty" name:"ModifiedOn"`
+ // 查询结果的总条数。
+ TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeDnssecResponse struct {
+type DescribeDDoSAttackTopDataResponse struct {
*tchttp.BaseResponse
- Response *DescribeDnssecResponseParams `json:"Response"`
+ Response *DescribeDDoSAttackTopDataResponseParams `json:"Response"`
}
-func (r *DescribeDnssecResponse) ToJsonString() string {
+func (r *DescribeDDoSAttackTopDataResponse) 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 *DescribeDnssecResponse) FromJsonString(s string) error {
+func (r *DescribeDDoSAttackTopDataResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeHostsCertificateRequestParams struct {
- // Zone ID
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+type DescribeDDoSBlockListRequestParams struct {
+ // 攻击事件起始时间。
+ StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // 分页查询偏移量,默认为 0
- Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+ // 攻击事件列表。
+ EventIds []*string `json:"EventIds,omitempty" name:"EventIds"`
+
+ // 站点列表,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+
+ // 策略列表,不填默认选择全部策略。
+ PolicyIds []*int64 `json:"PolicyIds,omitempty" name:"PolicyIds"`
- // 分页查询限制数目,默认为 100,最大可设置为 1000
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
Limit *int64 `json:"Limit,omitempty" name:"Limit"`
- // 查询条件过滤器
- Filters []*CertFilter `json:"Filters,omitempty" name:"Filters"`
+ // 分页的偏移量,默认值为0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
- // 排序方式
- Sort *CertSort `json:"Sort,omitempty" name:"Sort"`
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
+ Area *string `json:"Area,omitempty" name:"Area"`
}
-type DescribeHostsCertificateRequest struct {
+type DescribeDDoSBlockListRequest struct {
*tchttp.BaseRequest
- // Zone ID
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+ // 攻击事件起始时间。
+ StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // 分页查询偏移量,默认为 0
- Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+ // 攻击事件列表。
+ EventIds []*string `json:"EventIds,omitempty" name:"EventIds"`
+
+ // 站点列表,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+
+ // 策略列表,不填默认选择全部策略。
+ PolicyIds []*int64 `json:"PolicyIds,omitempty" name:"PolicyIds"`
- // 分页查询限制数目,默认为 100,最大可设置为 1000
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
Limit *int64 `json:"Limit,omitempty" name:"Limit"`
- // 查询条件过滤器
- Filters []*CertFilter `json:"Filters,omitempty" name:"Filters"`
+ // 分页的偏移量,默认值为0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
- // 排序方式
- Sort *CertSort `json:"Sort,omitempty" name:"Sort"`
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
+ Area *string `json:"Area,omitempty" name:"Area"`
}
-func (r *DescribeHostsCertificateRequest) ToJsonString() string {
+func (r *DescribeDDoSBlockListRequest) 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 *DescribeHostsCertificateRequest) FromJsonString(s string) error {
+func (r *DescribeDDoSBlockListRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "ZoneId")
- delete(f, "Offset")
+ delete(f, "StartTime")
+ delete(f, "EventIds")
+ delete(f, "ZoneIds")
+ delete(f, "PolicyIds")
delete(f, "Limit")
- delete(f, "Filters")
- delete(f, "Sort")
+ delete(f, "Offset")
+ delete(f, "Area")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeHostsCertificateRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDDoSBlockListRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeHostsCertificateResponseParams struct {
- // 总数,用于分页查询
- TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"`
-
- // 域名证书配置列表
+type DescribeDDoSBlockListResponseParams struct {
+ // 封禁解封信息。
// 注意:此字段可能返回 null,表示取不到有效值。
- Hosts []*HostCertSetting `json:"Hosts,omitempty" name:"Hosts"`
+ Data []*DDoSBlockData `json:"Data,omitempty" name:"Data"`
+
+ // 查询结果的总条数。
+ TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeHostsCertificateResponse struct {
+type DescribeDDoSBlockListResponse struct {
*tchttp.BaseResponse
- Response *DescribeHostsCertificateResponseParams `json:"Response"`
+ Response *DescribeDDoSBlockListResponseParams `json:"Response"`
}
-func (r *DescribeHostsCertificateResponse) ToJsonString() string {
+func (r *DescribeDDoSBlockListResponse) 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 *DescribeHostsCertificateResponse) FromJsonString(s string) error {
+func (r *DescribeDDoSBlockListResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeHostsSettingRequestParams struct {
- // 站点ID
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+type DescribeDDoSMajorAttackEventRequestParams struct {
+ // 开始时间。
+ StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // 分页查询偏移量,默认为 0
- Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+ // 结束时间。
+ EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 分页查询限制数目,默认为 100,最大可设置为 1000
+ // 站点id列表,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+
+ // ddos策略组id集合,不填默认选择全部策略id。
+ PolicyIds []*int64 `json:"PolicyIds,omitempty" name:"PolicyIds"`
+
+ // 协议类型,可选的协议类型有:
+ // tcp:tcp协议;
+ // udp:udp协议;
+ // all:全部协议。不填默认为all, 表示获取全部协议类型。
+ ProtocolType *string `json:"ProtocolType,omitempty" name:"ProtocolType"`
+
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
Limit *int64 `json:"Limit,omitempty" name:"Limit"`
- // 指定域名查询
- Hosts []*string `json:"Hosts,omitempty" name:"Hosts"`
+ // 分页的偏移量,默认值为0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
+ Area *string `json:"Area,omitempty" name:"Area"`
}
-type DescribeHostsSettingRequest struct {
+type DescribeDDoSMajorAttackEventRequest struct {
*tchttp.BaseRequest
- // 站点ID
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+ // 开始时间。
+ StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // 分页查询偏移量,默认为 0
- Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+ // 结束时间。
+ EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
+
+ // 站点id列表,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+
+ // ddos策略组id集合,不填默认选择全部策略id。
+ PolicyIds []*int64 `json:"PolicyIds,omitempty" name:"PolicyIds"`
- // 分页查询限制数目,默认为 100,最大可设置为 1000
+ // 协议类型,可选的协议类型有:
+ // tcp:tcp协议;
+ // udp:udp协议;
+ // all:全部协议。不填默认为all, 表示获取全部协议类型。
+ ProtocolType *string `json:"ProtocolType,omitempty" name:"ProtocolType"`
+
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
Limit *int64 `json:"Limit,omitempty" name:"Limit"`
- // 指定域名查询
- Hosts []*string `json:"Hosts,omitempty" name:"Hosts"`
+ // 分页的偏移量,默认值为0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
+ Area *string `json:"Area,omitempty" name:"Area"`
}
-func (r *DescribeHostsSettingRequest) ToJsonString() string {
+func (r *DescribeDDoSMajorAttackEventRequest) 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 *DescribeHostsSettingRequest) FromJsonString(s string) error {
+func (r *DescribeDDoSMajorAttackEventRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "ZoneId")
- delete(f, "Offset")
+ delete(f, "StartTime")
+ delete(f, "EndTime")
+ delete(f, "ZoneIds")
+ delete(f, "PolicyIds")
+ delete(f, "ProtocolType")
delete(f, "Limit")
- delete(f, "Hosts")
+ delete(f, "Offset")
+ delete(f, "Area")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeHostsSettingRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDDoSMajorAttackEventRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeHostsSettingResponseParams struct {
- // 域名列表
- Hosts []*DetailHost `json:"Hosts,omitempty" name:"Hosts"`
+type DescribeDDoSMajorAttackEventResponseParams struct {
+ // DDos主攻击事件数据列表。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Data []*DDoSMajorAttackEvent `json:"Data,omitempty" name:"Data"`
- // 域名数量
- TotalNumber *int64 `json:"TotalNumber,omitempty" name:"TotalNumber"`
+ // 查询结果的总条数。
+ TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeHostsSettingResponse struct {
+type DescribeDDoSMajorAttackEventResponse struct {
*tchttp.BaseResponse
- Response *DescribeHostsSettingResponseParams `json:"Response"`
+ Response *DescribeDDoSMajorAttackEventResponseParams `json:"Response"`
}
-func (r *DescribeHostsSettingResponse) ToJsonString() string {
+func (r *DescribeDDoSMajorAttackEventResponse) 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 *DescribeHostsSettingResponse) FromJsonString(s string) error {
+func (r *DescribeDDoSMajorAttackEventResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeIdentificationRequestParams struct {
- // 站点名称
- Name *string `json:"Name,omitempty" name:"Name"`
+type DescribeDDoSPolicyRequestParams struct {
+ // 站点Id。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 策略Id。
+ PolicyId *int64 `json:"PolicyId,omitempty" name:"PolicyId"`
}
-type DescribeIdentificationRequest struct {
+type DescribeDDoSPolicyRequest struct {
*tchttp.BaseRequest
- // 站点名称
- Name *string `json:"Name,omitempty" name:"Name"`
+ // 站点Id。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 策略Id。
+ PolicyId *int64 `json:"PolicyId,omitempty" name:"PolicyId"`
}
-func (r *DescribeIdentificationRequest) ToJsonString() string {
+func (r *DescribeDDoSPolicyRequest) 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 *DescribeIdentificationRequest) FromJsonString(s string) error {
+func (r *DescribeDDoSPolicyRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "Name")
+ delete(f, "ZoneId")
+ delete(f, "PolicyId")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeIdentificationRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDDoSPolicyRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeIdentificationResponseParams struct {
- // 站点名称
- Name *string `json:"Name,omitempty" name:"Name"`
-
- // 验证状态
- // - pending 验证中
- // - finished 验证完成
- Status *string `json:"Status,omitempty" name:"Status"`
-
- // 子域
- Subdomain *string `json:"Subdomain,omitempty" name:"Subdomain"`
-
- // 记录类型
- RecordType *string `json:"RecordType,omitempty" name:"RecordType"`
-
- // 记录值
- RecordValue *string `json:"RecordValue,omitempty" name:"RecordValue"`
-
- // 域名当前的 NS 记录
- // 注意:此字段可能返回 null,表示取不到有效值。
- OriginalNameServers []*string `json:"OriginalNameServers,omitempty" name:"OriginalNameServers"`
+type DescribeDDoSPolicyResponseParams struct {
+ // DDoS防护配置。
+ DDoSRule *DDoSRule `json:"DDoSRule,omitempty" name:"DDoSRule"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeIdentificationResponse struct {
+type DescribeDDoSPolicyResponse struct {
*tchttp.BaseResponse
- Response *DescribeIdentificationResponseParams `json:"Response"`
+ Response *DescribeDDoSPolicyResponseParams `json:"Response"`
}
-func (r *DescribeIdentificationResponse) ToJsonString() string {
+func (r *DescribeDDoSPolicyResponse) 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 *DescribeIdentificationResponse) FromJsonString(s string) error {
+func (r *DescribeDDoSPolicyResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeLoadBalancingDetailRequestParams struct {
- // 站点ID
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+type DescribeDefaultCertificatesRequestParams struct {
+ // 过滤条件,Filters.Values的上限为5。详细的过滤条件如下:
+ // zone-id
按照【站点ID】进行过滤。站点ID形如:zone-xxx。
类型:String
必选:是
+ Filters []*Filter `json:"Filters,omitempty" name:"Filters"`
- // 负载均衡ID
- LoadBalancingId *string `json:"LoadBalancingId,omitempty" name:"LoadBalancingId"`
+ // 分页查询偏移量。默认值:0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+
+ // 分页查询限制数目。默认值:20,最大值:100。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
}
-type DescribeLoadBalancingDetailRequest struct {
+type DescribeDefaultCertificatesRequest struct {
*tchttp.BaseRequest
- // 站点ID
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+ // 过滤条件,Filters.Values的上限为5。详细的过滤条件如下:
+ // zone-id
按照【站点ID】进行过滤。站点ID形如:zone-xxx。
类型:String
必选:是
+ Filters []*Filter `json:"Filters,omitempty" name:"Filters"`
- // 负载均衡ID
- LoadBalancingId *string `json:"LoadBalancingId,omitempty" name:"LoadBalancingId"`
+ // 分页查询偏移量。默认值:0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+
+ // 分页查询限制数目。默认值:20,最大值:100。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
}
-func (r *DescribeLoadBalancingDetailRequest) ToJsonString() string {
+func (r *DescribeDefaultCertificatesRequest) 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 *DescribeLoadBalancingDetailRequest) FromJsonString(s string) error {
+func (r *DescribeDefaultCertificatesRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "ZoneId")
- delete(f, "LoadBalancingId")
+ delete(f, "Filters")
+ delete(f, "Offset")
+ delete(f, "Limit")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeLoadBalancingDetailRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDefaultCertificatesRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeLoadBalancingDetailResponseParams struct {
- // 负载均衡ID
- LoadBalancingId *string `json:"LoadBalancingId,omitempty" name:"LoadBalancingId"`
-
- // 站点ID
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
-
- // 子域名,填写@表示根域
- Host *string `json:"Host,omitempty" name:"Host"`
-
- // 代理模式:
- // dns_only: 仅DNS
- // proxied: 开启代理
- Type *string `json:"Type,omitempty" name:"Type"`
-
- // 当Type=dns_only表示DNS的TTL时间
- TTL *uint64 `json:"TTL,omitempty" name:"TTL"`
-
- // 使用的源站组ID
- OriginId []*string `json:"OriginId,omitempty" name:"OriginId"`
-
- // 使用的源站信息
- Origin []*OriginGroup `json:"Origin,omitempty" name:"Origin"`
-
- // 更新时间
- UpdateTime *string `json:"UpdateTime,omitempty" name:"UpdateTime"`
-
- // 状态
- Status *string `json:"Status,omitempty" name:"Status"`
+type DescribeDefaultCertificatesResponseParams struct {
+ // 证书总数。
+ TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"`
- // 调度域名
- // 注意:此字段可能返回 null,表示取不到有效值。
- Cname *string `json:"Cname,omitempty" name:"Cname"`
+ // 默认证书列表。
+ DefaultServerCertInfo []*DefaultServerCertInfo `json:"DefaultServerCertInfo,omitempty" name:"DefaultServerCertInfo"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeLoadBalancingDetailResponse struct {
+type DescribeDefaultCertificatesResponse struct {
*tchttp.BaseResponse
- Response *DescribeLoadBalancingDetailResponseParams `json:"Response"`
+ Response *DescribeDefaultCertificatesResponseParams `json:"Response"`
}
-func (r *DescribeLoadBalancingDetailResponse) ToJsonString() string {
+func (r *DescribeDefaultCertificatesResponse) 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 *DescribeLoadBalancingDetailResponse) FromJsonString(s string) error {
+func (r *DescribeDefaultCertificatesResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeLoadBalancingRequestParams struct {
- // 站点ID
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+type DescribeDnsDataRequestParams struct {
+ // 起始时间。
+ StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // 分页参数Offset
- Offset *uint64 `json:"Offset,omitempty" name:"Offset"`
-
- // 分页参数Limit
- Limit *uint64 `json:"Limit,omitempty" name:"Limit"`
+ // 结束时间。
+ EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 过滤参数Host
- Host *string `json:"Host,omitempty" name:"Host"`
+ // 过滤条件,Filters.Values的上限为20。详细的过滤条件如下:
+ // zone
按照【站点名称】进行过滤。站点名称形如:tencent.com
类型:String
必选:否,仅支持填写一个站点
+ // host
按照【域名】进行过滤。域名形如:test.tencent.com
类型:String
必选:否,仅支持填写一个域名
+ // type
按照【DNS解析类型】进行过滤
类型:String
必选:否
可选项:
A:A记录
AAAA:AAAA记录
CNAME:CNAME记录
MX:MX记录
TXT:TXT记录
NS:NS记录
SRV:SRV记录
CAA:CAA记录
+ // code
按照【DNS解析状态码】进行过滤。
类型:String
必选:否
可选项:
NoError:成功
NXDomain:请求域不存在
NotImp:不支持的请求类型
Refused:域名服务器因为策略的原因拒绝执行请求
+ // area
按照【DNS解析地域】进行过滤。
类型:String
必选:否。
可选项:
亚洲:Asia
欧洲:Europe
非洲:Africa
大洋洲:Oceania
美洲:Americas
+ Filters []*Filter `json:"Filters,omitempty" name:"Filters"`
- // 过滤参数Host是否支持模糊匹配
- Fuzzy *bool `json:"Fuzzy,omitempty" name:"Fuzzy"`
+ // 时间粒度,取值有:
+ // min:1分钟粒度;
+ // 5min:5分钟粒度;
+ // hour:1小时粒度;
+ // day:天粒度。不填写,默认值为:min。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
}
-type DescribeLoadBalancingRequest struct {
+type DescribeDnsDataRequest struct {
*tchttp.BaseRequest
- // 站点ID
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
-
- // 分页参数Offset
- Offset *uint64 `json:"Offset,omitempty" name:"Offset"`
+ // 起始时间。
+ StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // 分页参数Limit
- Limit *uint64 `json:"Limit,omitempty" name:"Limit"`
+ // 结束时间。
+ EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 过滤参数Host
- Host *string `json:"Host,omitempty" name:"Host"`
+ // 过滤条件,Filters.Values的上限为20。详细的过滤条件如下:
+ // zone
按照【站点名称】进行过滤。站点名称形如:tencent.com
类型:String
必选:否,仅支持填写一个站点
+ // host
按照【域名】进行过滤。域名形如:test.tencent.com
类型:String
必选:否,仅支持填写一个域名
+ // type
按照【DNS解析类型】进行过滤
类型:String
必选:否
可选项:
A:A记录
AAAA:AAAA记录
CNAME:CNAME记录
MX:MX记录
TXT:TXT记录
NS:NS记录
SRV:SRV记录
CAA:CAA记录
+ // code
按照【DNS解析状态码】进行过滤。
类型:String
必选:否
可选项:
NoError:成功
NXDomain:请求域不存在
NotImp:不支持的请求类型
Refused:域名服务器因为策略的原因拒绝执行请求
+ // area
按照【DNS解析地域】进行过滤。
类型:String
必选:否。
可选项:
亚洲:Asia
欧洲:Europe
非洲:Africa
大洋洲:Oceania
美洲:Americas
+ Filters []*Filter `json:"Filters,omitempty" name:"Filters"`
- // 过滤参数Host是否支持模糊匹配
- Fuzzy *bool `json:"Fuzzy,omitempty" name:"Fuzzy"`
+ // 时间粒度,取值有:
+ // min:1分钟粒度;
+ // 5min:5分钟粒度;
+ // hour:1小时粒度;
+ // day:天粒度。不填写,默认值为:min。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
}
-func (r *DescribeLoadBalancingRequest) ToJsonString() string {
+func (r *DescribeDnsDataRequest) 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 *DescribeLoadBalancingRequest) FromJsonString(s string) error {
+func (r *DescribeDnsDataRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "ZoneId")
- delete(f, "Offset")
- delete(f, "Limit")
- delete(f, "Host")
- delete(f, "Fuzzy")
+ delete(f, "StartTime")
+ delete(f, "EndTime")
+ delete(f, "Filters")
+ delete(f, "Interval")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeLoadBalancingRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDnsDataRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeLoadBalancingResponseParams struct {
- // 记录总数
- TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
-
- // 负载均衡信息
- Data []*LoadBalancing `json:"Data,omitempty" name:"Data"`
+type DescribeDnsDataResponseParams struct {
+ // 统计数据。
+ Data []*DnsData `json:"Data,omitempty" name:"Data"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeLoadBalancingResponse struct {
+type DescribeDnsDataResponse struct {
*tchttp.BaseResponse
- Response *DescribeLoadBalancingResponseParams `json:"Response"`
+ Response *DescribeDnsDataResponseParams `json:"Response"`
}
-func (r *DescribeLoadBalancingResponse) ToJsonString() string {
+func (r *DescribeDnsDataResponse) 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 *DescribeLoadBalancingResponse) FromJsonString(s string) error {
+func (r *DescribeDnsDataResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeOriginGroupDetailRequestParams struct {
- // 源站组ID
- OriginId *string `json:"OriginId,omitempty" name:"OriginId"`
-
- // 站点ID
+type DescribeDnsRecordsRequestParams struct {
+ // DNS记录所属站点ID。不填写该参数默认返回所有站点下的记录。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 过滤条件,Filters.Values的上限为20。详细的过滤条件如下:
+ // record-id
按照【DNS记录id】进行过滤。DNS记录ID形如:record-1a8df68z。
类型:String
必选:否
+ // record-name
按照【DNS记录名称】进行过滤。
类型:String
必选:否
+ // record-type
按照【DNS记录类型】进行过滤。
类型:String
必选:否
可选项:
A:将域名指向一个外网 IPv4 地址,如 8.8.8.8
AAAA:将域名指向一个外网 IPv6 地址
CNAME:将域名指向另一个域名,再由该域名解析出最终 IP 地址
TXT:对域名进行标识和说明,常用于域名验证和 SPF 记录(反垃圾邮件)
NS:如果需要将子域名交给其他 DNS 服务商解析,则需要添加 NS 记录。根域名无法添加 NS 记录
CAA:指定可为本站点颁发证书的 CA
SRV:标识某台服务器使用了某个服务,常见于微软系统的目录管理
MX:指定收件人邮件服务器。
+ // mode
按照【代理模式】进行过滤。
类型:String
必选:否
可选项:
dns_only:仅DNS解析
proxied:代理加速
+ // ttl
按照【解析生效时间】进行过滤。
类型:string
必选:否
+ Filters []*AdvancedFilter `json:"Filters,omitempty" name:"Filters"`
+
+ // 列表排序方式,取值有:
+ // asc:升序排列;
+ // desc:降序排列。默认值为asc。
+ Direction *string `json:"Direction,omitempty" name:"Direction"`
+
+ // 匹配方式,取值有:
+ // all:返回匹配所有查询条件的记录;
+ // any:返回匹配任意一个查询条件的记录。默认值为all。
+ Match *string `json:"Match,omitempty" name:"Match"`
+
+ // 分页查询限制数目,默认值:20,上限:1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
+
+ // 分页查询偏移量,默认为 0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+
+ // 排序依据,取值有:
+ // content:DNS记录内容;
+ // created_on:DNS记录创建时间;
+ // mode:代理模式;
+ // record-name:DNS记录名称;
+ // ttl:解析记录生效时间;
+ // record-type:DNS记录类型。默认根据record-type, recrod-name属性组合排序。
+ Order *string `json:"Order,omitempty" name:"Order"`
}
-type DescribeOriginGroupDetailRequest struct {
+type DescribeDnsRecordsRequest struct {
*tchttp.BaseRequest
- // 源站组ID
- OriginId *string `json:"OriginId,omitempty" name:"OriginId"`
-
- // 站点ID
+ // DNS记录所属站点ID。不填写该参数默认返回所有站点下的记录。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 过滤条件,Filters.Values的上限为20。详细的过滤条件如下:
+ // record-id
按照【DNS记录id】进行过滤。DNS记录ID形如:record-1a8df68z。
类型:String
必选:否
+ // record-name
按照【DNS记录名称】进行过滤。
类型:String
必选:否
+ // record-type
按照【DNS记录类型】进行过滤。
类型:String
必选:否
可选项:
A:将域名指向一个外网 IPv4 地址,如 8.8.8.8
AAAA:将域名指向一个外网 IPv6 地址
CNAME:将域名指向另一个域名,再由该域名解析出最终 IP 地址
TXT:对域名进行标识和说明,常用于域名验证和 SPF 记录(反垃圾邮件)
NS:如果需要将子域名交给其他 DNS 服务商解析,则需要添加 NS 记录。根域名无法添加 NS 记录
CAA:指定可为本站点颁发证书的 CA
SRV:标识某台服务器使用了某个服务,常见于微软系统的目录管理
MX:指定收件人邮件服务器。
+ // mode
按照【代理模式】进行过滤。
类型:String
必选:否
可选项:
dns_only:仅DNS解析
proxied:代理加速
+ // ttl
按照【解析生效时间】进行过滤。
类型:string
必选:否
+ Filters []*AdvancedFilter `json:"Filters,omitempty" name:"Filters"`
+
+ // 列表排序方式,取值有:
+ // asc:升序排列;
+ // desc:降序排列。默认值为asc。
+ Direction *string `json:"Direction,omitempty" name:"Direction"`
+
+ // 匹配方式,取值有:
+ // all:返回匹配所有查询条件的记录;
+ // any:返回匹配任意一个查询条件的记录。默认值为all。
+ Match *string `json:"Match,omitempty" name:"Match"`
+
+ // 分页查询限制数目,默认值:20,上限:1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
+
+ // 分页查询偏移量,默认为 0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+
+ // 排序依据,取值有:
+ // content:DNS记录内容;
+ // created_on:DNS记录创建时间;
+ // mode:代理模式;
+ // record-name:DNS记录名称;
+ // ttl:解析记录生效时间;
+ // record-type:DNS记录类型。默认根据record-type, recrod-name属性组合排序。
+ Order *string `json:"Order,omitempty" name:"Order"`
}
-func (r *DescribeOriginGroupDetailRequest) ToJsonString() string {
+func (r *DescribeDnsRecordsRequest) 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 *DescribeOriginGroupDetailRequest) FromJsonString(s string) error {
+func (r *DescribeDnsRecordsRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "OriginId")
delete(f, "ZoneId")
+ delete(f, "Filters")
+ delete(f, "Direction")
+ delete(f, "Match")
+ delete(f, "Limit")
+ delete(f, "Offset")
+ delete(f, "Order")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeOriginGroupDetailRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDnsRecordsRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeOriginGroupDetailResponseParams struct {
- // 源站组ID
- OriginId *string `json:"OriginId,omitempty" name:"OriginId"`
-
- // 源站组名称
- OriginName *string `json:"OriginName,omitempty" name:"OriginName"`
-
- // 源站组配置类型
- // area:表示按照Record记录中的Area字段进行按客户端IP所在区域回源。
- // weight:表示按照Record记录中的Weight字段进行按权重回源。
- Type *string `json:"Type,omitempty" name:"Type"`
-
- // 记录
- Record []*OriginRecord `json:"Record,omitempty" name:"Record"`
-
- // 更新时间
- UpdateTime *string `json:"UpdateTime,omitempty" name:"UpdateTime"`
-
- // 站点ID
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
-
- // 站点名称
- ZoneName *string `json:"ZoneName,omitempty" name:"ZoneName"`
-
- // 源站类型
- // 注意:此字段可能返回 null,表示取不到有效值。
- OriginType *string `json:"OriginType,omitempty" name:"OriginType"`
-
- // 当前源站组是否被四层代理使用。
- // 注意:此字段可能返回 null,表示取不到有效值。
- ApplicationProxyUsed *bool `json:"ApplicationProxyUsed,omitempty" name:"ApplicationProxyUsed"`
-
- // 当前源站组是否被负载均衡使用。
- // 注意:此字段可能返回 null,表示取不到有效值。
- LoadBalancingUsed *bool `json:"LoadBalancingUsed,omitempty" name:"LoadBalancingUsed"`
+type DescribeDnsRecordsResponseParams struct {
+ // DNS记录总数。
+ TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"`
- // 使用当前源站组的负载均衡的类型:
- // none:未被使用
- // dns_only:被仅DNS类型负载均衡使用
- // proxied:被代理加速类型负载均衡使用
- // both:同时被仅DNS和代理加速类型负载均衡使用
- // 注意:此字段可能返回 null,表示取不到有效值。
- LoadBalancingUsedType *string `json:"LoadBalancingUsedType,omitempty" name:"LoadBalancingUsedType"`
+ // DNS 记录列表。
+ DnsRecords []*DnsRecord `json:"DnsRecords,omitempty" name:"DnsRecords"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeOriginGroupDetailResponse struct {
+type DescribeDnsRecordsResponse struct {
*tchttp.BaseResponse
- Response *DescribeOriginGroupDetailResponseParams `json:"Response"`
+ Response *DescribeDnsRecordsResponseParams `json:"Response"`
}
-func (r *DescribeOriginGroupDetailResponse) ToJsonString() string {
+func (r *DescribeDnsRecordsResponse) 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 *DescribeOriginGroupDetailResponse) FromJsonString(s string) error {
+func (r *DescribeDnsRecordsResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeOriginGroupRequestParams struct {
- // 分页参数Offset
- Offset *uint64 `json:"Offset,omitempty" name:"Offset"`
-
- // 分页参数Limit
- Limit *uint64 `json:"Limit,omitempty" name:"Limit"`
-
- // 过滤参数
- Filters []*OriginFilter `json:"Filters,omitempty" name:"Filters"`
-
- // 站点ID
- // 不填写获取所有站点源站组
+type DescribeDnssecRequestParams struct {
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
}
-type DescribeOriginGroupRequest struct {
+type DescribeDnssecRequest struct {
*tchttp.BaseRequest
- // 分页参数Offset
- Offset *uint64 `json:"Offset,omitempty" name:"Offset"`
-
- // 分页参数Limit
- Limit *uint64 `json:"Limit,omitempty" name:"Limit"`
-
- // 过滤参数
- Filters []*OriginFilter `json:"Filters,omitempty" name:"Filters"`
-
- // 站点ID
- // 不填写获取所有站点源站组
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
}
-func (r *DescribeOriginGroupRequest) ToJsonString() string {
+func (r *DescribeDnssecRequest) 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 *DescribeOriginGroupRequest) FromJsonString(s string) error {
+func (r *DescribeDnssecRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "Offset")
- delete(f, "Limit")
- delete(f, "Filters")
delete(f, "ZoneId")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeOriginGroupRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDnssecRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeOriginGroupResponseParams struct {
- // 源站组信息
- Data []*OriginGroup `json:"Data,omitempty" name:"Data"`
+type DescribeDnssecResponseParams struct {
+ // DNSSEC状态信息,取值有:
+ // enabled:开启;
+ // disabled:关闭。
+ Status *string `json:"Status,omitempty" name:"Status"`
- // 记录总数
- TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
+ // DNSSEC相关信息。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ DnssecInfo *DnssecInfo `json:"DnssecInfo,omitempty" name:"DnssecInfo"`
+
+ // 站点信息更新时间。
+ ModifiedOn *string `json:"ModifiedOn,omitempty" name:"ModifiedOn"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeOriginGroupResponse struct {
+type DescribeDnssecResponse struct {
*tchttp.BaseResponse
- Response *DescribeOriginGroupResponseParams `json:"Response"`
+ Response *DescribeDnssecResponseParams `json:"Response"`
}
-func (r *DescribeOriginGroupResponse) ToJsonString() string {
+func (r *DescribeDnssecResponse) 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 *DescribeOriginGroupResponse) FromJsonString(s string) error {
+func (r *DescribeDnssecResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeOverviewL7DataRequestParams struct {
- // RFC3339格式,客户端时间
- StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
-
- // RFC3339格式,客户端时间
- EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
+type DescribeHostCertificatesRequestParams struct {
+ // 过滤条件,Filters.Values的上限为20。详细的过滤条件如下:
+ // zone-id
按照【站点ID】进行过滤。站点ID形如:zone-xxx。
类型:String
必选:是host
按照【域名名称】进行过滤。
类型:String
必选:否cert-id
按照【证书ID】进行过滤。
类型:String
必选:否cert-alias
按照【证书名称】进行过滤。
类型:String
必选:否cert-type
按照【证书类型】进行过滤。
类型:String
必选:否
+ Filters []*AdvancedFilter `json:"Filters,omitempty" name:"Filters"`
- // 指标列表,支持的指标
- // l7Flow_outFlux: 访问流量
- // l7Flow_request: 访问请求数
- // l7Flow_outBandwidth: 访问带宽
- // l7Flow_hit_outFlux: 缓存命中流量
- MetricNames []*string `json:"MetricNames,omitempty" name:"MetricNames"`
-
- // 时间间隔,选填{min, 5min, hour, day, week}
- Interval *string `json:"Interval,omitempty" name:"Interval"`
-
- // ZoneId列表,仅在zone/domain维度下查询时该参数有效
- ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
-
- // Domain列表,仅在domain维度下查询时该参数有效
- Domains []*string `json:"Domains,omitempty" name:"Domains"`
+ // 分页查询偏移量,默认为 0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
- // 协议类型, 选填{http,http2,https,all}
- Protocol *string `json:"Protocol,omitempty" name:"Protocol"`
+ // 分页查询限制数目,默认为 100,最大可设置为 1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
- // 加速区域,取值有:
- // mainland:中国大陆境内;
- // overseas:全球(不含中国大陆)。
- Area *string `json:"Area,omitempty" name:"Area"`
+ // 排序方式。详细排序条件如下:
+ // create-time:域名创建时间;
+ // cert-expire-time:证书过期时间;
+ // cert-deploy-time:证书部署时间。
+ Sort *Sort `json:"Sort,omitempty" name:"Sort"`
}
-type DescribeOverviewL7DataRequest struct {
+type DescribeHostCertificatesRequest struct {
*tchttp.BaseRequest
- // RFC3339格式,客户端时间
- StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
-
- // RFC3339格式,客户端时间
- EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
-
- // 指标列表,支持的指标
- // l7Flow_outFlux: 访问流量
- // l7Flow_request: 访问请求数
- // l7Flow_outBandwidth: 访问带宽
- // l7Flow_hit_outFlux: 缓存命中流量
- MetricNames []*string `json:"MetricNames,omitempty" name:"MetricNames"`
-
- // 时间间隔,选填{min, 5min, hour, day, week}
- Interval *string `json:"Interval,omitempty" name:"Interval"`
-
- // ZoneId列表,仅在zone/domain维度下查询时该参数有效
- ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+ // 过滤条件,Filters.Values的上限为20。详细的过滤条件如下:
+ // zone-id
按照【站点ID】进行过滤。站点ID形如:zone-xxx。
类型:String
必选:是host
按照【域名名称】进行过滤。
类型:String
必选:否cert-id
按照【证书ID】进行过滤。
类型:String
必选:否cert-alias
按照【证书名称】进行过滤。
类型:String
必选:否cert-type
按照【证书类型】进行过滤。
类型:String
必选:否
+ Filters []*AdvancedFilter `json:"Filters,omitempty" name:"Filters"`
- // Domain列表,仅在domain维度下查询时该参数有效
- Domains []*string `json:"Domains,omitempty" name:"Domains"`
+ // 分页查询偏移量,默认为 0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
- // 协议类型, 选填{http,http2,https,all}
- Protocol *string `json:"Protocol,omitempty" name:"Protocol"`
+ // 分页查询限制数目,默认为 100,最大可设置为 1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
- // 加速区域,取值有:
- // mainland:中国大陆境内;
- // overseas:全球(不含中国大陆)。
- Area *string `json:"Area,omitempty" name:"Area"`
+ // 排序方式。详细排序条件如下:
+ // create-time:域名创建时间;
+ // cert-expire-time:证书过期时间;
+ // cert-deploy-time:证书部署时间。
+ Sort *Sort `json:"Sort,omitempty" name:"Sort"`
}
-func (r *DescribeOverviewL7DataRequest) ToJsonString() string {
+func (r *DescribeHostCertificatesRequest) 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 *DescribeOverviewL7DataRequest) FromJsonString(s string) error {
+func (r *DescribeHostCertificatesRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "StartTime")
- delete(f, "EndTime")
- delete(f, "MetricNames")
- delete(f, "Interval")
- delete(f, "ZoneIds")
- delete(f, "Domains")
- delete(f, "Protocol")
- delete(f, "Area")
+ delete(f, "Filters")
+ delete(f, "Offset")
+ delete(f, "Limit")
+ delete(f, "Sort")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeOverviewL7DataRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeHostCertificatesRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeOverviewL7DataResponseParams struct {
- // 查询维度
- Type *string `json:"Type,omitempty" name:"Type"`
-
- // 时间间隔
- Interval *string `json:"Interval,omitempty" name:"Interval"`
+type DescribeHostCertificatesResponseParams struct {
+ // 总数,用于分页查询。
+ TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"`
- // 详细数据
- Data []*TimingDataRecord `json:"Data,omitempty" name:"Data"`
+ // 域名证书配置列表。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ HostCertificates []*HostsCertificate `json:"HostCertificates,omitempty" name:"HostCertificates"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeOverviewL7DataResponse struct {
+type DescribeHostCertificatesResponse struct {
*tchttp.BaseResponse
- Response *DescribeOverviewL7DataResponseParams `json:"Response"`
+ Response *DescribeHostCertificatesResponseParams `json:"Response"`
}
-func (r *DescribeOverviewL7DataResponse) ToJsonString() string {
+func (r *DescribeHostCertificatesResponse) 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 *DescribeOverviewL7DataResponse) FromJsonString(s string) error {
+func (r *DescribeHostCertificatesResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribePrefetchTasksRequestParams struct {
- // 任务ID
- JobId *string `json:"JobId,omitempty" name:"JobId"`
-
- // 查询起始时间
- StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
-
- // 查询结束时间
- EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
+type DescribeHostsSettingRequestParams struct {
+ // 站点ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 查询起始偏移量
+ // 分页查询偏移量。默认值: 0,最小值:0。
Offset *int64 `json:"Offset,omitempty" name:"Offset"`
- // 查询最大返回的结果条数
+ // 分页查询限制数目。默认值: 100,最大值:1000。
Limit *int64 `json:"Limit,omitempty" name:"Limit"`
- // 查询的状态
- // 允许的值为:processing、success、failed、timeout、invalid
- Statuses []*string `json:"Statuses,omitempty" name:"Statuses"`
-
- // zone id
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
-
- // 查询的域名列表
- Domains []*string `json:"Domains,omitempty" name:"Domains"`
-
- // 查询的资源
- Target *string `json:"Target,omitempty" name:"Target"`
+ // 过滤条件,Filters.Values的上限为20。详细的过滤条件如下:
+ // host
按照【域名】进行过滤。
类型:string
必选:否
+ Filters []*Filter `json:"Filters,omitempty" name:"Filters"`
}
-type DescribePrefetchTasksRequest struct {
+type DescribeHostsSettingRequest struct {
*tchttp.BaseRequest
- // 任务ID
- JobId *string `json:"JobId,omitempty" name:"JobId"`
-
- // 查询起始时间
- StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
-
- // 查询结束时间
- EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
+ // 站点ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 查询起始偏移量
+ // 分页查询偏移量。默认值: 0,最小值:0。
Offset *int64 `json:"Offset,omitempty" name:"Offset"`
- // 查询最大返回的结果条数
+ // 分页查询限制数目。默认值: 100,最大值:1000。
Limit *int64 `json:"Limit,omitempty" name:"Limit"`
- // 查询的状态
- // 允许的值为:processing、success、failed、timeout、invalid
- Statuses []*string `json:"Statuses,omitempty" name:"Statuses"`
-
- // zone id
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
-
- // 查询的域名列表
- Domains []*string `json:"Domains,omitempty" name:"Domains"`
-
- // 查询的资源
- Target *string `json:"Target,omitempty" name:"Target"`
+ // 过滤条件,Filters.Values的上限为20。详细的过滤条件如下:
+ // host
按照【域名】进行过滤。
类型:string
必选:否
+ Filters []*Filter `json:"Filters,omitempty" name:"Filters"`
}
-func (r *DescribePrefetchTasksRequest) ToJsonString() string {
+func (r *DescribeHostsSettingRequest) 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 *DescribePrefetchTasksRequest) FromJsonString(s string) error {
+func (r *DescribeHostsSettingRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "JobId")
- delete(f, "StartTime")
- delete(f, "EndTime")
+ delete(f, "ZoneId")
delete(f, "Offset")
delete(f, "Limit")
- delete(f, "Statuses")
- delete(f, "ZoneId")
- delete(f, "Domains")
- delete(f, "Target")
+ delete(f, "Filters")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePrefetchTasksRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeHostsSettingRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribePrefetchTasksResponseParams struct {
- // 该查询条件总共条目数
- TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
+type DescribeHostsSettingResponseParams struct {
+ // 域名列表。
+ DetailHosts []*DetailHost `json:"DetailHosts,omitempty" name:"DetailHosts"`
- // 任务结果列表
- Tasks []*Task `json:"Tasks,omitempty" name:"Tasks"`
+ // 域名数量。
+ TotalNumber *int64 `json:"TotalNumber,omitempty" name:"TotalNumber"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribePrefetchTasksResponse struct {
+type DescribeHostsSettingResponse struct {
*tchttp.BaseResponse
- Response *DescribePrefetchTasksResponseParams `json:"Response"`
+ Response *DescribeHostsSettingResponseParams `json:"Response"`
}
-func (r *DescribePrefetchTasksResponse) ToJsonString() string {
+func (r *DescribeHostsSettingResponse) 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 *DescribePrefetchTasksResponse) FromJsonString(s string) error {
+func (r *DescribeHostsSettingResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribePurgeTasksRequestParams struct {
- // 任务ID
- JobId *string `json:"JobId,omitempty" name:"JobId"`
-
- // 类型
- Type *string `json:"Type,omitempty" name:"Type"`
-
- // 查询起始时间
- StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
-
- // 查询结束时间
- EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
+type DescribeIdentificationsRequestParams struct {
+ // 过滤条件,Filters.Values的上限为20。详细的过滤条件如下:
+ // zone-name
按照【站点名称】进行过滤。
类型:String
必选:是
+ Filters []*Filter `json:"Filters,omitempty" name:"Filters"`
- // 查询起始偏移量
+ // 分页查询偏移量。默认值:0。
Offset *int64 `json:"Offset,omitempty" name:"Offset"`
- // 查询最大返回的结果条数
+ // 分页查询限制数目。默认值:20,最大值:1000。
Limit *int64 `json:"Limit,omitempty" name:"Limit"`
-
- // 查询的状态
- // 允许的值为:processing、success、failed、timeout、invalid
- Statuses []*string `json:"Statuses,omitempty" name:"Statuses"`
-
- // zone id
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
-
- // 查询的域名列表
- Domains []*string `json:"Domains,omitempty" name:"Domains"`
-
- // 查询内容
- Target *string `json:"Target,omitempty" name:"Target"`
}
-type DescribePurgeTasksRequest struct {
+type DescribeIdentificationsRequest struct {
*tchttp.BaseRequest
- // 任务ID
- JobId *string `json:"JobId,omitempty" name:"JobId"`
-
- // 类型
- Type *string `json:"Type,omitempty" name:"Type"`
-
- // 查询起始时间
- StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
-
- // 查询结束时间
- EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
+ // 过滤条件,Filters.Values的上限为20。详细的过滤条件如下:
+ // zone-name
按照【站点名称】进行过滤。
类型:String
必选:是
+ Filters []*Filter `json:"Filters,omitempty" name:"Filters"`
- // 查询起始偏移量
+ // 分页查询偏移量。默认值:0。
Offset *int64 `json:"Offset,omitempty" name:"Offset"`
- // 查询最大返回的结果条数
+ // 分页查询限制数目。默认值:20,最大值:1000。
Limit *int64 `json:"Limit,omitempty" name:"Limit"`
-
- // 查询的状态
- // 允许的值为:processing、success、failed、timeout、invalid
- Statuses []*string `json:"Statuses,omitempty" name:"Statuses"`
-
- // zone id
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
-
- // 查询的域名列表
- Domains []*string `json:"Domains,omitempty" name:"Domains"`
-
- // 查询内容
- Target *string `json:"Target,omitempty" name:"Target"`
}
-func (r *DescribePurgeTasksRequest) ToJsonString() string {
+func (r *DescribeIdentificationsRequest) 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 *DescribePurgeTasksRequest) FromJsonString(s string) error {
+func (r *DescribeIdentificationsRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "JobId")
- delete(f, "Type")
- delete(f, "StartTime")
- delete(f, "EndTime")
+ delete(f, "Filters")
delete(f, "Offset")
delete(f, "Limit")
- delete(f, "Statuses")
- delete(f, "ZoneId")
- delete(f, "Domains")
- delete(f, "Target")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePurgeTasksRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeIdentificationsRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribePurgeTasksResponseParams struct {
- // 该查询条件总共条目数
- TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
+type DescribeIdentificationsResponseParams struct {
+ // 符合条件的站点个数。
+ TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"`
- // 任务结果列表
- Tasks []*Task `json:"Tasks,omitempty" name:"Tasks"`
+ // 站点验证信息列表。
+ Identifications []*Identification `json:"Identifications,omitempty" name:"Identifications"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribePurgeTasksResponse struct {
+type DescribeIdentificationsResponse struct {
*tchttp.BaseResponse
- Response *DescribePurgeTasksResponseParams `json:"Response"`
+ Response *DescribeIdentificationsResponseParams `json:"Response"`
}
-func (r *DescribePurgeTasksResponse) ToJsonString() string {
+func (r *DescribeIdentificationsResponse) 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 *DescribePurgeTasksResponse) FromJsonString(s string) error {
+func (r *DescribeIdentificationsResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeRulesRequestParams struct {
- // 站点 ID。
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+type DescribeLoadBalancingRequestParams struct {
+ // 分页查询偏移量,默认为0。
+ Offset *uint64 `json:"Offset,omitempty" name:"Offset"`
+
+ // 分页查询限制数目,默认为10,取值:1-1000。
+ Limit *uint64 `json:"Limit,omitempty" name:"Limit"`
- // 过滤参数,不填默认不过滤。
- Filters []*RuleFilter `json:"Filters,omitempty" name:"Filters"`
+ // 过滤条件,Filters.Values的上限为20。详细的过滤条件如下:
+ // zone-id
按照【站点ID】进行过滤。站点ID形如:zone-1a8df68z
类型:String
必选:否
模糊查询:不支持
+ // load-balancing-id
按照【负载均衡ID】进行过滤。负载均衡ID形如:lb-d21bfaf7-8d72-11ec-841d-00ff977fb3c8
类型:String
必选:否
模糊查询:不支持
+ // host
按照【负载均衡host】进行过滤。host形如:lb.tencent.com
类型:String
必选:否
模糊查询:支持,模糊查询时仅支持一个host
+ Filters []*AdvancedFilter `json:"Filters,omitempty" name:"Filters"`
}
-type DescribeRulesRequest struct {
+type DescribeLoadBalancingRequest struct {
*tchttp.BaseRequest
- // 站点 ID。
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+ // 分页查询偏移量,默认为0。
+ Offset *uint64 `json:"Offset,omitempty" name:"Offset"`
+
+ // 分页查询限制数目,默认为10,取值:1-1000。
+ Limit *uint64 `json:"Limit,omitempty" name:"Limit"`
- // 过滤参数,不填默认不过滤。
- Filters []*RuleFilter `json:"Filters,omitempty" name:"Filters"`
+ // 过滤条件,Filters.Values的上限为20。详细的过滤条件如下:
+ // zone-id
按照【站点ID】进行过滤。站点ID形如:zone-1a8df68z
类型:String
必选:否
模糊查询:不支持
+ // load-balancing-id
按照【负载均衡ID】进行过滤。负载均衡ID形如:lb-d21bfaf7-8d72-11ec-841d-00ff977fb3c8
类型:String
必选:否
模糊查询:不支持
+ // host
按照【负载均衡host】进行过滤。host形如:lb.tencent.com
类型:String
必选:否
模糊查询:支持,模糊查询时仅支持一个host
+ Filters []*AdvancedFilter `json:"Filters,omitempty" name:"Filters"`
}
-func (r *DescribeRulesRequest) ToJsonString() string {
+func (r *DescribeLoadBalancingRequest) 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 *DescribeRulesRequest) FromJsonString(s string) error {
+func (r *DescribeLoadBalancingRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "ZoneId")
+ delete(f, "Offset")
+ delete(f, "Limit")
delete(f, "Filters")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeRulesRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeLoadBalancingRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeRulesResponseParams struct {
- // 站点 ID。
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+type DescribeLoadBalancingResponseParams struct {
+ // 记录总数。
+ TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
- // 规则列表,按规则执行顺序从先往后排序。
- RuleList []*RuleSettingDetail `json:"RuleList,omitempty" name:"RuleList"`
+ // 负载均衡信息。
+ Data []*LoadBalancing `json:"Data,omitempty" name:"Data"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeRulesResponse struct {
+type DescribeLoadBalancingResponse struct {
*tchttp.BaseResponse
- Response *DescribeRulesResponseParams `json:"Response"`
+ Response *DescribeLoadBalancingResponseParams `json:"Response"`
}
-func (r *DescribeRulesResponse) ToJsonString() string {
+func (r *DescribeLoadBalancingResponse) 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 *DescribeRulesResponse) FromJsonString(s string) error {
+func (r *DescribeLoadBalancingResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeRulesSettingRequestParams struct {
+type DescribeLogSetsRequestParams struct {
+ // 日志集所属的地域。
+ LogSetRegion *string `json:"LogSetRegion,omitempty" name:"LogSetRegion"`
+
+ // 日志集ID。
+ LogSetId *string `json:"LogSetId,omitempty" name:"LogSetId"`
+ // 日志集名称。
+ LogSetName *string `json:"LogSetName,omitempty" name:"LogSetName"`
}
-type DescribeRulesSettingRequest struct {
+type DescribeLogSetsRequest struct {
*tchttp.BaseRequest
+ // 日志集所属的地域。
+ LogSetRegion *string `json:"LogSetRegion,omitempty" name:"LogSetRegion"`
+
+ // 日志集ID。
+ LogSetId *string `json:"LogSetId,omitempty" name:"LogSetId"`
+
+ // 日志集名称。
+ LogSetName *string `json:"LogSetName,omitempty" name:"LogSetName"`
}
-func (r *DescribeRulesSettingRequest) ToJsonString() string {
+func (r *DescribeLogSetsRequest) 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 *DescribeRulesSettingRequest) FromJsonString(s string) error {
+func (r *DescribeLogSetsRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
-
+ delete(f, "LogSetRegion")
+ delete(f, "LogSetId")
+ delete(f, "LogSetName")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeRulesSettingRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeLogSetsRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeRulesSettingResponseParams struct {
- // 规则引擎可应用匹配请求的设置列表及其详细建议配置信息。
- Actions []*RulesSettingAction `json:"Actions,omitempty" name:"Actions"`
+type DescribeLogSetsResponseParams struct {
+ // 日志集列表数据。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ LogSetList []*LogSetInfo `json:"LogSetList,omitempty" name:"LogSetList"`
+
+ // 查询结果的总条数。
+ TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeRulesSettingResponse struct {
+type DescribeLogSetsResponse struct {
*tchttp.BaseResponse
- Response *DescribeRulesSettingResponseParams `json:"Response"`
+ Response *DescribeLogSetsResponseParams `json:"Response"`
}
-func (r *DescribeRulesSettingResponse) ToJsonString() string {
+func (r *DescribeLogSetsResponse) 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 *DescribeRulesSettingResponse) FromJsonString(s string) error {
+func (r *DescribeLogSetsResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeSecurityPolicyListRequestParams struct {
- // 一级域名
+type DescribeLogTopicTaskDetailRequestParams struct {
+ // 推送任务ID。
+ TopicId *string `json:"TopicId,omitempty" name:"TopicId"`
+
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
}
-type DescribeSecurityPolicyListRequest struct {
+type DescribeLogTopicTaskDetailRequest struct {
*tchttp.BaseRequest
- // 一级域名
+ // 推送任务ID。
+ TopicId *string `json:"TopicId,omitempty" name:"TopicId"`
+
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
}
-func (r *DescribeSecurityPolicyListRequest) ToJsonString() string {
+func (r *DescribeLogTopicTaskDetailRequest) 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 *DescribeSecurityPolicyListRequest) FromJsonString(s string) error {
+func (r *DescribeLogTopicTaskDetailRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
+ delete(f, "TopicId")
delete(f, "ZoneId")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeSecurityPolicyListRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeLogTopicTaskDetailRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeSecurityPolicyListResponseParams struct {
- // 防护资源列表
- Entities []*SecurityEntity `json:"Entities,omitempty" name:"Entities"`
+type DescribeLogTopicTaskDetailResponseParams struct {
+ // 推送任务详情。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ LogTopicDetailInfo *LogTopicDetailInfo `json:"LogTopicDetailInfo,omitempty" name:"LogTopicDetailInfo"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeSecurityPolicyListResponse struct {
+type DescribeLogTopicTaskDetailResponse struct {
*tchttp.BaseResponse
- Response *DescribeSecurityPolicyListResponseParams `json:"Response"`
+ Response *DescribeLogTopicTaskDetailResponseParams `json:"Response"`
}
-func (r *DescribeSecurityPolicyListResponse) ToJsonString() string {
+func (r *DescribeLogTopicTaskDetailResponse) 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 *DescribeSecurityPolicyListResponse) FromJsonString(s string) error {
+func (r *DescribeLogTopicTaskDetailResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeSecurityPolicyManagedRulesIdRequestParams struct {
- // 规则id集合
- RuleId []*int64 `json:"RuleId,omitempty" name:"RuleId"`
+type DescribeLogTopicTasksRequestParams struct {
+ // 站点ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
+ Limit *uint64 `json:"Limit,omitempty" name:"Limit"`
+
+ // 分页的偏移量,默认值为0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
}
-type DescribeSecurityPolicyManagedRulesIdRequest struct {
+type DescribeLogTopicTasksRequest struct {
*tchttp.BaseRequest
- // 规则id集合
- RuleId []*int64 `json:"RuleId,omitempty" name:"RuleId"`
+ // 站点ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
+ Limit *uint64 `json:"Limit,omitempty" name:"Limit"`
+
+ // 分页的偏移量,默认值为0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
}
-func (r *DescribeSecurityPolicyManagedRulesIdRequest) ToJsonString() string {
+func (r *DescribeLogTopicTasksRequest) 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 *DescribeSecurityPolicyManagedRulesIdRequest) FromJsonString(s string) error {
+func (r *DescribeLogTopicTasksRequest) 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, "ZoneId")
+ delete(f, "Limit")
+ delete(f, "Offset")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeSecurityPolicyManagedRulesIdRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeLogTopicTasksRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeSecurityPolicyManagedRulesIdResponseParams struct {
- // 返回总数
- Total *int64 `json:"Total,omitempty" name:"Total"`
-
- // 门神规则
- Rules []*ManagedRule `json:"Rules,omitempty" name:"Rules"`
+type DescribeLogTopicTasksResponseParams struct {
+ // 推送任务列表。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ TopicList []*ClsLogTopicInfo `json:"TopicList,omitempty" name:"TopicList"`
- // 返回总数
- Count *int64 `json:"Count,omitempty" name:"Count"`
+ // 查询结果的总条数。
+ TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeSecurityPolicyManagedRulesIdResponse struct {
+type DescribeLogTopicTasksResponse struct {
*tchttp.BaseResponse
- Response *DescribeSecurityPolicyManagedRulesIdResponseParams `json:"Response"`
+ Response *DescribeLogTopicTasksResponseParams `json:"Response"`
}
-func (r *DescribeSecurityPolicyManagedRulesIdResponse) ToJsonString() string {
+func (r *DescribeLogTopicTasksResponse) 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 *DescribeSecurityPolicyManagedRulesIdResponse) FromJsonString(s string) error {
+func (r *DescribeLogTopicTasksResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeSecurityPolicyManagedRulesRequestParams struct {
- // 一级域名
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
-
- // 子域名/应用名
- Entity *string `json:"Entity,omitempty" name:"Entity"`
+type DescribeOriginGroupRequestParams struct {
+ // 分页查询偏移量,默认为0。
+ Offset *uint64 `json:"Offset,omitempty" name:"Offset"`
- // 页数
- Page *int64 `json:"Page,omitempty" name:"Page"`
+ // 分页查询限制数目,默认为10,取值:1-1000。
+ Limit *uint64 `json:"Limit,omitempty" name:"Limit"`
- // 每页数量
- PerPage *int64 `json:"PerPage,omitempty" name:"PerPage"`
+ // 过滤条件,Filters.Values的上限为20。详细的过滤条件如下:
+ // zone-id
按照【站点ID】进行过滤。站点ID形如:zone-20hzkd4rdmy0
类型:String
必选:否
模糊查询:不支持origin-group-id
按照【源站组ID】进行过滤。源站组ID形如:origin-2ccgtb24-7dc5-46s2-9r3e-95825d53dwe3a
类型:String
必选:否
模糊查询:不支持origin-group-name
按照【源站组名称】进行过滤
类型:String
必选:否
模糊查询:支持。使用模糊查询时,仅支持填写一个源站组名称
+ Filters []*AdvancedFilter `json:"Filters,omitempty" name:"Filters"`
}
-type DescribeSecurityPolicyManagedRulesRequest struct {
+type DescribeOriginGroupRequest struct {
*tchttp.BaseRequest
- // 一级域名
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
-
- // 子域名/应用名
- Entity *string `json:"Entity,omitempty" name:"Entity"`
+ // 分页查询偏移量,默认为0。
+ Offset *uint64 `json:"Offset,omitempty" name:"Offset"`
- // 页数
- Page *int64 `json:"Page,omitempty" name:"Page"`
+ // 分页查询限制数目,默认为10,取值:1-1000。
+ Limit *uint64 `json:"Limit,omitempty" name:"Limit"`
- // 每页数量
- PerPage *int64 `json:"PerPage,omitempty" name:"PerPage"`
+ // 过滤条件,Filters.Values的上限为20。详细的过滤条件如下:
+ // zone-id
按照【站点ID】进行过滤。站点ID形如:zone-20hzkd4rdmy0
类型:String
必选:否
模糊查询:不支持origin-group-id
按照【源站组ID】进行过滤。源站组ID形如:origin-2ccgtb24-7dc5-46s2-9r3e-95825d53dwe3a
类型:String
必选:否
模糊查询:不支持origin-group-name
按照【源站组名称】进行过滤
类型:String
必选:否
模糊查询:支持。使用模糊查询时,仅支持填写一个源站组名称
+ Filters []*AdvancedFilter `json:"Filters,omitempty" name:"Filters"`
}
-func (r *DescribeSecurityPolicyManagedRulesRequest) ToJsonString() string {
+func (r *DescribeOriginGroupRequest) 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 *DescribeSecurityPolicyManagedRulesRequest) FromJsonString(s string) error {
+func (r *DescribeOriginGroupRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "ZoneId")
- delete(f, "Entity")
- delete(f, "Page")
- delete(f, "PerPage")
+ delete(f, "Offset")
+ delete(f, "Limit")
+ delete(f, "Filters")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeSecurityPolicyManagedRulesRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeOriginGroupRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeSecurityPolicyManagedRulesResponseParams struct {
- // 本次返回的规则数
- Count *int64 `json:"Count,omitempty" name:"Count"`
-
- // 门神规则
- Rules []*ManagedRule `json:"Rules,omitempty" name:"Rules"`
+type DescribeOriginGroupResponseParams struct {
+ // 记录总数。
+ TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
- // 总规则数
- Total *int64 `json:"Total,omitempty" name:"Total"`
+ // 源站组信息。
+ OriginGroups []*OriginGroup `json:"OriginGroups,omitempty" name:"OriginGroups"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeSecurityPolicyManagedRulesResponse struct {
+type DescribeOriginGroupResponse struct {
*tchttp.BaseResponse
- Response *DescribeSecurityPolicyManagedRulesResponseParams `json:"Response"`
+ Response *DescribeOriginGroupResponseParams `json:"Response"`
}
-func (r *DescribeSecurityPolicyManagedRulesResponse) ToJsonString() string {
+func (r *DescribeOriginGroupResponse) 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 *DescribeSecurityPolicyManagedRulesResponse) FromJsonString(s string) error {
+func (r *DescribeOriginGroupResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeSecurityPolicyRegionsRequestParams struct {
+type DescribeOverviewL7DataRequestParams struct {
+ // 开始时间。
+ StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
+
+ // 结束时间。
+ EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
+
+ // 查询的指标,取值有:
+ // l7Flow_outFlux: 访问流量;
+ // l7Flow_request: 访问请求数;
+ // l7Flow_outBandwidth: 访问带宽;
+ // l7Flow_hit_outFlux: 缓存命中流量。
+ MetricNames []*string `json:"MetricNames,omitempty" name:"MetricNames"`
+
+ // 查询的站点集合,不填默认查询所有站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+
+ // 查询的域名集合,不填默认查询所有子域名。
+ Domains []*string `json:"Domains,omitempty" name:"Domains"`
+
+ // 查询的协议类型,取值有:
+ // http: http协议;
+ // https: https协议;
+ // http2: http2协议;
+ // all: 所有协议。不填默认为: all,表示查询所有协议。
+ Protocol *string `json:"Protocol,omitempty" name:"Protocol"`
+
+ // 查询时间粒度,取值有:
+ // min:1分钟;
+ // 5min:5分钟;
+ // hour:1小时;
+ // day:1天。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
+
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户的地域智能选择地区。
+ Area *string `json:"Area,omitempty" name:"Area"`
+ // 过滤条件,Filters.Values的上限为20。详细的过滤条件如下:
+ // tagKey
按照【标签Key】进行过滤。
类型:String
必选:否
+ // tagValue
按照【标签Value】进行过滤。
类型:String
必选:否
+ Filters []*QueryCondition `json:"Filters,omitempty" name:"Filters"`
}
-type DescribeSecurityPolicyRegionsRequest struct {
+type DescribeOverviewL7DataRequest struct {
*tchttp.BaseRequest
+ // 开始时间。
+ StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
+
+ // 结束时间。
+ EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
+
+ // 查询的指标,取值有:
+ // l7Flow_outFlux: 访问流量;
+ // l7Flow_request: 访问请求数;
+ // l7Flow_outBandwidth: 访问带宽;
+ // l7Flow_hit_outFlux: 缓存命中流量。
+ MetricNames []*string `json:"MetricNames,omitempty" name:"MetricNames"`
+
+ // 查询的站点集合,不填默认查询所有站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+
+ // 查询的域名集合,不填默认查询所有子域名。
+ Domains []*string `json:"Domains,omitempty" name:"Domains"`
+
+ // 查询的协议类型,取值有:
+ // http: http协议;
+ // https: https协议;
+ // http2: http2协议;
+ // all: 所有协议。不填默认为: all,表示查询所有协议。
+ Protocol *string `json:"Protocol,omitempty" name:"Protocol"`
+
+ // 查询时间粒度,取值有:
+ // min:1分钟;
+ // 5min:5分钟;
+ // hour:1小时;
+ // day:1天。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
+
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户的地域智能选择地区。
+ Area *string `json:"Area,omitempty" name:"Area"`
+
+ // 过滤条件,Filters.Values的上限为20。详细的过滤条件如下:
+ // tagKey
按照【标签Key】进行过滤。
类型:String
必选:否
+ // tagValue
按照【标签Value】进行过滤。
类型:String
必选:否
+ Filters []*QueryCondition `json:"Filters,omitempty" name:"Filters"`
}
-func (r *DescribeSecurityPolicyRegionsRequest) ToJsonString() string {
+func (r *DescribeOverviewL7DataRequest) 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 *DescribeSecurityPolicyRegionsRequest) FromJsonString(s string) error {
+func (r *DescribeOverviewL7DataRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
-
+ delete(f, "StartTime")
+ delete(f, "EndTime")
+ delete(f, "MetricNames")
+ delete(f, "ZoneIds")
+ delete(f, "Domains")
+ delete(f, "Protocol")
+ delete(f, "Interval")
+ delete(f, "Area")
+ delete(f, "Filters")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeSecurityPolicyRegionsRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeOverviewL7DataRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeSecurityPolicyRegionsResponseParams struct {
- // 总数
- Count *int64 `json:"Count,omitempty" name:"Count"`
+type DescribeOverviewL7DataResponseParams struct {
+ // 查询结果的总条数。
+ TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
- // 地域信息
- GeoIp []*GeoIp `json:"GeoIp,omitempty" name:"GeoIp"`
+ // 七层监控类时序流量数据列表。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Data []*TimingDataRecord `json:"Data,omitempty" name:"Data"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeSecurityPolicyRegionsResponse struct {
+type DescribeOverviewL7DataResponse struct {
+ *tchttp.BaseResponse
+ Response *DescribeOverviewL7DataResponseParams `json:"Response"`
+}
+
+func (r *DescribeOverviewL7DataResponse) 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 *DescribeOverviewL7DataResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribePrefetchTasksRequestParams struct {
+ // 查询起始时间。
+ StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
+
+ // 查询结束时间。
+ EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
+
+ // 分页查询偏移量,默认为 0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+
+ // 分页查询限制数目,默认值:20,上限:1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
+
+ // 过滤条件,Filters.Values的上限为20。详细的过滤条件如下:
+ // zone-id
按照【站点 ID】进行过滤。zone-id形如:zone-1379afjk91u32h,暂不支持多值。
类型:String
必选:否。
模糊查询:不支持。job-id
按照【任务ID】进行过滤。job-id形如:1379afjk91u32h,暂不支持多值。
类型:String
必选:否。
模糊查询:不支持。target
按照【目标资源信息】进行过滤。target形如:http://www.qq.com/1.txt,暂不支持多值。
类型:String
必选:否。
模糊查询:不支持。domains
按照【域名】进行过滤。domains形如:www.qq.com。
类型:String
必选:否。
模糊查询:不支持。statuses
按照【任务状态】进行过滤。
必选:否
模糊查询:不支持。
可选项:
processing:处理中
success:成功
failed:失败
timeout:超时
+ Filters []*AdvancedFilter `json:"Filters,omitempty" name:"Filters"`
+}
+
+type DescribePrefetchTasksRequest struct {
+ *tchttp.BaseRequest
+
+ // 查询起始时间。
+ StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
+
+ // 查询结束时间。
+ EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
+
+ // 分页查询偏移量,默认为 0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+
+ // 分页查询限制数目,默认值:20,上限:1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
+
+ // 过滤条件,Filters.Values的上限为20。详细的过滤条件如下:
+ // zone-id
按照【站点 ID】进行过滤。zone-id形如:zone-1379afjk91u32h,暂不支持多值。
类型:String
必选:否。
模糊查询:不支持。job-id
按照【任务ID】进行过滤。job-id形如:1379afjk91u32h,暂不支持多值。
类型:String
必选:否。
模糊查询:不支持。target
按照【目标资源信息】进行过滤。target形如:http://www.qq.com/1.txt,暂不支持多值。
类型:String
必选:否。
模糊查询:不支持。domains
按照【域名】进行过滤。domains形如:www.qq.com。
类型:String
必选:否。
模糊查询:不支持。statuses
按照【任务状态】进行过滤。
必选:否
模糊查询:不支持。
可选项:
processing:处理中
success:成功
failed:失败
timeout:超时
+ Filters []*AdvancedFilter `json:"Filters,omitempty" name:"Filters"`
+}
+
+func (r *DescribePrefetchTasksRequest) 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 *DescribePrefetchTasksRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "StartTime")
+ delete(f, "EndTime")
+ delete(f, "Offset")
+ delete(f, "Limit")
+ delete(f, "Filters")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePrefetchTasksRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribePrefetchTasksResponseParams struct {
+ // 该查询条件总共条目数。
+ TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
+
+ // 任务结果列表。
+ Tasks []*Task `json:"Tasks,omitempty" name:"Tasks"`
+
+ // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
+}
+
+type DescribePrefetchTasksResponse struct {
+ *tchttp.BaseResponse
+ Response *DescribePrefetchTasksResponseParams `json:"Response"`
+}
+
+func (r *DescribePrefetchTasksResponse) 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 *DescribePrefetchTasksResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribePurgeTasksRequestParams struct {
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 查询起始时间。
+ StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
+
+ // 查询结束时间。
+ EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
+
+ // 分页查询偏移量,默认为0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+
+ // 分页查限制数目,默认值:20,最大值:1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
+
+ // 过滤条件,Filters.Values的上限为20。详细的过滤条件如下:
+ // job-id
按照【任务ID】进行过滤。job-id形如:1379afjk91u32h,暂不支持多值。
类型:String
必选:否
模糊查询:不支持。target
按照【目标资源信息】进行过滤。target形如:http://www.qq.com/1.txt,暂不支持多值。
类型:String
必选:否
模糊查询:不支持。domains
按照【域名】进行过滤。domains形如:www.qq.com。
类型:String
必选:否
模糊查询:不支持。statuses
按照【任务状态】进行过滤。
必选:否
模糊查询:不支持。
可选项:
processing:处理中
success:成功
failed:失败
timeout:超时type
按照【清除缓存类型】进行过滤,暂不支持多值。
类型:String
必选:否
模糊查询:不支持。
可选项:
purge_url:URL
purge_prefix:前缀
purge_all:全部缓存内容
purge_host:Hostname
+ Filters []*AdvancedFilter `json:"Filters,omitempty" name:"Filters"`
+}
+
+type DescribePurgeTasksRequest struct {
+ *tchttp.BaseRequest
+
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 查询起始时间。
+ StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
+
+ // 查询结束时间。
+ EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
+
+ // 分页查询偏移量,默认为0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+
+ // 分页查限制数目,默认值:20,最大值:1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
+
+ // 过滤条件,Filters.Values的上限为20。详细的过滤条件如下:
+ // job-id
按照【任务ID】进行过滤。job-id形如:1379afjk91u32h,暂不支持多值。
类型:String
必选:否
模糊查询:不支持。target
按照【目标资源信息】进行过滤。target形如:http://www.qq.com/1.txt,暂不支持多值。
类型:String
必选:否
模糊查询:不支持。domains
按照【域名】进行过滤。domains形如:www.qq.com。
类型:String
必选:否
模糊查询:不支持。statuses
按照【任务状态】进行过滤。
必选:否
模糊查询:不支持。
可选项:
processing:处理中
success:成功
failed:失败
timeout:超时type
按照【清除缓存类型】进行过滤,暂不支持多值。
类型:String
必选:否
模糊查询:不支持。
可选项:
purge_url:URL
purge_prefix:前缀
purge_all:全部缓存内容
purge_host:Hostname
+ Filters []*AdvancedFilter `json:"Filters,omitempty" name:"Filters"`
+}
+
+func (r *DescribePurgeTasksRequest) 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 *DescribePurgeTasksRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "ZoneId")
+ delete(f, "StartTime")
+ delete(f, "EndTime")
+ delete(f, "Offset")
+ delete(f, "Limit")
+ delete(f, "Filters")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePurgeTasksRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribePurgeTasksResponseParams struct {
+ // 该查询条件总共条目数。
+ TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
+
+ // 任务结果列表。
+ Tasks []*Task `json:"Tasks,omitempty" name:"Tasks"`
+
+ // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
+}
+
+type DescribePurgeTasksResponse struct {
+ *tchttp.BaseResponse
+ Response *DescribePurgeTasksResponseParams `json:"Response"`
+}
+
+func (r *DescribePurgeTasksResponse) 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 *DescribePurgeTasksResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeRateLimitIntelligenceRuleRequestParams struct {
+ // 站点Id。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 子域名/应用名。
+ Entity *string `json:"Entity,omitempty" name:"Entity"`
+}
+
+type DescribeRateLimitIntelligenceRuleRequest struct {
+ *tchttp.BaseRequest
+
+ // 站点Id。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 子域名/应用名。
+ Entity *string `json:"Entity,omitempty" name:"Entity"`
+}
+
+func (r *DescribeRateLimitIntelligenceRuleRequest) 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 *DescribeRateLimitIntelligenceRuleRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "ZoneId")
+ delete(f, "Entity")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeRateLimitIntelligenceRuleRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeRateLimitIntelligenceRuleResponseParams struct {
+ // 速率限制智能规则。
+ RateLimitIntelligenceRuleDetails []*RateLimitIntelligenceRuleDetail `json:"RateLimitIntelligenceRuleDetails,omitempty" name:"RateLimitIntelligenceRuleDetails"`
+
+ // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
+}
+
+type DescribeRateLimitIntelligenceRuleResponse struct {
+ *tchttp.BaseResponse
+ Response *DescribeRateLimitIntelligenceRuleResponseParams `json:"Response"`
+}
+
+func (r *DescribeRateLimitIntelligenceRuleResponse) 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 *DescribeRateLimitIntelligenceRuleResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeRulesRequestParams struct {
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 过滤条件,Filters.Values的上限为20。详细的过滤条件如下:
+ // rule-id
按照【规则ID】进行过滤。
类型:string
必选:否
+ Filters []*Filter `json:"Filters,omitempty" name:"Filters"`
+}
+
+type DescribeRulesRequest struct {
+ *tchttp.BaseRequest
+
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 过滤条件,Filters.Values的上限为20。详细的过滤条件如下:
+ // rule-id
按照【规则ID】进行过滤。
类型:string
必选:否
+ Filters []*Filter `json:"Filters,omitempty" name:"Filters"`
+}
+
+func (r *DescribeRulesRequest) 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 *DescribeRulesRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "ZoneId")
+ delete(f, "Filters")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeRulesRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeRulesResponseParams struct {
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 规则列表,按规则执行顺序从先往后排序。
+ RuleItems []*RuleItem `json:"RuleItems,omitempty" name:"RuleItems"`
+
+ // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
+}
+
+type DescribeRulesResponse struct {
+ *tchttp.BaseResponse
+ Response *DescribeRulesResponseParams `json:"Response"`
+}
+
+func (r *DescribeRulesResponse) 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 *DescribeRulesResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeRulesSettingRequestParams struct {
+
+}
+
+type DescribeRulesSettingRequest struct {
+ *tchttp.BaseRequest
+
+}
+
+func (r *DescribeRulesSettingRequest) 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 *DescribeRulesSettingRequest) 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", "DescribeRulesSettingRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeRulesSettingResponseParams struct {
+ // 规则引擎可应用匹配请求的设置列表及其详细建议配置信息。
+ Actions []*RulesSettingAction `json:"Actions,omitempty" name:"Actions"`
+
+ // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
+}
+
+type DescribeRulesSettingResponse struct {
+ *tchttp.BaseResponse
+ Response *DescribeRulesSettingResponseParams `json:"Response"`
+}
+
+func (r *DescribeRulesSettingResponse) 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 *DescribeRulesSettingResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeSecurityGroupManagedRulesRequestParams struct {
+ // 站点Id。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 子域名/应用名。
+ Entity *string `json:"Entity,omitempty" name:"Entity"`
+
+ // 分页查询偏移量。默认值:0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+
+ // 分页查询限制数目。默认值:20,最大值:1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
+}
+
+type DescribeSecurityGroupManagedRulesRequest struct {
+ *tchttp.BaseRequest
+
+ // 站点Id。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 子域名/应用名。
+ Entity *string `json:"Entity,omitempty" name:"Entity"`
+
+ // 分页查询偏移量。默认值:0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+
+ // 分页查询限制数目。默认值:20,最大值:1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
+}
+
+func (r *DescribeSecurityGroupManagedRulesRequest) 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 *DescribeSecurityGroupManagedRulesRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "ZoneId")
+ delete(f, "Entity")
+ delete(f, "Offset")
+ delete(f, "Limit")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeSecurityGroupManagedRulesRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeSecurityGroupManagedRulesResponseParams struct {
+ // 本次返回的规则数。
+ Count *int64 `json:"Count,omitempty" name:"Count"`
+
+ // 总规则数。
+ Total *int64 `json:"Total,omitempty" name:"Total"`
+
+ // 托管规则信息。
+ WafGroupInfo *WafGroupInfo `json:"WafGroupInfo,omitempty" name:"WafGroupInfo"`
+
+ // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
+}
+
+type DescribeSecurityGroupManagedRulesResponse struct {
+ *tchttp.BaseResponse
+ Response *DescribeSecurityGroupManagedRulesResponseParams `json:"Response"`
+}
+
+func (r *DescribeSecurityGroupManagedRulesResponse) 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 *DescribeSecurityGroupManagedRulesResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeSecurityPolicyListRequestParams struct {
+ // 站点Id。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+}
+
+type DescribeSecurityPolicyListRequest struct {
+ *tchttp.BaseRequest
+
+ // 站点Id。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+}
+
+func (r *DescribeSecurityPolicyListRequest) 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 *DescribeSecurityPolicyListRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "ZoneId")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeSecurityPolicyListRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeSecurityPolicyListResponseParams struct {
+ // 防护资源列表。
+ SecurityEntities []*SecurityEntity `json:"SecurityEntities,omitempty" name:"SecurityEntities"`
+
+ // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
+}
+
+type DescribeSecurityPolicyListResponse struct {
+ *tchttp.BaseResponse
+ Response *DescribeSecurityPolicyListResponseParams `json:"Response"`
+}
+
+func (r *DescribeSecurityPolicyListResponse) 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 *DescribeSecurityPolicyListResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeSecurityPolicyRegionsRequestParams struct {
+ // 分页查询偏移量。默认值:0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+
+ // 分页查询限制数目。默认值:20,最大值:1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
+}
+
+type DescribeSecurityPolicyRegionsRequest struct {
+ *tchttp.BaseRequest
+
+ // 分页查询偏移量。默认值:0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+
+ // 分页查询限制数目。默认值:20,最大值:1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
+}
+
+func (r *DescribeSecurityPolicyRegionsRequest) 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 *DescribeSecurityPolicyRegionsRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "Offset")
+ delete(f, "Limit")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeSecurityPolicyRegionsRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeSecurityPolicyRegionsResponseParams struct {
+ // 总地域信息数。
+ Count *int64 `json:"Count,omitempty" name:"Count"`
+
+ // 地域信息。
+ GeoIps []*GeoIp `json:"GeoIps,omitempty" name:"GeoIps"`
+
+ // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
+}
+
+type DescribeSecurityPolicyRegionsResponse struct {
*tchttp.BaseResponse
Response *DescribeSecurityPolicyRegionsResponseParams `json:"Response"`
}
-func (r *DescribeSecurityPolicyRegionsResponse) ToJsonString() string {
+func (r *DescribeSecurityPolicyRegionsResponse) 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 *DescribeSecurityPolicyRegionsResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeSecurityPolicyRequestParams struct {
+ // 站点Id。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 子域名/应用名。
+ Entity *string `json:"Entity,omitempty" name:"Entity"`
+}
+
+type DescribeSecurityPolicyRequest struct {
+ *tchttp.BaseRequest
+
+ // 站点Id。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 子域名/应用名。
+ Entity *string `json:"Entity,omitempty" name:"Entity"`
+}
+
+func (r *DescribeSecurityPolicyRequest) 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 *DescribeSecurityPolicyRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "ZoneId")
+ delete(f, "Entity")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeSecurityPolicyRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeSecurityPolicyResponseParams struct {
+ // 安全配置。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ SecurityConfig *SecurityConfig `json:"SecurityConfig,omitempty" name:"SecurityConfig"`
+
+ // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
+}
+
+type DescribeSecurityPolicyResponse struct {
+ *tchttp.BaseResponse
+ Response *DescribeSecurityPolicyResponseParams `json:"Response"`
+}
+
+func (r *DescribeSecurityPolicyResponse) 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 *DescribeSecurityPolicyResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeSecurityPortraitRulesRequestParams struct {
+ // 站点Id。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 子域名/应用名。
+ Entity *string `json:"Entity,omitempty" name:"Entity"`
+}
+
+type DescribeSecurityPortraitRulesRequest struct {
+ *tchttp.BaseRequest
+
+ // 站点Id。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 子域名/应用名。
+ Entity *string `json:"Entity,omitempty" name:"Entity"`
+}
+
+func (r *DescribeSecurityPortraitRulesRequest) 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 *DescribeSecurityPortraitRulesRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "ZoneId")
+ delete(f, "Entity")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeSecurityPortraitRulesRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeSecurityPortraitRulesResponseParams struct {
+ // 本次返回的规则数。
+ Count *int64 `json:"Count,omitempty" name:"Count"`
+
+ // Bot用户画像规则。
+ PortraitManagedRuleDetails []*PortraitManagedRuleDetail `json:"PortraitManagedRuleDetails,omitempty" name:"PortraitManagedRuleDetails"`
+
+ // 总规则数。
+ Total *int64 `json:"Total,omitempty" name:"Total"`
+
+ // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
+}
+
+type DescribeSecurityPortraitRulesResponse struct {
+ *tchttp.BaseResponse
+ Response *DescribeSecurityPortraitRulesResponseParams `json:"Response"`
+}
+
+func (r *DescribeSecurityPortraitRulesResponse) 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 *DescribeSecurityPolicyRegionsResponse) FromJsonString(s string) error {
+func (r *DescribeSecurityPortraitRulesResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeSecurityPolicyRequestParams struct {
- // 一级域名
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+type DescribeSecurityRuleIdRequestParams struct {
+ // 规则Id数组。
+ RuleIdList []*int64 `json:"RuleIdList,omitempty" name:"RuleIdList"`
- // 二级域名
+ // 规则类型,取值有:
+ // waf:web托管规则;
+ // acl:自定义规则;
+ // rate:速率限制规则;
+ // bot:Bot基础规则。
+ RuleType *string `json:"RuleType,omitempty" name:"RuleType"`
+
+ // 子域名/应用名。
Entity *string `json:"Entity,omitempty" name:"Entity"`
}
-type DescribeSecurityPolicyRequest struct {
+type DescribeSecurityRuleIdRequest struct {
*tchttp.BaseRequest
- // 一级域名
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+ // 规则Id数组。
+ RuleIdList []*int64 `json:"RuleIdList,omitempty" name:"RuleIdList"`
+
+ // 规则类型,取值有:
+ // waf:web托管规则;
+ // acl:自定义规则;
+ // rate:速率限制规则;
+ // bot:Bot基础规则。
+ RuleType *string `json:"RuleType,omitempty" name:"RuleType"`
- // 二级域名
+ // 子域名/应用名。
Entity *string `json:"Entity,omitempty" name:"Entity"`
}
-func (r *DescribeSecurityPolicyRequest) ToJsonString() string {
+func (r *DescribeSecurityRuleIdRequest) 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 *DescribeSecurityPolicyRequest) FromJsonString(s string) error {
+func (r *DescribeSecurityRuleIdRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "ZoneId")
+ delete(f, "RuleIdList")
+ delete(f, "RuleType")
delete(f, "Entity")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeSecurityPolicyRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeSecurityRuleIdRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeSecurityPolicyResponseParams struct {
- // 用户id
- AppId *int64 `json:"AppId,omitempty" name:"AppId"`
+type DescribeSecurityRuleIdResponseParams struct {
+ // 规则列表。
+ WafGroupRules []*WafGroupRule `json:"WafGroupRules,omitempty" name:"WafGroupRules"`
- // 一级域名
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+ // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
+}
- // 二级域名
- Entity *string `json:"Entity,omitempty" name:"Entity"`
+type DescribeSecurityRuleIdResponse struct {
+ *tchttp.BaseResponse
+ Response *DescribeSecurityRuleIdResponseParams `json:"Response"`
+}
+
+func (r *DescribeSecurityRuleIdResponse) 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 *DescribeSecurityRuleIdResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeSingleL7AnalysisDataRequestParams struct {
+ // 开始时间。
+ StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
+
+ // 结束时间。
+ EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
+
+ // 查询的指标,取值有:
+ // l7Flow_singleIpRequest:独立IP请求数。
+ MetricNames []*string `json:"MetricNames,omitempty" name:"MetricNames"`
+
+ // 查询的站点集合,不填默认查询所有站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+
+ // 筛选条件, key可选的值有:
+ // country:国家/地区;
+ // domain:域名;
+ // protocol:协议类型;
+ // tagKey:标签Key;
+ // tagValue;标签Value。
+ Filters []*QueryCondition `json:"Filters,omitempty" name:"Filters"`
+
+ // 查询时间粒度,取值有:
+ // min:1分钟;
+ // 5min:5分钟;
+ // hour:1小时;
+ // day:1天;。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
- // 安全配置
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
+ Area *string `json:"Area,omitempty" name:"Area"`
+}
+
+type DescribeSingleL7AnalysisDataRequest struct {
+ *tchttp.BaseRequest
+
+ // 开始时间。
+ StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
+
+ // 结束时间。
+ EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
+
+ // 查询的指标,取值有:
+ // l7Flow_singleIpRequest:独立IP请求数。
+ MetricNames []*string `json:"MetricNames,omitempty" name:"MetricNames"`
+
+ // 查询的站点集合,不填默认查询所有站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+
+ // 筛选条件, key可选的值有:
+ // country:国家/地区;
+ // domain:域名;
+ // protocol:协议类型;
+ // tagKey:标签Key;
+ // tagValue;标签Value。
+ Filters []*QueryCondition `json:"Filters,omitempty" name:"Filters"`
+
+ // 查询时间粒度,取值有:
+ // min:1分钟;
+ // 5min:5分钟;
+ // hour:1小时;
+ // day:1天;。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
+
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
+ Area *string `json:"Area,omitempty" name:"Area"`
+}
+
+func (r *DescribeSingleL7AnalysisDataRequest) 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 *DescribeSingleL7AnalysisDataRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "StartTime")
+ delete(f, "EndTime")
+ delete(f, "MetricNames")
+ delete(f, "ZoneIds")
+ delete(f, "Filters")
+ delete(f, "Interval")
+ delete(f, "Area")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeSingleL7AnalysisDataRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeSingleL7AnalysisDataResponseParams struct {
+ // 查询结果的总条数。
+ TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
+
+ // 单值流量数据列表。
// 注意:此字段可能返回 null,表示取不到有效值。
- Config *SecurityConfig `json:"Config,omitempty" name:"Config"`
+ Data []*SingleDataRecord `json:"Data,omitempty" name:"Data"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeSecurityPolicyResponse struct {
+type DescribeSingleL7AnalysisDataResponse struct {
*tchttp.BaseResponse
- Response *DescribeSecurityPolicyResponseParams `json:"Response"`
+ Response *DescribeSingleL7AnalysisDataResponseParams `json:"Response"`
}
-func (r *DescribeSecurityPolicyResponse) ToJsonString() string {
+func (r *DescribeSingleL7AnalysisDataResponse) 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 *DescribeSecurityPolicyResponse) FromJsonString(s string) error {
+func (r *DescribeSingleL7AnalysisDataResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeSecurityPortraitRulesRequestParams struct {
- // 一级域名
+type DescribeSpeedTestingDetailsRequestParams struct {
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
-
- // 子域名/应用名
- Entity *string `json:"Entity,omitempty" name:"Entity"`
}
-type DescribeSecurityPortraitRulesRequest struct {
+type DescribeSpeedTestingDetailsRequest struct {
*tchttp.BaseRequest
- // 一级域名
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+}
- // 子域名/应用名
- Entity *string `json:"Entity,omitempty" name:"Entity"`
+func (r *DescribeSpeedTestingDetailsRequest) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
}
-func (r *DescribeSecurityPortraitRulesRequest) ToJsonString() string {
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *DescribeSpeedTestingDetailsRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "ZoneId")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeSpeedTestingDetailsRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeSpeedTestingDetailsResponseParams struct {
+ // 分地域拨测统计数据。
+ SpeedTestingDetailData *SpeedTestingDetailData `json:"SpeedTestingDetailData,omitempty" name:"SpeedTestingDetailData"`
+
+ // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
+}
+
+type DescribeSpeedTestingDetailsResponse struct {
+ *tchttp.BaseResponse
+ Response *DescribeSpeedTestingDetailsResponseParams `json:"Response"`
+}
+
+func (r *DescribeSpeedTestingDetailsResponse) 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 *DescribeSecurityPortraitRulesRequest) FromJsonString(s string) error {
+func (r *DescribeSpeedTestingDetailsResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeSpeedTestingMetricDataRequestParams struct {
+ // 站点ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+}
+
+type DescribeSpeedTestingMetricDataRequest struct {
+ *tchttp.BaseRequest
+
+ // 站点ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+}
+
+func (r *DescribeSpeedTestingMetricDataRequest) 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 *DescribeSpeedTestingMetricDataRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
delete(f, "ZoneId")
- delete(f, "Entity")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeSecurityPortraitRulesRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeSpeedTestingMetricDataRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeSecurityPortraitRulesResponseParams struct {
- // 本次返回的规则数
- Count *int64 `json:"Count,omitempty" name:"Count"`
+type DescribeSpeedTestingMetricDataResponseParams struct {
+ // 站点拨测维度数据。
+ SpeedTestingMetricData *SpeedTestingMetricData `json:"SpeedTestingMetricData,omitempty" name:"SpeedTestingMetricData"`
+
+ // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
+}
- // Bot用户画像规则
- Rules []*PortraitManagedRuleDetail `json:"Rules,omitempty" name:"Rules"`
+type DescribeSpeedTestingMetricDataResponse struct {
+ *tchttp.BaseResponse
+ Response *DescribeSpeedTestingMetricDataResponseParams `json:"Response"`
+}
- // 总规则数
- Total *int64 `json:"Total,omitempty" name:"Total"`
+func (r *DescribeSpeedTestingMetricDataResponse) 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 *DescribeSpeedTestingMetricDataResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeSpeedTestingQuotaRequestParams struct {
+ // 站点ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+}
+
+type DescribeSpeedTestingQuotaRequest struct {
+ *tchttp.BaseRequest
+
+ // 站点ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+}
+
+func (r *DescribeSpeedTestingQuotaRequest) 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 *DescribeSpeedTestingQuotaRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "ZoneId")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeSpeedTestingQuotaRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type DescribeSpeedTestingQuotaResponseParams struct {
+ // 配额数据。
+ SpeedTestingQuota *SpeedTestingQuota `json:"SpeedTestingQuota,omitempty" name:"SpeedTestingQuota"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeSecurityPortraitRulesResponse struct {
+type DescribeSpeedTestingQuotaResponse struct {
*tchttp.BaseResponse
- Response *DescribeSecurityPortraitRulesResponseParams `json:"Response"`
+ Response *DescribeSpeedTestingQuotaResponseParams `json:"Response"`
}
-func (r *DescribeSecurityPortraitRulesResponse) ToJsonString() string {
+func (r *DescribeSpeedTestingQuotaResponse) 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 *DescribeSecurityPortraitRulesResponse) FromJsonString(s string) error {
+func (r *DescribeSpeedTestingQuotaResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
type DescribeTimingL4DataRequestParams struct {
- // RFC3339格式,客户端时间
+ // 开始时间。
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // RFC3339格式,客户端时间
+ // 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 支持的指标:
- // l4Flow_connections: 访问连接数
- // l4Flow_flux: 访问总流量
- // l4Flow_inFlux: 访问入流量
- // l4Flow_outFlux: 访问出流量
+ // 查询指标,取值有:
+ // l4Flow_connections: 访问连接数;
+ // l4Flow_flux: 访问总流量;
+ // l4Flow_inFlux: 访问入流量;
+ // l4Flow_outFlux: 访问出流量;
+ // l4Flow_outPkt: 访问出包量。
MetricNames []*string `json:"MetricNames,omitempty" name:"MetricNames"`
- // 站点id列表
+ // 站点集合,不填默认选择全部站点。
ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // 该字段已废弃,请使用ProxyIds字段
- InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"`
-
- // 该字段当前无效
- Protocol *string `json:"Protocol,omitempty" name:"Protocol"`
+ // 四层实例列表, 不填表示选择全部实例。
+ ProxyIds []*string `json:"ProxyIds,omitempty" name:"ProxyIds"`
- // 时间间隔,选填{min, 5min, hour, day}
+ // 查询时间粒度,取值有:
+ // min: 1分钟 ;
+ // 5min: 5分钟 ;
+ // hour: 1小时 ;
+ // day: 1天 。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
Interval *string `json:"Interval,omitempty" name:"Interval"`
- // 该字段当前无效,请使用Filter筛选
- RuleId *string `json:"RuleId,omitempty" name:"RuleId"`
-
- // 支持的 Filter:proxyd,ruleId
- Filters []*Filter `json:"Filters,omitempty" name:"Filters"`
-
- // 四层实例列表
- ProxyIds []*string `json:"ProxyIds,omitempty" name:"ProxyIds"`
+ // 筛选条件, key可选的值有:
+ // ruleId: 根据规则Id进行过滤;
+ // proxyId: 根据通道Id进行过滤。
+ Filters []*QueryCondition `json:"Filters,omitempty" name:"Filters"`
- // 加速区域,取值有:
- // mainland:中国大陆境内;
- // overseas:全球(不含中国大陆)。
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
Area *string `json:"Area,omitempty" name:"Area"`
}
type DescribeTimingL4DataRequest struct {
*tchttp.BaseRequest
- // RFC3339格式,客户端时间
+ // 开始时间。
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // RFC3339格式,客户端时间
+ // 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 支持的指标:
- // l4Flow_connections: 访问连接数
- // l4Flow_flux: 访问总流量
- // l4Flow_inFlux: 访问入流量
- // l4Flow_outFlux: 访问出流量
+ // 查询指标,取值有:
+ // l4Flow_connections: 访问连接数;
+ // l4Flow_flux: 访问总流量;
+ // l4Flow_inFlux: 访问入流量;
+ // l4Flow_outFlux: 访问出流量;
+ // l4Flow_outPkt: 访问出包量。
MetricNames []*string `json:"MetricNames,omitempty" name:"MetricNames"`
- // 站点id列表
+ // 站点集合,不填默认选择全部站点。
ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // 该字段已废弃,请使用ProxyIds字段
- InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"`
-
- // 该字段当前无效
- Protocol *string `json:"Protocol,omitempty" name:"Protocol"`
+ // 四层实例列表, 不填表示选择全部实例。
+ ProxyIds []*string `json:"ProxyIds,omitempty" name:"ProxyIds"`
- // 时间间隔,选填{min, 5min, hour, day}
+ // 查询时间粒度,取值有:
+ // min: 1分钟 ;
+ // 5min: 5分钟 ;
+ // hour: 1小时 ;
+ // day: 1天 。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
Interval *string `json:"Interval,omitempty" name:"Interval"`
- // 该字段当前无效,请使用Filter筛选
- RuleId *string `json:"RuleId,omitempty" name:"RuleId"`
-
- // 支持的 Filter:proxyd,ruleId
- Filters []*Filter `json:"Filters,omitempty" name:"Filters"`
-
- // 四层实例列表
- ProxyIds []*string `json:"ProxyIds,omitempty" name:"ProxyIds"`
+ // 筛选条件, key可选的值有:
+ // ruleId: 根据规则Id进行过滤;
+ // proxyId: 根据通道Id进行过滤。
+ Filters []*QueryCondition `json:"Filters,omitempty" name:"Filters"`
- // 加速区域,取值有:
- // mainland:中国大陆境内;
- // overseas:全球(不含中国大陆)。
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
Area *string `json:"Area,omitempty" name:"Area"`
}
@@ -6312,12 +7855,9 @@ func (r *DescribeTimingL4DataRequest) FromJsonString(s string) error {
delete(f, "EndTime")
delete(f, "MetricNames")
delete(f, "ZoneIds")
- delete(f, "InstanceIds")
- delete(f, "Protocol")
+ delete(f, "ProxyIds")
delete(f, "Interval")
- delete(f, "RuleId")
delete(f, "Filters")
- delete(f, "ProxyIds")
delete(f, "Area")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeTimingL4DataRequest has unknown keys!", "")
@@ -6327,13 +7867,10 @@ func (r *DescribeTimingL4DataRequest) FromJsonString(s string) error {
// Predefined struct for user
type DescribeTimingL4DataResponseParams struct {
- // 查询维度
- Type *string `json:"Type,omitempty" name:"Type"`
-
- // 时间间隔
- Interval *string `json:"Interval,omitempty" name:"Interval"`
+ // 查询结果的总条数。
+ TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
- // 详细数据
+ // 四层时序流量数据列表。
// 注意:此字段可能返回 null,表示取不到有效值。
Data []*TimingDataRecord `json:"Data,omitempty" name:"Data"`
@@ -6359,60 +7896,96 @@ func (r *DescribeTimingL4DataResponse) FromJsonString(s string) error {
// Predefined struct for user
type DescribeTimingL7AnalysisDataRequestParams struct {
- // RFC3339标准,客户端时间
+ // 开始时间。
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // RFC3339标准,客户端时间
+ // 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 指标列表,支持的指标
- // l7Flow_outFlux: 访问流量
- // l7Flow_request: 访问请求数
- // l7Flow_outBandwidth: 访问带宽
+ // 指标列表,取值有:
+ // l7Flow_outFlux: 访问流量;
+ // l7Flow_request: 访问请求数;
+ // l7Flow_outBandwidth: 访问带宽。
MetricNames []*string `json:"MetricNames,omitempty" name:"MetricNames"`
- // 时间间隔,选填{min, 5min, hour, day, week}
- Interval *string `json:"Interval,omitempty" name:"Interval"`
-
- // ZoneId数组
+ // 站点集合,不填默认选择全部站点。
ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // 筛选条件
- Filters []*Filter `json:"Filters,omitempty" name:"Filters"`
+ // 查询时间粒度,取值有:
+ // min: 1分钟;
+ // 5min: 5分钟;
+ // hour: 1小时;
+ // day: 1天。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
- // 加速区域,取值有:
- // mainland:中国大陆境内;
- // overseas:全球(不含中国大陆)。
+ // 筛选条件,key可选的值有:
+ // country:国家/地区;
+ // domain:域名;
+ // protocol:协议类型;
+ // resourceType:资源类型;
+ // statusCode:状态码;
+ // browserType:浏览器类型;
+ // deviceType:设备类型;
+ // operatingSystemType:操作系统类型;
+ // tlsVersion:tls版本;
+ // url:url地址;
+ // referer:refer头信息;
+ // ipVersion:ip版本;
+ // tagKey:标签Key;
+ // tagValue:标签Value。
+ Filters []*QueryCondition `json:"Filters,omitempty" name:"Filters"`
+
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户的地域智能选择地区。
Area *string `json:"Area,omitempty" name:"Area"`
}
type DescribeTimingL7AnalysisDataRequest struct {
*tchttp.BaseRequest
- // RFC3339标准,客户端时间
+ // 开始时间。
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // RFC3339标准,客户端时间
+ // 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 指标列表,支持的指标
- // l7Flow_outFlux: 访问流量
- // l7Flow_request: 访问请求数
- // l7Flow_outBandwidth: 访问带宽
+ // 指标列表,取值有:
+ // l7Flow_outFlux: 访问流量;
+ // l7Flow_request: 访问请求数;
+ // l7Flow_outBandwidth: 访问带宽。
MetricNames []*string `json:"MetricNames,omitempty" name:"MetricNames"`
- // 时间间隔,选填{min, 5min, hour, day, week}
- Interval *string `json:"Interval,omitempty" name:"Interval"`
-
- // ZoneId数组
+ // 站点集合,不填默认选择全部站点。
ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // 筛选条件
- Filters []*Filter `json:"Filters,omitempty" name:"Filters"`
+ // 查询时间粒度,取值有:
+ // min: 1分钟;
+ // 5min: 5分钟;
+ // hour: 1小时;
+ // day: 1天。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
- // 加速区域,取值有:
- // mainland:中国大陆境内;
- // overseas:全球(不含中国大陆)。
+ // 筛选条件,key可选的值有:
+ // country:国家/地区;
+ // domain:域名;
+ // protocol:协议类型;
+ // resourceType:资源类型;
+ // statusCode:状态码;
+ // browserType:浏览器类型;
+ // deviceType:设备类型;
+ // operatingSystemType:操作系统类型;
+ // tlsVersion:tls版本;
+ // url:url地址;
+ // referer:refer头信息;
+ // ipVersion:ip版本;
+ // tagKey:标签Key;
+ // tagValue:标签Value。
+ Filters []*QueryCondition `json:"Filters,omitempty" name:"Filters"`
+
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户的地域智能选择地区。
Area *string `json:"Area,omitempty" name:"Area"`
}
@@ -6431,8 +8004,8 @@ func (r *DescribeTimingL7AnalysisDataRequest) FromJsonString(s string) error {
delete(f, "StartTime")
delete(f, "EndTime")
delete(f, "MetricNames")
- delete(f, "Interval")
delete(f, "ZoneIds")
+ delete(f, "Interval")
delete(f, "Filters")
delete(f, "Area")
if len(f) > 0 {
@@ -6443,15 +8016,12 @@ func (r *DescribeTimingL7AnalysisDataRequest) FromJsonString(s string) error {
// Predefined struct for user
type DescribeTimingL7AnalysisDataResponseParams struct {
- // 详细数据
+ // 时序流量数据列表。
// 注意:此字段可能返回 null,表示取不到有效值。
Data []*TimingDataRecord `json:"Data,omitempty" name:"Data"`
- // 查询维度
- Type *string `json:"Type,omitempty" name:"Type"`
-
- // 时间间隔
- Interval *string `json:"Interval,omitempty" name:"Interval"`
+ // 查询结果的总条数。
+ TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
@@ -6475,62 +8045,80 @@ func (r *DescribeTimingL7AnalysisDataResponse) FromJsonString(s string) error {
// Predefined struct for user
type DescribeTimingL7CacheDataRequestParams struct {
- // RFC3339标准,客户端时间
+ // 开始时间。
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // RFC3339标准,客户端时间
+ // 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 时序类访问流量指标列表,支持的指标
- // l7Cache_outFlux: 访问流量
- // l7Cache_request: 访问请求数
+ // 查询的指标,取值有:
+ // l7Cache_outFlux:响应流量;
+ // l7Cache_request:响应请求数;
+ // l7Cache_outBandwidth:响应带宽。
MetricNames []*string `json:"MetricNames,omitempty" name:"MetricNames"`
- // 时间间隔,选填{min, 5min, hour, day, week}
- Interval *string `json:"Interval,omitempty" name:"Interval"`
-
- // 站点id列表
+ // 站点集合,不填默认选择全部站点。
ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // 筛选条件,筛选EO/源站响应如下:
- // EO响应:{Key: "cacheType", Value: ["hit"], Operator: "equals"};
- // 源站响应:{Key: "cacheType", Value: ["miss", "dynamic"], Operator: "equals"}
- Filters []*Filter `json:"Filters,omitempty" name:"Filters"`
+ // 筛选条件,key可选的值有:
+ // cacheType:缓存类型(状态);
+ // domain:Host/域名;
+ // resourceType:资源类型;
+ // url:url地址;
+ // tagKey:标签Key;
+ // tagValue:标签Value。
+ Filters []*QueryCondition `json:"Filters,omitempty" name:"Filters"`
+
+ // 查询时间粒度,可选的值有:
+ // min:1分钟的时间粒度;
+ // 5min:5分钟的时间粒度;
+ // hour:1小时的时间粒度;
+ // day:1天的时间粒度。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
- // 加速区域,取值有:
- // mainland:中国大陆境内;
- // overseas:全球(不含中国大陆)。
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
Area *string `json:"Area,omitempty" name:"Area"`
}
type DescribeTimingL7CacheDataRequest struct {
*tchttp.BaseRequest
- // RFC3339标准,客户端时间
+ // 开始时间。
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // RFC3339标准,客户端时间
+ // 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 时序类访问流量指标列表,支持的指标
- // l7Cache_outFlux: 访问流量
- // l7Cache_request: 访问请求数
+ // 查询的指标,取值有:
+ // l7Cache_outFlux:响应流量;
+ // l7Cache_request:响应请求数;
+ // l7Cache_outBandwidth:响应带宽。
MetricNames []*string `json:"MetricNames,omitempty" name:"MetricNames"`
- // 时间间隔,选填{min, 5min, hour, day, week}
- Interval *string `json:"Interval,omitempty" name:"Interval"`
-
- // 站点id列表
+ // 站点集合,不填默认选择全部站点。
ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // 筛选条件,筛选EO/源站响应如下:
- // EO响应:{Key: "cacheType", Value: ["hit"], Operator: "equals"};
- // 源站响应:{Key: "cacheType", Value: ["miss", "dynamic"], Operator: "equals"}
- Filters []*Filter `json:"Filters,omitempty" name:"Filters"`
+ // 筛选条件,key可选的值有:
+ // cacheType:缓存类型(状态);
+ // domain:Host/域名;
+ // resourceType:资源类型;
+ // url:url地址;
+ // tagKey:标签Key;
+ // tagValue:标签Value。
+ Filters []*QueryCondition `json:"Filters,omitempty" name:"Filters"`
+
+ // 查询时间粒度,可选的值有:
+ // min:1分钟的时间粒度;
+ // 5min:5分钟的时间粒度;
+ // hour:1小时的时间粒度;
+ // day:1天的时间粒度。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
- // 加速区域,取值有:
- // mainland:中国大陆境内;
- // overseas:全球(不含中国大陆)。
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
Area *string `json:"Area,omitempty" name:"Area"`
}
@@ -6549,9 +8137,9 @@ func (r *DescribeTimingL7CacheDataRequest) FromJsonString(s string) error {
delete(f, "StartTime")
delete(f, "EndTime")
delete(f, "MetricNames")
- delete(f, "Interval")
delete(f, "ZoneIds")
delete(f, "Filters")
+ delete(f, "Interval")
delete(f, "Area")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeTimingL7CacheDataRequest has unknown keys!", "")
@@ -6561,15 +8149,12 @@ func (r *DescribeTimingL7CacheDataRequest) FromJsonString(s string) error {
// Predefined struct for user
type DescribeTimingL7CacheDataResponseParams struct {
- // 详细数据
+ // 七层缓存分析时序类流量数据列表。
// 注意:此字段可能返回 null,表示取不到有效值。
Data []*TimingDataRecord `json:"Data,omitempty" name:"Data"`
- // 查询维度
- Type *string `json:"Type,omitempty" name:"Type"`
-
- // 时间间隔
- Interval *string `json:"Interval,omitempty" name:"Interval"`
+ // 查询结果的总条数。
+ TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
@@ -6593,60 +8178,116 @@ func (r *DescribeTimingL7CacheDataResponse) FromJsonString(s string) error {
// Predefined struct for user
type DescribeTopL7AnalysisDataRequestParams struct {
- // RFC3339标准,客户端时间
+ // 开始时间。
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // RFC3339标准,客户端时间
+ // 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 时序类访问流量指标
+ // 查询的指标,取值有:
+ // l7Flow_outFlux_country:请求的国家;
+ // l7Flow_outFlux_statusCode:请求的状态码;
+ // l7Flow_outFlux_domain:请求域名;
+ // l7Flow_outFlux_url:请求的URL;
+ // l7Flow_outFlux_resourceType:请求的资源类型;
+ // l7Flow_outFlux_sip:客户端的源IP;
+ // l7Flow_outFlux_referers:refer信息;
+ // l7Flow_outFlux_ua_device:设备类型;
+ // l7Flow_outFlux_ua_browser:浏览器类型;
+ // l7Flow_outFlux_us_os:操作系统类型。
MetricName *string `json:"MetricName,omitempty" name:"MetricName"`
- // topN,填0时返回全量数据
- Limit *int64 `json:"Limit,omitempty" name:"Limit"`
+ // 站点集合,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // 时间间隔,选填{min, 5min, hour, day, week}
- Interval *string `json:"Interval,omitempty" name:"Interval"`
+ // 查询前多少个数据,最大值为1000,不填默认默认为: 10, 表示查询前top10的数据。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
- // ZoneId数组
- ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+ // 筛选条件,key可选的值有:
+ // country:国家/地区;
+ // domain:域名;
+ // protocol:协议类型;
+ // resourceType:资源类型;
+ // statusCode:状态码;
+ // browserType:浏览器类型;
+ // deviceType:设备类型;
+ // operatingSystemType:操作系统类型;
+ // tlsVersion:tls版本;
+ // url:url地址;
+ // referer:refer头信息;
+ // ipVersion:ip版本;
+ // tagKey:标签Key;
+ // tagValue:标签Value。
+ Filters []*QueryCondition `json:"Filters,omitempty" name:"Filters"`
- // 筛选条件
- Filters []*Filter `json:"Filters,omitempty" name:"Filters"`
+ // 查询时间粒度,取值有:
+ // min:1分钟;
+ // 5min:5分钟;
+ // hour:1小时;
+ // day:1天。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
- // 加速区域,取值有:
- // mainland:中国大陆境内;
- // overseas:全球(不含中国大陆)。
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
Area *string `json:"Area,omitempty" name:"Area"`
}
type DescribeTopL7AnalysisDataRequest struct {
*tchttp.BaseRequest
- // RFC3339标准,客户端时间
+ // 开始时间。
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // RFC3339标准,客户端时间
+ // 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 时序类访问流量指标
+ // 查询的指标,取值有:
+ // l7Flow_outFlux_country:请求的国家;
+ // l7Flow_outFlux_statusCode:请求的状态码;
+ // l7Flow_outFlux_domain:请求域名;
+ // l7Flow_outFlux_url:请求的URL;
+ // l7Flow_outFlux_resourceType:请求的资源类型;
+ // l7Flow_outFlux_sip:客户端的源IP;
+ // l7Flow_outFlux_referers:refer信息;
+ // l7Flow_outFlux_ua_device:设备类型;
+ // l7Flow_outFlux_ua_browser:浏览器类型;
+ // l7Flow_outFlux_us_os:操作系统类型。
MetricName *string `json:"MetricName,omitempty" name:"MetricName"`
- // topN,填0时返回全量数据
- Limit *int64 `json:"Limit,omitempty" name:"Limit"`
+ // 站点集合,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // 时间间隔,选填{min, 5min, hour, day, week}
- Interval *string `json:"Interval,omitempty" name:"Interval"`
+ // 查询前多少个数据,最大值为1000,不填默认默认为: 10, 表示查询前top10的数据。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
- // ZoneId数组
- ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+ // 筛选条件,key可选的值有:
+ // country:国家/地区;
+ // domain:域名;
+ // protocol:协议类型;
+ // resourceType:资源类型;
+ // statusCode:状态码;
+ // browserType:浏览器类型;
+ // deviceType:设备类型;
+ // operatingSystemType:操作系统类型;
+ // tlsVersion:tls版本;
+ // url:url地址;
+ // referer:refer头信息;
+ // ipVersion:ip版本;
+ // tagKey:标签Key;
+ // tagValue:标签Value。
+ Filters []*QueryCondition `json:"Filters,omitempty" name:"Filters"`
- // 筛选条件
- Filters []*Filter `json:"Filters,omitempty" name:"Filters"`
+ // 查询时间粒度,取值有:
+ // min:1分钟;
+ // 5min:5分钟;
+ // hour:1小时;
+ // day:1天。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
- // 加速区域,取值有:
- // mainland:中国大陆境内;
- // overseas:全球(不含中国大陆)。
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
Area *string `json:"Area,omitempty" name:"Area"`
}
@@ -6665,10 +8306,10 @@ func (r *DescribeTopL7AnalysisDataRequest) FromJsonString(s string) error {
delete(f, "StartTime")
delete(f, "EndTime")
delete(f, "MetricName")
- delete(f, "Limit")
- delete(f, "Interval")
delete(f, "ZoneIds")
+ delete(f, "Limit")
delete(f, "Filters")
+ delete(f, "Interval")
delete(f, "Area")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeTopL7AnalysisDataRequest has unknown keys!", "")
@@ -6678,15 +8319,12 @@ func (r *DescribeTopL7AnalysisDataRequest) FromJsonString(s string) error {
// Predefined struct for user
type DescribeTopL7AnalysisDataResponseParams struct {
- // top详细数据
+ // 七层流量前topN数据列表。
// 注意:此字段可能返回 null,表示取不到有效值。
Data []*TopDataRecord `json:"Data,omitempty" name:"Data"`
- // 查询维度
- Type *string `json:"Type,omitempty" name:"Type"`
-
- // 查询指标
- MetricName *string `json:"MetricName,omitempty" name:"MetricName"`
+ // 查询结果的总条数。
+ TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
@@ -6710,60 +8348,88 @@ func (r *DescribeTopL7AnalysisDataResponse) FromJsonString(s string) error {
// Predefined struct for user
type DescribeTopL7CacheDataRequestParams struct {
- // RFC3339标准,客户端时间
+ // 开始时间。
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // RFC3339标准,客户端时间
+ // 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 时序类访问流量指标
+ // 查询的指标,取值有:
+ // l7Cache_outFlux_domain:host/域名;
+ // l7Cache_outFlux_url:url地址;
+ // l7Cache_outFlux_resourceType:资源类型;
+ // l7Cache_outFlux_statusCode:状态码。
MetricName *string `json:"MetricName,omitempty" name:"MetricName"`
- // topN,填0时返回全量数据
- Limit *int64 `json:"Limit,omitempty" name:"Limit"`
+ // 站点id集合,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // 时间间隔,选填{min, 5min, hour, day, week}
- Interval *string `json:"Interval,omitempty" name:"Interval"`
+ // 查询前多少个数据,不填默认默认为10, 表示查询前top 10的数据。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
- // ZoneId数组
- ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+ // 筛选条件,key可选的值有:
+ // cacheType:缓存类型(状态);
+ // domain:Host/域名;
+ // resourceType:资源类型;
+ // url:url地址;
+ // tagKey:标签Key;
+ // tagValue:标签Value。
+ Filters []*QueryCondition `json:"Filters,omitempty" name:"Filters"`
- // 筛选条件
- Filters []*Filter `json:"Filters,omitempty" name:"Filters"`
+ // 查询时间粒度,取值有:
+ // min: 1分钟;
+ // 5min: 5分钟;
+ // hour: 1小时;
+ // day: 1天。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
- // 加速区域,取值有:
- // mainland:中国大陆境内;
- // overseas:全球(不含中国大陆)。
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
Area *string `json:"Area,omitempty" name:"Area"`
}
type DescribeTopL7CacheDataRequest struct {
*tchttp.BaseRequest
- // RFC3339标准,客户端时间
+ // 开始时间。
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // RFC3339标准,客户端时间
+ // 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 时序类访问流量指标
+ // 查询的指标,取值有:
+ // l7Cache_outFlux_domain:host/域名;
+ // l7Cache_outFlux_url:url地址;
+ // l7Cache_outFlux_resourceType:资源类型;
+ // l7Cache_outFlux_statusCode:状态码。
MetricName *string `json:"MetricName,omitempty" name:"MetricName"`
- // topN,填0时返回全量数据
- Limit *int64 `json:"Limit,omitempty" name:"Limit"`
+ // 站点id集合,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // 时间间隔,选填{min, 5min, hour, day, week}
- Interval *string `json:"Interval,omitempty" name:"Interval"`
+ // 查询前多少个数据,不填默认默认为10, 表示查询前top 10的数据。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
- // ZoneId数组
- ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+ // 筛选条件,key可选的值有:
+ // cacheType:缓存类型(状态);
+ // domain:Host/域名;
+ // resourceType:资源类型;
+ // url:url地址;
+ // tagKey:标签Key;
+ // tagValue:标签Value。
+ Filters []*QueryCondition `json:"Filters,omitempty" name:"Filters"`
- // 筛选条件
- Filters []*Filter `json:"Filters,omitempty" name:"Filters"`
+ // 查询时间粒度,取值有:
+ // min: 1分钟;
+ // 5min: 5分钟;
+ // hour: 1小时;
+ // day: 1天。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
- // 加速区域,取值有:
- // mainland:中国大陆境内;
- // overseas:全球(不含中国大陆)。
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
Area *string `json:"Area,omitempty" name:"Area"`
}
@@ -6782,10 +8448,10 @@ func (r *DescribeTopL7CacheDataRequest) FromJsonString(s string) error {
delete(f, "StartTime")
delete(f, "EndTime")
delete(f, "MetricName")
- delete(f, "Limit")
- delete(f, "Interval")
delete(f, "ZoneIds")
+ delete(f, "Limit")
delete(f, "Filters")
+ delete(f, "Interval")
delete(f, "Area")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeTopL7CacheDataRequest has unknown keys!", "")
@@ -6795,15 +8461,12 @@ func (r *DescribeTopL7CacheDataRequest) FromJsonString(s string) error {
// Predefined struct for user
type DescribeTopL7CacheDataResponseParams struct {
- // top详细数据
+ // 七层缓存TopN流量数据列表。
// 注意:此字段可能返回 null,表示取不到有效值。
Data []*TopDataRecord `json:"Data,omitempty" name:"Data"`
- // 查询维度
- Type *string `json:"Type,omitempty" name:"Type"`
-
- // 查询指标
- MetricName *string `json:"MetricName,omitempty" name:"MetricName"`
+ // 查询结果的总条数。
+ TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
@@ -6826,347 +8489,340 @@ func (r *DescribeTopL7CacheDataResponse) FromJsonString(s string) error {
}
// Predefined struct for user
-type DescribeWebManagedRulesAttackEventsRequestParams struct {
- // 开始时间
+type DescribeWebManagedRulesDataRequestParams struct {
+ // 开始时间。
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // 结束时间
+ // 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 条数
- PageSize *int64 `json:"PageSize,omitempty" name:"PageSize"`
-
- // 当前页
- PageNo *int64 `json:"PageNo,omitempty" name:"PageNo"`
-
- // ddos策略组id列表
- PolicyIds []*int64 `json:"PolicyIds,omitempty" name:"PolicyIds"`
+ // 统计指标列表,取值有:
+ // waf_interceptNum:waf拦截次数。
+ MetricNames []*string `json:"MetricNames,omitempty" name:"MetricNames"`
- // 站点集合
+ // 站点集合,不填默认选择全部站点。
ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // 子域名列表
+ // 子域名集合,不填默认选择全部子域名。
Domains []*string `json:"Domains,omitempty" name:"Domains"`
- // 选填{Y、N},默认为Y;Y:展示,N:不展示
- IsShowDetail *string `json:"IsShowDetail,omitempty" name:"IsShowDetail"`
+ // 筛选条件,key可选的值有:
+ // action:执行动作。
+ QueryCondition []*QueryCondition `json:"QueryCondition,omitempty" name:"QueryCondition"`
+
+ // 查询时间粒度,取值有:
+ // min:1分钟;
+ // 5min:5分钟;
+ // hour:1小时;
+ // day:1天。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
+
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
+ Area *string `json:"Area,omitempty" name:"Area"`
}
-type DescribeWebManagedRulesAttackEventsRequest struct {
+type DescribeWebManagedRulesDataRequest struct {
*tchttp.BaseRequest
- // 开始时间
+ // 开始时间。
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // 结束时间
+ // 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 条数
- PageSize *int64 `json:"PageSize,omitempty" name:"PageSize"`
-
- // 当前页
- PageNo *int64 `json:"PageNo,omitempty" name:"PageNo"`
-
- // ddos策略组id列表
- PolicyIds []*int64 `json:"PolicyIds,omitempty" name:"PolicyIds"`
+ // 统计指标列表,取值有:
+ // waf_interceptNum:waf拦截次数。
+ MetricNames []*string `json:"MetricNames,omitempty" name:"MetricNames"`
- // 站点集合
+ // 站点集合,不填默认选择全部站点。
ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // 子域名列表
+ // 子域名集合,不填默认选择全部子域名。
Domains []*string `json:"Domains,omitempty" name:"Domains"`
- // 选填{Y、N},默认为Y;Y:展示,N:不展示
- IsShowDetail *string `json:"IsShowDetail,omitempty" name:"IsShowDetail"`
+ // 筛选条件,key可选的值有:
+ // action:执行动作。
+ QueryCondition []*QueryCondition `json:"QueryCondition,omitempty" name:"QueryCondition"`
+
+ // 查询时间粒度,取值有:
+ // min:1分钟;
+ // 5min:5分钟;
+ // hour:1小时;
+ // day:1天。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
+
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
+ Area *string `json:"Area,omitempty" name:"Area"`
}
-func (r *DescribeWebManagedRulesAttackEventsRequest) ToJsonString() string {
+func (r *DescribeWebManagedRulesDataRequest) 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 *DescribeWebManagedRulesAttackEventsRequest) FromJsonString(s string) error {
+func (r *DescribeWebManagedRulesDataRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
delete(f, "StartTime")
delete(f, "EndTime")
- delete(f, "PageSize")
- delete(f, "PageNo")
- delete(f, "PolicyIds")
+ delete(f, "MetricNames")
delete(f, "ZoneIds")
delete(f, "Domains")
- delete(f, "IsShowDetail")
+ delete(f, "QueryCondition")
+ delete(f, "Interval")
+ delete(f, "Area")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeWebManagedRulesAttackEventsRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeWebManagedRulesDataRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeWebManagedRulesAttackEventsResponseParams struct {
- // Web攻击事件数据
- Data *WebEventData `json:"Data,omitempty" name:"Data"`
-
- // 状态,1:失败,0:成功
- Status *int64 `json:"Status,omitempty" name:"Status"`
+type DescribeWebManagedRulesDataResponseParams struct {
+ // WAF攻击的时序数据列表。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Data []*SecEntry `json:"Data,omitempty" name:"Data"`
- // 返回数据
- Msg *string `json:"Msg,omitempty" name:"Msg"`
+ // 查询结果的总条数。
+ TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeWebManagedRulesAttackEventsResponse struct {
+type DescribeWebManagedRulesDataResponse struct {
*tchttp.BaseResponse
- Response *DescribeWebManagedRulesAttackEventsResponseParams `json:"Response"`
+ Response *DescribeWebManagedRulesDataResponseParams `json:"Response"`
}
-func (r *DescribeWebManagedRulesAttackEventsResponse) ToJsonString() string {
+func (r *DescribeWebManagedRulesDataResponse) 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 *DescribeWebManagedRulesAttackEventsResponse) FromJsonString(s string) error {
+func (r *DescribeWebManagedRulesDataResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeWebManagedRulesDataRequestParams struct {
- // 开始时间,RFC3339格式。
+type DescribeWebManagedRulesHitRuleDetailRequestParams struct {
+ // 开始时间。
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // 结束时间,RFC3339格式。
+ // 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 统计指标列表,取值有:
- // waf_interceptNum :waf拦截次数 。
- MetricNames []*string `json:"MetricNames,omitempty" name:"MetricNames"`
-
- // 站点id列表,不填默认选择全部站点。
+ // 站点集合,不填默认选择全部站点。
ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // 子域名列表,不填默认选择子域名。
+ // 子域名列表,不填默认选择全部全部子域名。
Domains []*string `json:"Domains,omitempty" name:"Domains"`
- // 该字段已废弃,请勿传。
- ProtocolType *string `json:"ProtocolType,omitempty" name:"ProtocolType"`
-
- // 该字段已废弃,请勿传。
- AttackType *string `json:"AttackType,omitempty" name:"AttackType"`
-
// 查询时间粒度,取值有:
- // min :1分钟 ;
- // 5min :5分钟 ;
- // hour :1小时 ;
- // day :1天 。
+ // min:1分钟;
+ // 5min:5分钟;
+ // hour:1小时;
+ // day:1天 。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
Interval *string `json:"Interval,omitempty" name:"Interval"`
- // 筛选条件,取值有:
+ // 筛选条件,key可选的值有:
// action :执行动作 。
QueryCondition []*QueryCondition `json:"QueryCondition,omitempty" name:"QueryCondition"`
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
+
+ // 分页的偏移量,默认值为0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+
// 数据归属地区,取值有:
- // overseas :全球(除中国大陆地区)数据 ;
- // mainland :中国大陆地区数据 。不填默认查询overseas。
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
Area *string `json:"Area,omitempty" name:"Area"`
}
-type DescribeWebManagedRulesDataRequest struct {
+type DescribeWebManagedRulesHitRuleDetailRequest struct {
*tchttp.BaseRequest
- // 开始时间,RFC3339格式。
+ // 开始时间。
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // 结束时间,RFC3339格式。
+ // 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 统计指标列表,取值有:
- // waf_interceptNum :waf拦截次数 。
- MetricNames []*string `json:"MetricNames,omitempty" name:"MetricNames"`
-
- // 站点id列表,不填默认选择全部站点。
+ // 站点集合,不填默认选择全部站点。
ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // 子域名列表,不填默认选择子域名。
+ // 子域名列表,不填默认选择全部全部子域名。
Domains []*string `json:"Domains,omitempty" name:"Domains"`
- // 该字段已废弃,请勿传。
- ProtocolType *string `json:"ProtocolType,omitempty" name:"ProtocolType"`
-
- // 该字段已废弃,请勿传。
- AttackType *string `json:"AttackType,omitempty" name:"AttackType"`
-
// 查询时间粒度,取值有:
- // min :1分钟 ;
- // 5min :5分钟 ;
- // hour :1小时 ;
- // day :1天 。
+ // min:1分钟;
+ // 5min:5分钟;
+ // hour:1小时;
+ // day:1天 。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
Interval *string `json:"Interval,omitempty" name:"Interval"`
- // 筛选条件,取值有:
+ // 筛选条件,key可选的值有:
// action :执行动作 。
QueryCondition []*QueryCondition `json:"QueryCondition,omitempty" name:"QueryCondition"`
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
+
+ // 分页的偏移量,默认值为0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+
// 数据归属地区,取值有:
- // overseas :全球(除中国大陆地区)数据 ;
- // mainland :中国大陆地区数据 。不填默认查询overseas。
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
Area *string `json:"Area,omitempty" name:"Area"`
}
-func (r *DescribeWebManagedRulesDataRequest) ToJsonString() string {
+func (r *DescribeWebManagedRulesHitRuleDetailRequest) 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 *DescribeWebManagedRulesDataRequest) FromJsonString(s string) error {
+func (r *DescribeWebManagedRulesHitRuleDetailRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
delete(f, "StartTime")
delete(f, "EndTime")
- delete(f, "MetricNames")
delete(f, "ZoneIds")
delete(f, "Domains")
- delete(f, "ProtocolType")
- delete(f, "AttackType")
delete(f, "Interval")
delete(f, "QueryCondition")
+ delete(f, "Limit")
+ delete(f, "Offset")
delete(f, "Area")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeWebManagedRulesDataRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeWebManagedRulesHitRuleDetailRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeWebManagedRulesDataResponseParams struct {
- // Web攻击日志实体。
+type DescribeWebManagedRulesHitRuleDetailResponseParams struct {
+ // 命中规则的详细列表。
// 注意:此字段可能返回 null,表示取不到有效值。
- Data []*SecEntry `json:"Data,omitempty" name:"Data"`
-
- // 请求响应状态,取值有:
- // 1 :失败 ;
- // 0 :成功 。
- Status *int64 `json:"Status,omitempty" name:"Status"`
+ Data []*SecHitRuleInfo `json:"Data,omitempty" name:"Data"`
- // 请求响应消息。
- Msg *string `json:"Msg,omitempty" name:"Msg"`
-
- // 查询时间粒度,取值有:
- // min :1分钟 ;
- // 5min :5分钟 ;
- // hour :1小时 ;
- // day :1天 。
- Interval *string `json:"Interval,omitempty" name:"Interval"`
+ // 查询结果的总条数。
+ TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeWebManagedRulesDataResponse struct {
+type DescribeWebManagedRulesHitRuleDetailResponse struct {
*tchttp.BaseResponse
- Response *DescribeWebManagedRulesDataResponseParams `json:"Response"`
+ Response *DescribeWebManagedRulesHitRuleDetailResponseParams `json:"Response"`
}
-func (r *DescribeWebManagedRulesDataResponse) ToJsonString() string {
+func (r *DescribeWebManagedRulesHitRuleDetailResponse) 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 *DescribeWebManagedRulesDataResponse) FromJsonString(s string) error {
+func (r *DescribeWebManagedRulesHitRuleDetailResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
type DescribeWebManagedRulesLogRequestParams struct {
- // 起始时间。
+ // 开始时间。
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
// 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 分页拉取的最大返回结果数。最大值:1000。
- PageSize *int64 `json:"PageSize,omitempty" name:"PageSize"`
-
- // 分页拉取的起始页号。最小值:1。
- PageNo *int64 `json:"PageNo,omitempty" name:"PageNo"`
-
// 站点集合,不填默认选择全部站点。
ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
// 域名集合,不填默认选择全部子域名。
Domains []*string `json:"Domains,omitempty" name:"Domains"`
- // 筛选条件,取值有:
- // attackType :攻击类型 ;
- // riskLevel :风险等级 ;
- // action :执行动作(处置方式) ;
- // ruleId :规则id ;
- // sipCountryCode :ip所在国家 ;
- // attackIp :攻击ip ;
- // oriDomain :被攻击的子域名 ;
- // eventId :事件id ;
- // ua :用户代理 ;
- // requestMethod :请求方法 ;
- // uri :统一资源标识符 。
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
+ Limit *uint64 `json:"Limit,omitempty" name:"Limit"`
+
+ // 分页的偏移量,默认值为0。
+ Offset *uint64 `json:"Offset,omitempty" name:"Offset"`
+
+ // 筛选条件,key可选的值有:
+ // attackType:攻击类型;
+ // riskLevel:风险等级;
+ // action:执行动作(处置方式);
+ // ruleId:规则id;
+ // sipCountryCode:ip所在国家;
+ // attackIp:攻击ip;
+ // oriDomain:被攻击的子域名;
+ // eventId:事件id;
+ // ua:用户代理;
+ // requestMethod:请求方法;
+ // uri:统一资源标识符。
QueryCondition []*QueryCondition `json:"QueryCondition,omitempty" name:"QueryCondition"`
// 数据归属地区,取值有:
- // overseas :全球(除中国大陆地区)数据 ;
- // mainland :中国大陆地区数据 。不填默认查询overseas。
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
Area *string `json:"Area,omitempty" name:"Area"`
}
type DescribeWebManagedRulesLogRequest struct {
*tchttp.BaseRequest
- // 起始时间。
+ // 开始时间。
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
// 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 分页拉取的最大返回结果数。最大值:1000。
- PageSize *int64 `json:"PageSize,omitempty" name:"PageSize"`
-
- // 分页拉取的起始页号。最小值:1。
- PageNo *int64 `json:"PageNo,omitempty" name:"PageNo"`
-
// 站点集合,不填默认选择全部站点。
ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
// 域名集合,不填默认选择全部子域名。
Domains []*string `json:"Domains,omitempty" name:"Domains"`
- // 筛选条件,取值有:
- // attackType :攻击类型 ;
- // riskLevel :风险等级 ;
- // action :执行动作(处置方式) ;
- // ruleId :规则id ;
- // sipCountryCode :ip所在国家 ;
- // attackIp :攻击ip ;
- // oriDomain :被攻击的子域名 ;
- // eventId :事件id ;
- // ua :用户代理 ;
- // requestMethod :请求方法 ;
- // uri :统一资源标识符 。
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
+ Limit *uint64 `json:"Limit,omitempty" name:"Limit"`
+
+ // 分页的偏移量,默认值为0。
+ Offset *uint64 `json:"Offset,omitempty" name:"Offset"`
+
+ // 筛选条件,key可选的值有:
+ // attackType:攻击类型;
+ // riskLevel:风险等级;
+ // action:执行动作(处置方式);
+ // ruleId:规则id;
+ // sipCountryCode:ip所在国家;
+ // attackIp:攻击ip;
+ // oriDomain:被攻击的子域名;
+ // eventId:事件id;
+ // ua:用户代理;
+ // requestMethod:请求方法;
+ // uri:统一资源标识符。
QueryCondition []*QueryCondition `json:"QueryCondition,omitempty" name:"QueryCondition"`
// 数据归属地区,取值有:
- // overseas :全球(除中国大陆地区)数据 ;
- // mainland :中国大陆地区数据 。不填默认查询overseas。
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
Area *string `json:"Area,omitempty" name:"Area"`
}
@@ -7184,10 +8840,10 @@ func (r *DescribeWebManagedRulesLogRequest) FromJsonString(s string) error {
}
delete(f, "StartTime")
delete(f, "EndTime")
- delete(f, "PageSize")
- delete(f, "PageNo")
delete(f, "ZoneIds")
delete(f, "Domains")
+ delete(f, "Limit")
+ delete(f, "Offset")
delete(f, "QueryCondition")
delete(f, "Area")
if len(f) > 0 {
@@ -7198,16 +8854,12 @@ func (r *DescribeWebManagedRulesLogRequest) FromJsonString(s string) error {
// Predefined struct for user
type DescribeWebManagedRulesLogResponseParams struct {
- // web攻击日志数据内容。
- Data *WebLogData `json:"Data,omitempty" name:"Data"`
-
- // 请求响应状态,取值有:
- // 1 :失败 ;
- // 0 :成功 。
- Status *int64 `json:"Status,omitempty" name:"Status"`
+ // Web攻击日志数据列表。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Data []*WebLogs `json:"Data,omitempty" name:"Data"`
- // 请求响应信息。
- Msg *string `json:"Msg,omitempty" name:"Msg"`
+ // 查询结果的总条数。
+ TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
@@ -7230,58 +8882,27 @@ func (r *DescribeWebManagedRulesLogResponse) FromJsonString(s string) error {
}
// Predefined struct for user
-type DescribeWebManagedRulesTopDataRequestParams struct {
+type DescribeWebProtectionAttackEventsRequestParams struct {
// 开始时间。
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
// 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 统计指标列表,取值有:
- // waf_requestNum_url :url请求数排行 ;
- // waf_requestNum_cip:客户端ip请求数排行 ;
- // waf_cipRequestNum_region :客户端区域请求数排行 。
- MetricName *string `json:"MetricName,omitempty" name:"MetricName"`
-
- // 查询前多少个,传值为0返回全量。
- Limit *int64 `json:"Limit,omitempty" name:"Limit"`
-
- // 站点id列表,不填默认选择全部站点。
+ // 站点集合,不填默认选择全部站点。
ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // 该字段已废弃,请勿传。
- PolicyIds []*int64 `json:"PolicyIds,omitempty" name:"PolicyIds"`
-
- // 该字段已废弃,请勿传。
- Port *int64 `json:"Port,omitempty" name:"Port"`
-
- // 该字段已废弃,请勿传。
- ProtocolType *string `json:"ProtocolType,omitempty" name:"ProtocolType"`
-
- // 该字段已废弃,请勿传。
- AttackType *string `json:"AttackType,omitempty" name:"AttackType"`
-
- // 域名列表,不填默认选择全部子域名。
+ // 域名集合,不填默认选择全部子域名。
Domains []*string `json:"Domains,omitempty" name:"Domains"`
- // 查询时间粒度,取值有:
- // min :1分钟 ;
- // 5min :5分钟 ;
- // hour :1小时 ;
- // day :1天 。
- Interval *string `json:"Interval,omitempty" name:"Interval"`
-
- // 筛选条件,取值有:
- // action :执行动作 。
- QueryCondition []*QueryCondition `json:"QueryCondition,omitempty" name:"QueryCondition"`
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
- // 数据归属地区,取值有:
- // overseas :全球(除中国大陆地区)数据 ;
- // mainland :中国大陆地区数据 。不填默认查询overseas。
- Area *string `json:"Area,omitempty" name:"Area"`
+ // 分页的偏移量,默认值为0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
}
-type DescribeWebManagedRulesTopDataRequest struct {
+type DescribeWebProtectionAttackEventsRequest struct {
*tchttp.BaseRequest
// 开始时间。
@@ -7290,294 +8911,273 @@ type DescribeWebManagedRulesTopDataRequest struct {
// 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 统计指标列表,取值有:
- // waf_requestNum_url :url请求数排行 ;
- // waf_requestNum_cip:客户端ip请求数排行 ;
- // waf_cipRequestNum_region :客户端区域请求数排行 。
- MetricName *string `json:"MetricName,omitempty" name:"MetricName"`
-
- // 查询前多少个,传值为0返回全量。
- Limit *int64 `json:"Limit,omitempty" name:"Limit"`
-
- // 站点id列表,不填默认选择全部站点。
+ // 站点集合,不填默认选择全部站点。
ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // 该字段已废弃,请勿传。
- PolicyIds []*int64 `json:"PolicyIds,omitempty" name:"PolicyIds"`
-
- // 该字段已废弃,请勿传。
- Port *int64 `json:"Port,omitempty" name:"Port"`
-
- // 该字段已废弃,请勿传。
- ProtocolType *string `json:"ProtocolType,omitempty" name:"ProtocolType"`
-
- // 该字段已废弃,请勿传。
- AttackType *string `json:"AttackType,omitempty" name:"AttackType"`
-
- // 域名列表,不填默认选择全部子域名。
+ // 域名集合,不填默认选择全部子域名。
Domains []*string `json:"Domains,omitempty" name:"Domains"`
- // 查询时间粒度,取值有:
- // min :1分钟 ;
- // 5min :5分钟 ;
- // hour :1小时 ;
- // day :1天 。
- Interval *string `json:"Interval,omitempty" name:"Interval"`
-
- // 筛选条件,取值有:
- // action :执行动作 。
- QueryCondition []*QueryCondition `json:"QueryCondition,omitempty" name:"QueryCondition"`
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
- // 数据归属地区,取值有:
- // overseas :全球(除中国大陆地区)数据 ;
- // mainland :中国大陆地区数据 。不填默认查询overseas。
- Area *string `json:"Area,omitempty" name:"Area"`
+ // 分页的偏移量,默认值为0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
}
-func (r *DescribeWebManagedRulesTopDataRequest) ToJsonString() string {
+func (r *DescribeWebProtectionAttackEventsRequest) 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 *DescribeWebManagedRulesTopDataRequest) FromJsonString(s string) error {
+func (r *DescribeWebProtectionAttackEventsRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
delete(f, "StartTime")
delete(f, "EndTime")
- delete(f, "MetricName")
- delete(f, "Limit")
delete(f, "ZoneIds")
- delete(f, "PolicyIds")
- delete(f, "Port")
- delete(f, "ProtocolType")
- delete(f, "AttackType")
delete(f, "Domains")
- delete(f, "Interval")
- delete(f, "QueryCondition")
- delete(f, "Area")
+ delete(f, "Limit")
+ delete(f, "Offset")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeWebManagedRulesTopDataRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeWebProtectionAttackEventsRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeWebManagedRulesTopDataResponseParams struct {
- // top数据内容。
- Data []*TopNEntry `json:"Data,omitempty" name:"Data"`
-
- // 请求响应状态,取值有:
- // 1 :失败 ;
- // 0 :成功 。
- Status *int64 `json:"Status,omitempty" name:"Status"`
+type DescribeWebProtectionAttackEventsResponseParams struct {
+ // CC相关攻击事件列表。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Data []*CCInterceptEvent `json:"Data,omitempty" name:"Data"`
- // 请求响应消息。
- Msg *string `json:"Msg,omitempty" name:"Msg"`
+ // 查询结果的总条数。
+ TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeWebManagedRulesTopDataResponse struct {
+type DescribeWebProtectionAttackEventsResponse struct {
*tchttp.BaseResponse
- Response *DescribeWebManagedRulesTopDataResponseParams `json:"Response"`
+ Response *DescribeWebProtectionAttackEventsResponseParams `json:"Response"`
}
-func (r *DescribeWebManagedRulesTopDataResponse) ToJsonString() string {
+func (r *DescribeWebProtectionAttackEventsResponse) 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 *DescribeWebManagedRulesTopDataResponse) FromJsonString(s string) error {
+func (r *DescribeWebProtectionAttackEventsResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeWebProtectionAttackEventsRequestParams struct {
- // 开始时间
+type DescribeWebProtectionClientIpListRequestParams struct {
+ // 开始时间。
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // 结束时间
+ // 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 条数
- PageSize *int64 `json:"PageSize,omitempty" name:"PageSize"`
-
- // 当前页
- PageNo *int64 `json:"PageNo,omitempty" name:"PageNo"`
+ // 站点集合,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // 域名
+ // 域名集合,不填默认选择全部子域名。
Domains []*string `json:"Domains,omitempty" name:"Domains"`
- // 站点集合
- ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+ // 查询的时间粒度,支持的粒度有:
+ // min:1分钟;
+ // 5min:5分钟;
+ // hour:1小时;
+ // day:1天。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
+
+ // 筛选条件,key可选的值有:
+ // action:执行动作。
+ QueryCondition []*QueryCondition `json:"QueryCondition,omitempty" name:"QueryCondition"`
+
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
+ Limit *uint64 `json:"Limit,omitempty" name:"Limit"`
+
+ // 分页的偏移量,默认值为0。
+ Offset *uint64 `json:"Offset,omitempty" name:"Offset"`
+
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
+ Area *string `json:"Area,omitempty" name:"Area"`
}
-type DescribeWebProtectionAttackEventsRequest struct {
+type DescribeWebProtectionClientIpListRequest struct {
*tchttp.BaseRequest
- // 开始时间
+ // 开始时间。
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // 结束时间
+ // 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 条数
- PageSize *int64 `json:"PageSize,omitempty" name:"PageSize"`
-
- // 当前页
- PageNo *int64 `json:"PageNo,omitempty" name:"PageNo"`
+ // 站点集合,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // 域名
+ // 域名集合,不填默认选择全部子域名。
Domains []*string `json:"Domains,omitempty" name:"Domains"`
- // 站点集合
- ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+ // 查询的时间粒度,支持的粒度有:
+ // min:1分钟;
+ // 5min:5分钟;
+ // hour:1小时;
+ // day:1天。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
+
+ // 筛选条件,key可选的值有:
+ // action:执行动作。
+ QueryCondition []*QueryCondition `json:"QueryCondition,omitempty" name:"QueryCondition"`
+
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
+ Limit *uint64 `json:"Limit,omitempty" name:"Limit"`
+
+ // 分页的偏移量,默认值为0。
+ Offset *uint64 `json:"Offset,omitempty" name:"Offset"`
+
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
+ Area *string `json:"Area,omitempty" name:"Area"`
}
-func (r *DescribeWebProtectionAttackEventsRequest) ToJsonString() string {
+func (r *DescribeWebProtectionClientIpListRequest) 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 *DescribeWebProtectionAttackEventsRequest) FromJsonString(s string) error {
+func (r *DescribeWebProtectionClientIpListRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
delete(f, "StartTime")
delete(f, "EndTime")
- delete(f, "PageSize")
- delete(f, "PageNo")
- delete(f, "Domains")
delete(f, "ZoneIds")
+ delete(f, "Domains")
+ delete(f, "Interval")
+ delete(f, "QueryCondition")
+ delete(f, "Limit")
+ delete(f, "Offset")
+ delete(f, "Area")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeWebProtectionAttackEventsRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeWebProtectionClientIpListRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeWebProtectionAttackEventsResponseParams struct {
- // DDos攻击事件数据
- Data *CCInterceptEventData `json:"Data,omitempty" name:"Data"`
-
- // 状态,1:失败,0:成功
- Status *int64 `json:"Status,omitempty" name:"Status"`
+type DescribeWebProtectionClientIpListResponseParams struct {
+ // CC防护客户端(攻击源)ip信息列表。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Data []*SecClientIp `json:"Data,omitempty" name:"Data"`
- // 返回消息
- Msg *string `json:"Msg,omitempty" name:"Msg"`
+ // 查询结果的总条数。
+ TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeWebProtectionAttackEventsResponse struct {
+type DescribeWebProtectionClientIpListResponse struct {
*tchttp.BaseResponse
- Response *DescribeWebProtectionAttackEventsResponseParams `json:"Response"`
+ Response *DescribeWebProtectionClientIpListResponseParams `json:"Response"`
}
-func (r *DescribeWebProtectionAttackEventsResponse) ToJsonString() string {
+func (r *DescribeWebProtectionClientIpListResponse) 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 *DescribeWebProtectionAttackEventsResponse) FromJsonString(s string) error {
+func (r *DescribeWebProtectionClientIpListResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
type DescribeWebProtectionDataRequestParams struct {
- // 开始时间,RFC3339格式。
+ // 开始时间。
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // 结束时间,RFC3339格式。
+ // 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 统计指标列表,取值有:
- // ccRate_interceptNum :速率限制规则限制次数 ;
- // ccAcl_interceptNum :自定义规则拦截次数 。
+ // 统计指标,取值有:
+ // ccRate_interceptNum:速率限制规则限制次数;
+ // ccAcl_interceptNum:自定义规则拦截次数。
MetricNames []*string `json:"MetricNames,omitempty" name:"MetricNames"`
- // 站点id列表,不填默认选择全部站点。
+ // 站点集合,不填默认选择全部站点。
ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // 子域名列表,不填默认选择全部子域名。
+ // 域名集合,不填默认选择全部子域名。
Domains []*string `json:"Domains,omitempty" name:"Domains"`
- // 该字段已废弃,请勿传。
- ProtocolType *string `json:"ProtocolType,omitempty" name:"ProtocolType"`
-
- // 该字段已废弃,请勿传。
- AttackType *string `json:"AttackType,omitempty" name:"AttackType"`
-
- // 查询时间粒度,取值有:
- // min :1分钟 ;
- // 5min :5分钟 ;
- // hour :1小时 ;
- // day :1天 。
+ // 查询时间粒度,支持的时间粒度有:
+ // min:1分钟;
+ // 5min:5分钟;
+ // hour:1小时;
+ // day:1天。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
Interval *string `json:"Interval,omitempty" name:"Interval"`
- // 筛选条件,取值有:
- // action :执行动作 。
+ // 筛选条件,key可选的值有:
+ // action:执行动作。
QueryCondition []*QueryCondition `json:"QueryCondition,omitempty" name:"QueryCondition"`
// 数据归属地区,取值有:
- // overseas :全球(除中国大陆地区)数据 ;
- // mainland :中国大陆地区数据 。不填默认查询overseas。
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
Area *string `json:"Area,omitempty" name:"Area"`
}
type DescribeWebProtectionDataRequest struct {
*tchttp.BaseRequest
- // 开始时间,RFC3339格式。
+ // 开始时间。
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // 结束时间,RFC3339格式。
+ // 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 统计指标列表,取值有:
- // ccRate_interceptNum :速率限制规则限制次数 ;
- // ccAcl_interceptNum :自定义规则拦截次数 。
+ // 统计指标,取值有:
+ // ccRate_interceptNum:速率限制规则限制次数;
+ // ccAcl_interceptNum:自定义规则拦截次数。
MetricNames []*string `json:"MetricNames,omitempty" name:"MetricNames"`
- // 站点id列表,不填默认选择全部站点。
+ // 站点集合,不填默认选择全部站点。
ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // 子域名列表,不填默认选择全部子域名。
+ // 域名集合,不填默认选择全部子域名。
Domains []*string `json:"Domains,omitempty" name:"Domains"`
- // 该字段已废弃,请勿传。
- ProtocolType *string `json:"ProtocolType,omitempty" name:"ProtocolType"`
-
- // 该字段已废弃,请勿传。
- AttackType *string `json:"AttackType,omitempty" name:"AttackType"`
-
- // 查询时间粒度,取值有:
- // min :1分钟 ;
- // 5min :5分钟 ;
- // hour :1小时 ;
- // day :1天 。
+ // 查询时间粒度,支持的时间粒度有:
+ // min:1分钟;
+ // 5min:5分钟;
+ // hour:1小时;
+ // day:1天。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
Interval *string `json:"Interval,omitempty" name:"Interval"`
- // 筛选条件,取值有:
- // action :执行动作 。
+ // 筛选条件,key可选的值有:
+ // action:执行动作。
QueryCondition []*QueryCondition `json:"QueryCondition,omitempty" name:"QueryCondition"`
// 数据归属地区,取值有:
- // overseas :全球(除中国大陆地区)数据 ;
- // mainland :中国大陆地区数据 。不填默认查询overseas。
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
Area *string `json:"Area,omitempty" name:"Area"`
}
@@ -7598,8 +9198,6 @@ func (r *DescribeWebProtectionDataRequest) FromJsonString(s string) error {
delete(f, "MetricNames")
delete(f, "ZoneIds")
delete(f, "Domains")
- delete(f, "ProtocolType")
- delete(f, "AttackType")
delete(f, "Interval")
delete(f, "QueryCondition")
delete(f, "Area")
@@ -7611,24 +9209,12 @@ func (r *DescribeWebProtectionDataRequest) FromJsonString(s string) error {
// Predefined struct for user
type DescribeWebProtectionDataResponseParams struct {
- // 数据详情。
+ // CC防护时序数据列表。
// 注意:此字段可能返回 null,表示取不到有效值。
Data []*SecEntry `json:"Data,omitempty" name:"Data"`
- // 请求响应状态,取值有:
- // 1 :失败 ;
- // 0 :成功 。
- Status *int64 `json:"Status,omitempty" name:"Status"`
-
- // 请求响应消息。
- Msg *string `json:"Msg,omitempty" name:"Msg"`
-
- // 查询时间粒度,取值有:
- // min :1分钟 ;
- // 5min :5分钟 ;
- // hour :1小时 ;
- // day :1天 。
- Interval *string `json:"Interval,omitempty" name:"Interval"`
+ // 查询结果的总条数。
+ TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
@@ -7651,342 +9237,346 @@ func (r *DescribeWebProtectionDataResponse) FromJsonString(s string) error {
}
// Predefined struct for user
-type DescribeWebProtectionLogRequestParams struct {
- // 起始时间。
+type DescribeWebProtectionHitRuleDetailRequestParams struct {
+ // 开始时间。
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
// 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 分页拉取的最大返回结果数。最大值:1000。
- PageSize *int64 `json:"PageSize,omitempty" name:"PageSize"`
-
- // 分页拉取的起始页号。最小值:1。
- PageNo *int64 `json:"PageNo,omitempty" name:"PageNo"`
+ // 所属规则数据类型,支持的规则有:
+ // rate:限速规则;
+ // acl:自定义规则。
+ EntityType *string `json:"EntityType,omitempty" name:"EntityType"`
- // 站点集合,不填默认查询所有站点。
+ // 站点集合,不填默认选择全部站点。
ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // 域名集合,不填默认查询所有域名。
+ // 域名列表,不填默认选择全部子域名。
Domains []*string `json:"Domains,omitempty" name:"Domains"`
- // 筛选条件。
- // 限速规则日志中取值有:
- // action :执行动作(处置方式);
- // ruleId :规则id ;
- // oriDomain :被攻击的子域名 ;
- // attackIp :攻击ip 。
- // 自定义规则日志中取值有:
- // action :执行动作(处置方式);
- // ruleId :规则id ;
- // oriDomain :被攻击的子域名 ;
- // attackIp :攻击ip ;
- // eventId :事件id ;
- // ua :用户代理 ;
- // requestMethod :请求方法 ;
- // uri :统一资源标识符 。
+ // 筛选条件,key可选的值有:
+ // action:执行动作。
QueryCondition []*QueryCondition `json:"QueryCondition,omitempty" name:"QueryCondition"`
- // 日志类型,取值有:
- // rate :限速日志 ;
- // acl :自定义规则日志 。不填默认为rate。
- EntityType *string `json:"EntityType,omitempty" name:"EntityType"`
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
+
+ // 分页的偏移量,默认值为0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+
+ // 查询时间粒度,支持的时间粒度有:
+ // min:1分钟;
+ // 5min:5分钟;
+ // hour:1小时;
+ // day:1天。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
// 数据归属地区,取值有:
- // overseas :全球(除中国大陆地区)数据 ;
- // mainland :中国大陆地区数据 。不填默认查询overseas。
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
Area *string `json:"Area,omitempty" name:"Area"`
}
-type DescribeWebProtectionLogRequest struct {
+type DescribeWebProtectionHitRuleDetailRequest struct {
*tchttp.BaseRequest
- // 起始时间。
+ // 开始时间。
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
// 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 分页拉取的最大返回结果数。最大值:1000。
- PageSize *int64 `json:"PageSize,omitempty" name:"PageSize"`
-
- // 分页拉取的起始页号。最小值:1。
- PageNo *int64 `json:"PageNo,omitempty" name:"PageNo"`
+ // 所属规则数据类型,支持的规则有:
+ // rate:限速规则;
+ // acl:自定义规则。
+ EntityType *string `json:"EntityType,omitempty" name:"EntityType"`
- // 站点集合,不填默认查询所有站点。
+ // 站点集合,不填默认选择全部站点。
ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // 域名集合,不填默认查询所有域名。
+ // 域名列表,不填默认选择全部子域名。
Domains []*string `json:"Domains,omitempty" name:"Domains"`
- // 筛选条件。
- // 限速规则日志中取值有:
- // action :执行动作(处置方式);
- // ruleId :规则id ;
- // oriDomain :被攻击的子域名 ;
- // attackIp :攻击ip 。
- // 自定义规则日志中取值有:
- // action :执行动作(处置方式);
- // ruleId :规则id ;
- // oriDomain :被攻击的子域名 ;
- // attackIp :攻击ip ;
- // eventId :事件id ;
- // ua :用户代理 ;
- // requestMethod :请求方法 ;
- // uri :统一资源标识符 。
+ // 筛选条件,key可选的值有:
+ // action:执行动作。
QueryCondition []*QueryCondition `json:"QueryCondition,omitempty" name:"QueryCondition"`
- // 日志类型,取值有:
- // rate :限速日志 ;
- // acl :自定义规则日志 。不填默认为rate。
- EntityType *string `json:"EntityType,omitempty" name:"EntityType"`
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
+
+ // 分页的偏移量,默认值为0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+
+ // 查询时间粒度,支持的时间粒度有:
+ // min:1分钟;
+ // 5min:5分钟;
+ // hour:1小时;
+ // day:1天。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
// 数据归属地区,取值有:
- // overseas :全球(除中国大陆地区)数据 ;
- // mainland :中国大陆地区数据 。不填默认查询overseas。
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
Area *string `json:"Area,omitempty" name:"Area"`
}
-func (r *DescribeWebProtectionLogRequest) ToJsonString() string {
+func (r *DescribeWebProtectionHitRuleDetailRequest) 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 *DescribeWebProtectionLogRequest) FromJsonString(s string) error {
+func (r *DescribeWebProtectionHitRuleDetailRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
delete(f, "StartTime")
delete(f, "EndTime")
- delete(f, "PageSize")
- delete(f, "PageNo")
+ delete(f, "EntityType")
delete(f, "ZoneIds")
delete(f, "Domains")
delete(f, "QueryCondition")
- delete(f, "EntityType")
+ delete(f, "Limit")
+ delete(f, "Offset")
+ delete(f, "Interval")
delete(f, "Area")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeWebProtectionLogRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeWebProtectionHitRuleDetailRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeWebProtectionLogResponseParams struct {
- // 限速拦截数据内容。
- Data *CCLogData `json:"Data,omitempty" name:"Data"`
-
- // 请求响应状态,取值有:
- // 1 :失败 ;
- // 0 :成功 。
- Status *int64 `json:"Status,omitempty" name:"Status"`
+type DescribeWebProtectionHitRuleDetailResponseParams struct {
+ // cc防护命中规则列表。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Data []*SecHitRuleInfo `json:"Data,omitempty" name:"Data"`
- // 请求响应信息。
- Msg *string `json:"Msg,omitempty" name:"Msg"`
+ // 查询结果的总条数。
+ TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeWebProtectionLogResponse struct {
+type DescribeWebProtectionHitRuleDetailResponse struct {
*tchttp.BaseResponse
- Response *DescribeWebProtectionLogResponseParams `json:"Response"`
+ Response *DescribeWebProtectionHitRuleDetailResponseParams `json:"Response"`
}
-func (r *DescribeWebProtectionLogResponse) ToJsonString() string {
+func (r *DescribeWebProtectionHitRuleDetailResponse) 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 *DescribeWebProtectionLogResponse) FromJsonString(s string) error {
+func (r *DescribeWebProtectionHitRuleDetailResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeZoneDDoSPolicyRequestParams struct {
- // 一级域名id
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+type DescribeWebProtectionTopDataRequestParams struct {
+ // 开始时间。
+ StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
+
+ // 结束时间。
+ EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
+
+ // 统计指标列表,取值有:
+ // ccRate_requestNum_url:速率限制规则请求次数url分布排行;
+ // ccRate_cipRequestNum_region:速率限制规则请求次数区域客户端ip分布排行;
+ // ccAcl_requestNum_url:自定义规则请求次数url分布排行;
+ // ccAcl_requestNum_cip:自定义规则请求次数客户端ip分布排行;
+ // ccAcl_cipRequestNum_region:自定义规则请求次数客户端区域分布排行。
+ MetricName *string `json:"MetricName,omitempty" name:"MetricName"`
+
+ // 查询时间粒度,取值有:
+ // min:1分钟;
+ // 5min:5分钟;
+ // hour:1小时;
+ // day:1天。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
+
+ // 站点集合,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+
+ // 域名集合,不填默认选择全部子域名。
+ Domains []*string `json:"Domains,omitempty" name:"Domains"`
+
+ // 查询前多少个数据,不填默认默认为10, 表示查询前top 10的数据。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
+
+ // 筛选条件,key可选的值有:
+ // action:执行动作 。
+ QueryCondition []*QueryCondition `json:"QueryCondition,omitempty" name:"QueryCondition"`
+
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
+ Area *string `json:"Area,omitempty" name:"Area"`
}
-type DescribeZoneDDoSPolicyRequest struct {
+type DescribeWebProtectionTopDataRequest struct {
*tchttp.BaseRequest
- // 一级域名id
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+ // 开始时间。
+ StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
+
+ // 结束时间。
+ EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
+
+ // 统计指标列表,取值有:
+ // ccRate_requestNum_url:速率限制规则请求次数url分布排行;
+ // ccRate_cipRequestNum_region:速率限制规则请求次数区域客户端ip分布排行;
+ // ccAcl_requestNum_url:自定义规则请求次数url分布排行;
+ // ccAcl_requestNum_cip:自定义规则请求次数客户端ip分布排行;
+ // ccAcl_cipRequestNum_region:自定义规则请求次数客户端区域分布排行。
+ MetricName *string `json:"MetricName,omitempty" name:"MetricName"`
+
+ // 查询时间粒度,取值有:
+ // min:1分钟;
+ // 5min:5分钟;
+ // hour:1小时;
+ // day:1天。不填将根据开始时间跟结束时间的间距自动推算粒度,具体为:一小时范围内以min粒度查询,两天范围内以5min粒度查询,七天范围内以hour粒度查询,超过七天以day粒度查询。
+ Interval *string `json:"Interval,omitempty" name:"Interval"`
+
+ // 站点集合,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+
+ // 域名集合,不填默认选择全部子域名。
+ Domains []*string `json:"Domains,omitempty" name:"Domains"`
+
+ // 查询前多少个数据,不填默认默认为10, 表示查询前top 10的数据。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
+
+ // 筛选条件,key可选的值有:
+ // action:执行动作 。
+ QueryCondition []*QueryCondition `json:"QueryCondition,omitempty" name:"QueryCondition"`
+
+ // 数据归属地区,取值有:
+ // overseas:全球(除中国大陆地区)数据;
+ // mainland:中国大陆地区数据。不填将根据用户所在地智能选择地区。
+ Area *string `json:"Area,omitempty" name:"Area"`
}
-func (r *DescribeZoneDDoSPolicyRequest) ToJsonString() string {
+func (r *DescribeWebProtectionTopDataRequest) 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 *DescribeZoneDDoSPolicyRequest) FromJsonString(s string) error {
+func (r *DescribeWebProtectionTopDataRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "ZoneId")
+ delete(f, "StartTime")
+ delete(f, "EndTime")
+ delete(f, "MetricName")
+ delete(f, "Interval")
+ delete(f, "ZoneIds")
+ delete(f, "Domains")
+ delete(f, "Limit")
+ delete(f, "QueryCondition")
+ delete(f, "Area")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeZoneDDoSPolicyRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeWebProtectionTopDataRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeZoneDDoSPolicyResponseParams struct {
- // 用户appid
- AppId *int64 `json:"AppId,omitempty" name:"AppId"`
-
- // 防护分区
- ShieldAreas []*ShieldArea `json:"ShieldAreas,omitempty" name:"ShieldAreas"`
-
- // 所有子域名信息,包含安全加速/内容加速
+type DescribeWebProtectionTopDataResponseParams struct {
+ // CC防护的TopN数据列表。
// 注意:此字段可能返回 null,表示取不到有效值。
- Domains []*DDoSApplication `json:"Domains,omitempty" name:"Domains"`
+ Data []*TopEntry `json:"Data,omitempty" name:"Data"`
+
+ // 查询结果的总条数。
+ TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeZoneDDoSPolicyResponse struct {
+type DescribeWebProtectionTopDataResponse struct {
*tchttp.BaseResponse
- Response *DescribeZoneDDoSPolicyResponseParams `json:"Response"`
+ Response *DescribeWebProtectionTopDataResponseParams `json:"Response"`
}
-func (r *DescribeZoneDDoSPolicyResponse) ToJsonString() string {
+func (r *DescribeWebProtectionTopDataResponse) 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 *DescribeZoneDDoSPolicyResponse) FromJsonString(s string) error {
+func (r *DescribeWebProtectionTopDataResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeZoneDetailsRequestParams struct {
- // 站点 ID
- Id *string `json:"Id,omitempty" name:"Id"`
+type DescribeZoneDDoSPolicyRequestParams struct {
+ // 站点Id。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
}
-type DescribeZoneDetailsRequest struct {
+type DescribeZoneDDoSPolicyRequest struct {
*tchttp.BaseRequest
- // 站点 ID
- Id *string `json:"Id,omitempty" name:"Id"`
+ // 站点Id。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
}
-func (r *DescribeZoneDetailsRequest) ToJsonString() string {
+func (r *DescribeZoneDDoSPolicyRequest) 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 *DescribeZoneDetailsRequest) FromJsonString(s string) error {
+func (r *DescribeZoneDDoSPolicyRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "Id")
+ delete(f, "ZoneId")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeZoneDetailsRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeZoneDDoSPolicyRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type DescribeZoneDetailsResponseParams struct {
- // 站点 ID
- Id *string `json:"Id,omitempty" name:"Id"`
-
- // 站点名称
- Name *string `json:"Name,omitempty" name:"Name"`
-
- // 用户当前使用的 NS 列表
- OriginalNameServers []*string `json:"OriginalNameServers,omitempty" name:"OriginalNameServers"`
-
- // 腾讯云分配给用户的 NS 列表
- NameServers []*string `json:"NameServers,omitempty" name:"NameServers"`
-
- // 站点状态
- // - active:NS 已切换
- // - pending:NS 未切换
- // - moved:NS 已切走
- // - deactivated:被封禁
- Status *string `json:"Status,omitempty" name:"Status"`
-
- // 站点接入方式
- // - full:NS 接入
- // - partial:CNAME 接入
- Type *string `json:"Type,omitempty" name:"Type"`
-
- // 站点是否关闭
- Paused *bool `json:"Paused,omitempty" name:"Paused"`
-
- // 是否开启 CNAME 加速
- // - enabled:开启
- // - disabled:关闭
- CnameSpeedUp *string `json:"CnameSpeedUp,omitempty" name:"CnameSpeedUp"`
-
- // cname切换验证状态
- // - finished 切换完成
- // - pending 切换验证中
- CnameStatus *string `json:"CnameStatus,omitempty" name:"CnameStatus"`
-
- // 资源标签
- // 注意:此字段可能返回 null,表示取不到有效值。
- Tags []*Tag `json:"Tags,omitempty" name:"Tags"`
-
- // 站点接入地域,取值为:
- // global:全球;
- // mainland:中国大陆;
- // overseas:境外区域。
- Area *string `json:"Area,omitempty" name:"Area"`
-
- // 计费资源
- // 注意:此字段可能返回 null,表示取不到有效值。
- Resources []*Resource `json:"Resources,omitempty" name:"Resources"`
-
- // 站点修改时间
- ModifiedOn *string `json:"ModifiedOn,omitempty" name:"ModifiedOn"`
-
- // 站点创建时间
- CreatedOn *string `json:"CreatedOn,omitempty" name:"CreatedOn"`
-
- // 用户自定义 NS 信息
- // 注意:此字段可能返回 null,表示取不到有效值。
- VanityNameServers *VanityNameServers `json:"VanityNameServers,omitempty" name:"VanityNameServers"`
+type DescribeZoneDDoSPolicyResponseParams struct {
+ // DDoS防护分区。
+ ShieldAreas []*ShieldArea `json:"ShieldAreas,omitempty" name:"ShieldAreas"`
- // 用户自定义 NS IP 信息
+ // 所有开启代理的子域名信息。
// 注意:此字段可能返回 null,表示取不到有效值。
- VanityNameServersIps []*VanityNameServersIps `json:"VanityNameServersIps,omitempty" name:"VanityNameServersIps"`
+ DDoSHosts []*DDoSHost `json:"DDoSHosts,omitempty" name:"DDoSHosts"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type DescribeZoneDetailsResponse struct {
+type DescribeZoneDDoSPolicyResponse struct {
*tchttp.BaseResponse
- Response *DescribeZoneDetailsResponseParams `json:"Response"`
+ Response *DescribeZoneDDoSPolicyResponseParams `json:"Response"`
}
-func (r *DescribeZoneDetailsResponse) ToJsonString() string {
+func (r *DescribeZoneDDoSPolicyResponse) 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 *DescribeZoneDetailsResponse) FromJsonString(s string) error {
+func (r *DescribeZoneDDoSPolicyResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
@@ -8024,80 +9614,9 @@ func (r *DescribeZoneSettingRequest) FromJsonString(s string) error {
// Predefined struct for user
type DescribeZoneSettingResponseParams struct {
- // 站点ID。
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
-
- // 站点名称。
- Zone *string `json:"Zone,omitempty" name:"Zone"`
-
- // 缓存过期时间配置。
- // 注意:此字段可能返回 null,表示取不到有效值。
- Cache *CacheConfig `json:"Cache,omitempty" name:"Cache"`
-
- // 节点缓存键配置。
- // 注意:此字段可能返回 null,表示取不到有效值。
- CacheKey *CacheKey `json:"CacheKey,omitempty" name:"CacheKey"`
-
- // Quic访问配置。
- // 注意:此字段可能返回 null,表示取不到有效值。
- Quic *Quic `json:"Quic,omitempty" name:"Quic"`
-
- // POST请求传输配置。
- // 注意:此字段可能返回 null,表示取不到有效值。
- PostMaxSize *PostMaxSize `json:"PostMaxSize,omitempty" name:"PostMaxSize"`
-
- // 智能压缩配置。
- // 注意:此字段可能返回 null,表示取不到有效值。
- Compression *Compression `json:"Compression,omitempty" name:"Compression"`
-
- // Http2回源配置。
- // 注意:此字段可能返回 null,表示取不到有效值。
- UpstreamHttp2 *UpstreamHttp2 `json:"UpstreamHttp2,omitempty" name:"UpstreamHttp2"`
-
- // 访问协议强制Https跳转配置。
- // 注意:此字段可能返回 null,表示取不到有效值。
- ForceRedirect *ForceRedirect `json:"ForceRedirect,omitempty" name:"ForceRedirect"`
-
- // Https 加速配置。
- // 注意:此字段可能返回 null,表示取不到有效值。
- Https *Https `json:"Https,omitempty" name:"Https"`
-
- // 源站配置。
- // 注意:此字段可能返回 null,表示取不到有效值。
- Origin *Origin `json:"Origin,omitempty" name:"Origin"`
-
- // 智能加速配置。
- // 注意:此字段可能返回 null,表示取不到有效值。
- SmartRouting *SmartRouting `json:"SmartRouting,omitempty" name:"SmartRouting"`
-
- // 浏览器缓存配置。
- // 注意:此字段可能返回 null,表示取不到有效值。
- MaxAge *MaxAge `json:"MaxAge,omitempty" name:"MaxAge"`
-
- // 离线缓存配置。
- // 注意:此字段可能返回 null,表示取不到有效值。
- OfflineCache *OfflineCache `json:"OfflineCache,omitempty" name:"OfflineCache"`
-
- // WebSocket配置。
- // 注意:此字段可能返回 null,表示取不到有效值。
- WebSocket *WebSocket `json:"WebSocket,omitempty" name:"WebSocket"`
-
- // 客户端IP回源请求头配置。
- // 注意:此字段可能返回 null,表示取不到有效值。
- ClientIpHeader *ClientIp `json:"ClientIpHeader,omitempty" name:"ClientIpHeader"`
-
- // 缓存预刷新配置。
- // 注意:此字段可能返回 null,表示取不到有效值。
- CachePrefresh *CachePrefresh `json:"CachePrefresh,omitempty" name:"CachePrefresh"`
-
- // Ipv6访问配置。
+ // 站点配置。
// 注意:此字段可能返回 null,表示取不到有效值。
- Ipv6 *Ipv6Access `json:"Ipv6,omitempty" name:"Ipv6"`
-
- // 站点加速区域信息,取值有:
- // mainland:中国境内加速;
- // overseas:中国境外加速。
- Area *string `json:"Area,omitempty" name:"Area"`
+ ZoneSetting *ZoneSetting `json:"ZoneSetting,omitempty" name:"ZoneSetting"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
@@ -8121,27 +9640,29 @@ func (r *DescribeZoneSettingResponse) FromJsonString(s string) error {
// Predefined struct for user
type DescribeZonesRequestParams struct {
- // 分页查询偏移量。默认值:0,最小值:0。
+ // 分页查询偏移量。默认值:0。
Offset *int64 `json:"Offset,omitempty" name:"Offset"`
- // 分页查询限制数目。默认值:1000,最大值:1000。
+ // 分页查询限制数目。默认值:20,最大值:1000。
Limit *int64 `json:"Limit,omitempty" name:"Limit"`
- // 查询条件过滤器,复杂类型。
- Filters []*ZoneFilter `json:"Filters,omitempty" name:"Filters"`
+ // 过滤条件,Filters.Values的上限为20。详细的过滤条件如下:
+ // zone-name
按照【站点名称】进行过滤。
类型:String
必选:否zone-id
按照【站点ID】进行过滤。站点ID形如:zone-xxx。
类型:String
必选:否status
按照【站点状态】进行过滤。
类型:String
必选:否tag-key
按照【标签键】进行过滤。
类型:String
必选:否tag-value
按照【标签值】进行过滤。
类型:String
必选:否Fuzzy
按照【是否模糊查询】进行过滤。仅支持过滤字段名为zone-name。模糊查询时,Values长度最小为1。
类型:Boolean
必选:否
默认值:false
+ Filters []*AdvancedFilter `json:"Filters,omitempty" name:"Filters"`
}
type DescribeZonesRequest struct {
*tchttp.BaseRequest
- // 分页查询偏移量。默认值:0,最小值:0。
+ // 分页查询偏移量。默认值:0。
Offset *int64 `json:"Offset,omitempty" name:"Offset"`
- // 分页查询限制数目。默认值:1000,最大值:1000。
+ // 分页查询限制数目。默认值:20,最大值:1000。
Limit *int64 `json:"Limit,omitempty" name:"Limit"`
- // 查询条件过滤器,复杂类型。
- Filters []*ZoneFilter `json:"Filters,omitempty" name:"Filters"`
+ // 过滤条件,Filters.Values的上限为20。详细的过滤条件如下:
+ // zone-name
按照【站点名称】进行过滤。
类型:String
必选:否zone-id
按照【站点ID】进行过滤。站点ID形如:zone-xxx。
类型:String
必选:否status
按照【站点状态】进行过滤。
类型:String
必选:否tag-key
按照【标签键】进行过滤。
类型:String
必选:否tag-value
按照【标签值】进行过滤。
类型:String
必选:否Fuzzy
按照【是否模糊查询】进行过滤。仅支持过滤字段名为zone-name。模糊查询时,Values长度最小为1。
类型:Boolean
必选:否
默认值:false
+ Filters []*AdvancedFilter `json:"Filters,omitempty" name:"Filters"`
}
func (r *DescribeZonesRequest) ToJsonString() string {
@@ -8194,200 +9715,336 @@ func (r *DescribeZonesResponse) FromJsonString(s string) error {
}
type DetailHost struct {
- // 腾讯云账号ID
- AppId *int64 `json:"AppId,omitempty" name:"AppId"`
-
- // 站点ID
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 加速服务状态
- // process:部署中
- // online:已启动
- // offline:已关闭
+ // 加速服务状态,取值为:
+ // process:部署中;
+ // online:已启动;
+ // offline:已关闭。
Status *string `json:"Status,omitempty" name:"Status"`
- // 域名
+ // 域名。
Host *string `json:"Host,omitempty" name:"Host"`
-}
-type DnsDataFilter struct {
- // 参数名称,取值范围:
- // zone:站点名
- // host:域名
- // type:dns解析类型
- // code:dns返回状态码
- // area:解析服务器所在区域
- Name *string `json:"Name,omitempty" name:"Name"`
+ // 站点名称。
+ ZoneName *string `json:"ZoneName,omitempty" name:"ZoneName"`
- // 参数值
- // 当Name=area时,Value取值范围:
- // 亚洲:Asia
- // 欧洲:Europe
- // 非洲:Africa
- // 大洋洲:Oceania
- // 美洲:Americas
- //
- // 当Name=code时,Value取值范围:
- // NoError:成功的响应
- // NXDomain:只在权威域名服务器的响应消息中有效,标示请求中请求的域不存在
- // NotImp:域名服务器不支持请求的类型
- // Refused:域名服务器因为策略的原因拒绝执行请求的操作
- Value *string `json:"Value,omitempty" name:"Value"`
+ // 分配的Cname域名
+ Cname *string `json:"Cname,omitempty" name:"Cname"`
- // 参数值
- // 当Name=area时,Value取值范围:
- // 亚洲:Asia
- // 欧洲:Europe
- // 非洲:Africa
- // 大洋洲:Oceania
- // 美洲:Americas
- //
- // 当Name=code时,Value取值范围:
- // NoError:成功的响应
- // NXDomain:只在权威域名服务器的响应消息中有效,标示请求中请求的域不存在
- // NotImp:域名服务器不支持请求的类型
- // Refused:域名服务器因为策略的原因拒绝执行请求的操作
- Values []*string `json:"Values,omitempty" name:"Values"`
+ // 资源ID。
+ Id *string `json:"Id,omitempty" name:"Id"`
+
+ // 实例ID。
+ InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"`
+
+ // 锁状态。
+ Lock *int64 `json:"Lock,omitempty" name:"Lock"`
+
+ // 域名状态类型。
+ Mode *int64 `json:"Mode,omitempty" name:"Mode"`
+
+ // 域名加速地域,取值有:
+ // global:全球;
+ // mainland:中国大陆;
+ // overseas:境外区域。
+ Area *string `json:"Area,omitempty" name:"Area"`
+
+ // 加速类型配置项。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ AccelerateType *AccelerateType `json:"AccelerateType,omitempty" name:"AccelerateType"`
+
+ // Https配置项。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Https *Https `json:"Https,omitempty" name:"Https"`
+
+ // 缓存配置项。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ CacheConfig *CacheConfig `json:"CacheConfig,omitempty" name:"CacheConfig"`
+
+ // 源站配置项。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Origin *Origin `json:"Origin,omitempty" name:"Origin"`
+
+ // 安全类型。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ SecurityType *SecurityType `json:"SecurityType,omitempty" name:"SecurityType"`
+
+ // 缓存键配置项。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ CacheKey *CacheKey `json:"CacheKey,omitempty" name:"CacheKey"`
+
+ // 智能压缩配置项。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Compression *Compression `json:"Compression,omitempty" name:"Compression"`
+
+ // Waf防护配置项。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Waf *Waf `json:"Waf,omitempty" name:"Waf"`
+
+ // CC防护配置项。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ CC *CC `json:"CC,omitempty" name:"CC"`
+
+ // DDoS防护配置。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ DDoS *DDoS `json:"DDoS,omitempty" name:"DDoS"`
+
+ // 智能路由配置项。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ SmartRouting *SmartRouting `json:"SmartRouting,omitempty" name:"SmartRouting"`
+
+ // Ipv6访问配置项。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Ipv6 *Ipv6 `json:"Ipv6,omitempty" name:"Ipv6"`
}
-type DnsRecord struct {
- // 记录 ID
- Id *string `json:"Id,omitempty" name:"Id"`
+type DistrictStatistics struct {
+ // ISO 3166-2 国家/地区简写,详情请参考[ISO 3166-2](https://zh.m.wikipedia.org/zh-hans/ISO_3166-2)。
+ Alpha2 *string `json:"Alpha2,omitempty" name:"Alpha2"`
- // 记录类型
- Type *string `json:"Type,omitempty" name:"Type"`
+ // 整体拨测用时,单位ms。
+ LoadTime *int64 `json:"LoadTime,omitempty" name:"LoadTime"`
+}
- // 主机记录
- Name *string `json:"Name,omitempty" name:"Name"`
+type DnsData struct {
+ // 时间。
+ Time *string `json:"Time,omitempty" name:"Time"`
+
+ // 数值。
+ Value *uint64 `json:"Value,omitempty" name:"Value"`
+}
- // 记录值
+type DnsRecord struct {
+ // 记录 ID。
+ DnsRecordId *string `json:"DnsRecordId,omitempty" name:"DnsRecordId"`
+
+ // DNS记录类型,取值有:
+ // A:将域名指向一个外网 IPv4 地址,如 8.8.8.8;
+ // AAAA:将域名指向一个外网 IPv6 地址;
+ // MX:用于邮箱服务器,相关记录值/优先级参数由邮件注册商提供。存在多条 MX 记录时,优先级越低越优先;
+ // CNAME:将域名指向另一个域名,再由该域名解析出最终 IP 地址;
+ // TXT:对域名进行标识和说明,常用于域名验证和 SPF 记录(反垃圾邮件);
+ // NS:如果需要将子域名交给其他 DNS 服务商解析,则需要添加 NS 记录。根域名无法添加 NS 记录;
+ // CAA:指定可为本站点颁发证书的 CA;
+ // SRV:标识某台服务器使用了某个服务,常见于微软系统的目录管理。
+ DnsRecordType *string `json:"DnsRecordType,omitempty" name:"DnsRecordType"`
+
+ // 记录名称。
+ DnsRecordName *string `json:"DnsRecordName,omitempty" name:"DnsRecordName"`
+
+ // 记录值。
Content *string `json:"Content,omitempty" name:"Content"`
- // 代理模式
+ // 代理模式,取值有:
+ // dns_only:仅DNS解析;
+ // proxied:代理加速。
Mode *string `json:"Mode,omitempty" name:"Mode"`
- // TTL 值
- Ttl *int64 `json:"Ttl,omitempty" name:"Ttl"`
+ // 缓存时间,数值越小,修改记录各地生效时间越快,单位:秒。
+ TTL *int64 `json:"TTL,omitempty" name:"TTL"`
- // 优先级
- // 注意:此字段可能返回 null,表示取不到有效值。
+ // MX记录优先级,数值越小越优先。
Priority *int64 `json:"Priority,omitempty" name:"Priority"`
- // 创建时间
+ // 创建时间。
CreatedOn *string `json:"CreatedOn,omitempty" name:"CreatedOn"`
- // 修改时间
+ // 修改时间。
ModifiedOn *string `json:"ModifiedOn,omitempty" name:"ModifiedOn"`
- // 域名锁
+ // 域名锁定状态。
Locked *bool `json:"Locked,omitempty" name:"Locked"`
- // 站点 ID
+ // 站点 ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 站点名称
+ // 站点名称。
ZoneName *string `json:"ZoneName,omitempty" name:"ZoneName"`
- // 解析状态
- // active: 生效
- // pending: 不生效
+ // 记录解析状态,取值有:
+ // active:生效;
+ // pending:不生效。
Status *string `json:"Status,omitempty" name:"Status"`
- // CNAME 地址
+ // CNAME 地址。
// 注意:此字段可能返回 null,表示取不到有效值。
Cname *string `json:"Cname,omitempty" name:"Cname"`
- // 域名是否开启了负载均衡,四层代理,安全
- // - lb 负载均衡
- // - security 安全
- // - l4 四层代理
- // 注意:此字段可能返回 null,表示取不到有效值。
- DomainStatus []*string `json:"DomainStatus,omitempty" name:"DomainStatus"`
-}
+ // 域名服务类型,取值有:
+ // lb:负载均衡;
+ // security:安全;
+ // l4:四层代理。
+ DomainStatus []*string `json:"DomainStatus,omitempty" name:"DomainStatus"`
+}
+
+type DnssecInfo struct {
+ // 标志。
+ Flags *int64 `json:"Flags,omitempty" name:"Flags"`
+
+ // 加密算法。
+ Algorithm *string `json:"Algorithm,omitempty" name:"Algorithm"`
+
+ // 加密类型。
+ KeyType *string `json:"KeyType,omitempty" name:"KeyType"`
+
+ // 摘要类型。
+ DigestType *string `json:"DigestType,omitempty" name:"DigestType"`
+
+ // 摘要算法。
+ DigestAlgorithm *string `json:"DigestAlgorithm,omitempty" name:"DigestAlgorithm"`
+
+ // 摘要信息。
+ Digest *string `json:"Digest,omitempty" name:"Digest"`
+
+ // DS 记录值。
+ DS *string `json:"DS,omitempty" name:"DS"`
+
+ // 密钥标签。
+ KeyTag *int64 `json:"KeyTag,omitempty" name:"KeyTag"`
+
+ // 公钥。
+ PublicKey *string `json:"PublicKey,omitempty" name:"PublicKey"`
+}
+
+// Predefined struct for user
+type DownloadL4LogsRequestParams struct {
+ // 开始时间。
+ StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
+
+ // 结束时间。
+ EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
+
+ // 站点集合,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
+
+ // 四层实例ID集合。
+ ProxyIds []*string `json:"ProxyIds,omitempty" name:"ProxyIds"`
+
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
+
+ // 分页的偏移量,默认值为0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+}
+
+type DownloadL4LogsRequest struct {
+ *tchttp.BaseRequest
+
+ // 开始时间。
+ StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
+
+ // 结束时间。
+ EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
-type DnsRecordFilter struct {
- // 过滤字段名,支持的列表如下:
- // - name: 站点名。
- // - status: 站点状态
- Name *string `json:"Name,omitempty" name:"Name"`
+ // 站点集合,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // 过滤字段值
- Values []*string `json:"Values,omitempty" name:"Values"`
+ // 四层实例ID集合。
+ ProxyIds []*string `json:"ProxyIds,omitempty" name:"ProxyIds"`
- // 是否启用模糊查询,仅支持过滤字段名为name。模糊查询时,Values长度最大为1
- Fuzzy *bool `json:"Fuzzy,omitempty" name:"Fuzzy"`
-}
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
-type DnssecInfo struct {
- // 标志
- Flags *int64 `json:"Flags,omitempty" name:"Flags"`
+ // 分页的偏移量,默认值为0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
+}
- // 加密算法
- Algorithm *string `json:"Algorithm,omitempty" name:"Algorithm"`
+func (r *DownloadL4LogsRequest) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
- // 加密类型
- KeyType *string `json:"KeyType,omitempty" name:"KeyType"`
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *DownloadL4LogsRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "StartTime")
+ delete(f, "EndTime")
+ delete(f, "ZoneIds")
+ delete(f, "ProxyIds")
+ delete(f, "Limit")
+ delete(f, "Offset")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DownloadL4LogsRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
- // 摘要类型
- DigestType *string `json:"DigestType,omitempty" name:"DigestType"`
+// Predefined struct for user
+type DownloadL4LogsResponseParams struct {
+ // 四层离线日志数据列表。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Data []*L4OfflineLog `json:"Data,omitempty" name:"Data"`
- // 摘要算法
- DigestAlgorithm *string `json:"DigestAlgorithm,omitempty" name:"DigestAlgorithm"`
+ // 查询结果的总条数。
+ TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
- // 摘要信息
- Digest *string `json:"Digest,omitempty" name:"Digest"`
+ // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
+}
- // DS 记录值
- DS *string `json:"DS,omitempty" name:"DS"`
+type DownloadL4LogsResponse struct {
+ *tchttp.BaseResponse
+ Response *DownloadL4LogsResponseParams `json:"Response"`
+}
- // 密钥标签
- KeyTag *int64 `json:"KeyTag,omitempty" name:"KeyTag"`
+func (r *DownloadL4LogsResponse) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
- // 公钥
- PublicKey *string `json:"PublicKey,omitempty" name:"PublicKey"`
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *DownloadL4LogsResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
type DownloadL7LogsRequestParams struct {
- // 起始时间(需严格按照RFC3339标准传参)
+ // 开始时间。
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // 结束时间(需严格按照RFC3339标准传参)
+ // 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 每页展示条数
- PageSize *int64 `json:"PageSize,omitempty" name:"PageSize"`
+ // 站点集合,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // 当前页
- PageNo *int64 `json:"PageNo,omitempty" name:"PageNo"`
+ // 子域名集合,不填默认选择全部子域名。
+ Domains []*string `json:"Domains,omitempty" name:"Domains"`
- // 站点名集合
- Zones []*string `json:"Zones,omitempty" name:"Zones"`
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
- // 子域名集合
- Domains []*string `json:"Domains,omitempty" name:"Domains"`
+ // 分页的偏移量,默认值为0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
}
type DownloadL7LogsRequest struct {
*tchttp.BaseRequest
- // 起始时间(需严格按照RFC3339标准传参)
+ // 开始时间。
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
- // 结束时间(需严格按照RFC3339标准传参)
+ // 结束时间。
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
- // 每页展示条数
- PageSize *int64 `json:"PageSize,omitempty" name:"PageSize"`
+ // 站点集合,不填默认选择全部站点。
+ ZoneIds []*string `json:"ZoneIds,omitempty" name:"ZoneIds"`
- // 当前页
- PageNo *int64 `json:"PageNo,omitempty" name:"PageNo"`
+ // 子域名集合,不填默认选择全部子域名。
+ Domains []*string `json:"Domains,omitempty" name:"Domains"`
- // 站点名集合
- Zones []*string `json:"Zones,omitempty" name:"Zones"`
+ // 分页查询的限制数目,默认值为20,最大查询条目为1000。
+ Limit *int64 `json:"Limit,omitempty" name:"Limit"`
- // 子域名集合
- Domains []*string `json:"Domains,omitempty" name:"Domains"`
+ // 分页的偏移量,默认值为0。
+ Offset *int64 `json:"Offset,omitempty" name:"Offset"`
}
func (r *DownloadL7LogsRequest) ToJsonString() string {
@@ -8404,10 +10061,10 @@ func (r *DownloadL7LogsRequest) FromJsonString(s string) error {
}
delete(f, "StartTime")
delete(f, "EndTime")
- delete(f, "PageSize")
- delete(f, "PageNo")
- delete(f, "Zones")
+ delete(f, "ZoneIds")
delete(f, "Domains")
+ delete(f, "Limit")
+ delete(f, "Offset")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DownloadL7LogsRequest has unknown keys!", "")
}
@@ -8416,25 +10073,12 @@ func (r *DownloadL7LogsRequest) FromJsonString(s string) error {
// Predefined struct for user
type DownloadL7LogsResponseParams struct {
- // 七层离线日志data
+ // 七层离线日志数据列表。
// 注意:此字段可能返回 null,表示取不到有效值。
Data []*L7OfflineLog `json:"Data,omitempty" name:"Data"`
- // 页面大小
- // 注意:此字段可能返回 null,表示取不到有效值。
- PageSize *int64 `json:"PageSize,omitempty" name:"PageSize"`
-
- // 页号
- // 注意:此字段可能返回 null,表示取不到有效值。
- PageNo *int64 `json:"PageNo,omitempty" name:"PageNo"`
-
- // 总页数
- // 注意:此字段可能返回 null,表示取不到有效值。
- Pages *int64 `json:"Pages,omitempty" name:"Pages"`
-
- // 总条数
- // 注意:此字段可能返回 null,表示取不到有效值。
- TotalSize *int64 `json:"TotalSize,omitempty" name:"TotalSize"`
+ // 查询结果的总条数。
+ TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
@@ -8456,24 +10100,156 @@ func (r *DownloadL7LogsResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
+type DropPageConfig struct {
+ // 配置开关,取值有:
+ // on:开启;
+ // off:关闭。
+ Switch *string `json:"Switch,omitempty" name:"Switch"`
+
+ // Waf(托管规则)模块的拦截页面配置。如果为null,默认使用历史配置。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ WafDropPageDetail *DropPageDetail `json:"WafDropPageDetail,omitempty" name:"WafDropPageDetail"`
+
+ // 自定义页面的拦截页面配置。如果为null,默认使用历史配置。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ AclDropPageDetail *DropPageDetail `json:"AclDropPageDetail,omitempty" name:"AclDropPageDetail"`
+}
+
+type DropPageDetail struct {
+ // 拦截页面的唯一Id。系统默认包含一个自带拦截页面,Id值为0。
+ // 该Id可通过创建拦截页面接口进行上传获取。如传入0,代表使用系统默认拦截页面。
+ PageId *int64 `json:"PageId,omitempty" name:"PageId"`
+
+ // 拦截页面的HTTP状态码。状态码范围是100-600。
+ StatusCode *int64 `json:"StatusCode,omitempty" name:"StatusCode"`
+
+ // 页面文件名或url。
+ Name *string `json:"Name,omitempty" name:"Name"`
+
+ // 页面的类型,取值有:
+ // file:页面文件内容;
+ // url:上传的url地址。
+ Type *string `json:"Type,omitempty" name:"Type"`
+}
+
+type ExceptConfig struct {
+ // 配置开关,取值有:
+ // on:开启;
+ // off:关闭。
+ Switch *string `json:"Switch,omitempty" name:"Switch"`
+
+ // 例外规则详情。如果为null,默认使用历史配置。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ ExceptUserRules []*ExceptUserRule `json:"ExceptUserRules,omitempty" name:"ExceptUserRules"`
+}
+
+type ExceptUserRule struct {
+ // 规则名称。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ RuleName *string `json:"RuleName,omitempty" name:"RuleName"`
+
+ // 规则的处置方式,当前仅支持skip:跳过全部托管规则。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Action *string `json:"Action,omitempty" name:"Action"`
+
+ // 规则生效状态,取值有:
+ // on:生效;
+ // off:失效。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ RuleStatus *string `json:"RuleStatus,omitempty" name:"RuleStatus"`
+
+ // 规则ID。仅出参使用。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ RuleID *int64 `json:"RuleID,omitempty" name:"RuleID"`
+
+ // 更新时间。仅出参使用
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ UpdateTime *string `json:"UpdateTime,omitempty" name:"UpdateTime"`
+
+ // 匹配条件。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ ExceptUserRuleConditions []*ExceptUserRuleCondition `json:"ExceptUserRuleConditions,omitempty" name:"ExceptUserRuleConditions"`
+
+ // 规则生效的范围。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ ExceptUserRuleScope *ExceptUserRuleScope `json:"ExceptUserRuleScope,omitempty" name:"ExceptUserRuleScope"`
+
+ // 优先级,取值范围0-100。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ RulePriority *int64 `json:"RulePriority,omitempty" name:"RulePriority"`
+}
+
+type ExceptUserRuleCondition struct {
+ // 匹配项,取值有:
+ // host:请求域名;
+ // sip:客户端IP;
+ // ua:User-Agent;
+ // cookie:会话 Cookie;
+ // cgi:CGI 脚本;
+ // xff:XFF 扩展头部;
+ // url:请求 URL;
+ // accept:请求内容类型;
+ // method:请求方式;
+ // header:请求头部;
+ // sip_proto:网络层协议。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ MatchFrom *string `json:"MatchFrom,omitempty" name:"MatchFrom"`
+
+ // 匹配项的参数。当 MatchFrom 为 header 时,可以填入 header 的 key 作为参数。
+ MatchParam *string `json:"MatchParam,omitempty" name:"MatchParam"`
+
+ // 匹配操作符,取值有:
+ // equal:字符串等于;
+ // not_equal:数值不等于;
+ // include:字符包含;
+ // not_include:字符不包含;
+ // match:ip匹配;
+ // not_match:ip不匹配;
+ // include_area:地域包含;
+ // is_empty:存在字段但值为空;
+ // not_exists:不存在关键字段;
+ // regexp:正则匹配;
+ // len_gt:数值大于;
+ // len_lt:数值小于;
+ // len_eq:数值等于;
+ // match_prefix:前缀匹配;
+ // match_suffix:后缀匹配;
+ // wildcard:通配符。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Operator *string `json:"Operator,omitempty" name:"Operator"`
+
+ // 匹配值。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ MatchContent *string `json:"MatchContent,omitempty" name:"MatchContent"`
+}
+
+type ExceptUserRuleScope struct {
+ // 生效的模块。当前仅支持waf:托管规则。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Modules []*string `json:"Modules,omitempty" name:"Modules"`
+}
+
type FailReason struct {
- // 失败原因
+ // 失败原因。
Reason *string `json:"Reason,omitempty" name:"Reason"`
- // 处理失败的资源列表。
- // 该列表元素来源于输入参数中的Targets,因此格式和入参中的Targets保持一致
+ // 处理失败的资源列表,该列表元素来源于输入参数中的Targets,因此格式和入参中的Targets保持一致。
Targets []*string `json:"Targets,omitempty" name:"Targets"`
}
type Filter struct {
- // 筛选维度
- Key *string `json:"Key,omitempty" name:"Key"`
+ // 需要过滤的字段。
+ Name *string `json:"Name,omitempty" name:"Name"`
- // 操作符
- Operator *string `json:"Operator,omitempty" name:"Operator"`
+ // 字段的过滤值。
+ Values []*string `json:"Values,omitempty" name:"Values"`
+}
- // 筛选维度值
- Value []*string `json:"Value,omitempty" name:"Value"`
+type FollowOrigin struct {
+ // 遵循源站配置开关,取值有:
+ // on:开启;
+ // off:关闭。
+ Switch *string `json:"Switch,omitempty" name:"Switch"`
}
type ForceRedirect struct {
@@ -8490,38 +10266,70 @@ type ForceRedirect struct {
}
type GeoIp struct {
- // 地域ID
+ // 地域ID。
RegionId *int64 `json:"RegionId,omitempty" name:"RegionId"`
- // 国家名
+ // 国家名。
Country *string `json:"Country,omitempty" name:"Country"`
- // 洲
+ // 所属洲。
Continent *string `json:"Continent,omitempty" name:"Continent"`
- // 国家英文名
- CountryEn *string `json:"CountryEn,omitempty" name:"CountryEn"`
-
- // 洲
- ContinentEn *string `json:"ContinentEn,omitempty" name:"ContinentEn"`
+ // 城市名。
+ Province *string `json:"Province,omitempty" name:"Province"`
}
type Header struct {
- // HTTP头部
+ // HTTP头部。
Name *string `json:"Name,omitempty" name:"Name"`
- // HTTP头部值
+ // HTTP头部值。
Value *string `json:"Value,omitempty" name:"Value"`
}
-type HostCertSetting struct {
- // 域名
+type HostCertInfo struct {
+ // 服务器证书 ID。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ CertId *string `json:"CertId,omitempty" name:"CertId"`
+
+ // 证书备注名。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Alias *string `json:"Alias,omitempty" name:"Alias"`
+
+ // 证书类型,取值有:
+ // default:默认证书;
+ // upload:用户上传;
+ // managed:腾讯云托管。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Type *string `json:"Type,omitempty" name:"Type"`
+
+ // 证书过期时间。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ ExpireTime *string `json:"ExpireTime,omitempty" name:"ExpireTime"`
+
+ // 证书部署时间。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ DeployTime *string `json:"DeployTime,omitempty" name:"DeployTime"`
+
+ // 签名算法。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ SignAlgo *string `json:"SignAlgo,omitempty" name:"SignAlgo"`
+
+ // 证书状态,取值有:
+ // deployed:已部署;
+ // process:部署中。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Status *string `json:"Status,omitempty" name:"Status"`
+}
+
+type HostsCertificate struct {
+ // 域名。
// 注意:此字段可能返回 null,表示取不到有效值。
Host *string `json:"Host,omitempty" name:"Host"`
- // 服务端证书配置
+ // 服务端证书配置。
// 注意:此字段可能返回 null,表示取不到有效值。
- CertInfo []*ServerCertInfo `json:"CertInfo,omitempty" name:"CertInfo"`
+ HostCertInfo *HostCertInfo `json:"HostCertInfo,omitempty" name:"HostCertInfo"`
}
type Hsts struct {
@@ -8571,216 +10379,171 @@ type Https struct {
// HSTS 配置。
// 注意:此字段可能返回 null,表示取不到有效值。
Hsts *Hsts `json:"Hsts,omitempty" name:"Hsts"`
-}
-
-// Predefined struct for user
-type IdentifyZoneRequestParams struct {
- // 站点名称
- Name *string `json:"Name,omitempty" name:"Name"`
-}
-
-type IdentifyZoneRequest struct {
- *tchttp.BaseRequest
-
- // 站点名称
- Name *string `json:"Name,omitempty" name:"Name"`
-}
-
-func (r *IdentifyZoneRequest) 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 *IdentifyZoneRequest) FromJsonString(s string) error {
- f := make(map[string]interface{})
- if err := json.Unmarshal([]byte(s), &f); err != nil {
- return err
- }
- delete(f, "Name")
- if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "IdentifyZoneRequest has unknown keys!", "")
- }
- return json.Unmarshal([]byte(s), &r)
+ // 证书配置。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ CertInfo []*ServerCertInfo `json:"CertInfo,omitempty" name:"CertInfo"`
}
-// Predefined struct for user
-type IdentifyZoneResponseParams struct {
- // 站点名称
- Name *string `json:"Name,omitempty" name:"Name"`
-
- // 子域
- Subdomain *string `json:"Subdomain,omitempty" name:"Subdomain"`
-
- // 记录类型
- RecordType *string `json:"RecordType,omitempty" name:"RecordType"`
-
- // 记录值
- RecordValue *string `json:"RecordValue,omitempty" name:"RecordValue"`
-
- // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
- RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
-}
+type Identification struct {
+ // 站点名称。
+ ZoneName *string `json:"ZoneName,omitempty" name:"ZoneName"`
-type IdentifyZoneResponse struct {
- *tchttp.BaseResponse
- Response *IdentifyZoneResponseParams `json:"Response"`
-}
+ // 验证状态,取值有:
+ // pending:验证中;
+ // finished:验证完成。
+ Status *string `json:"Status,omitempty" name:"Status"`
-func (r *IdentifyZoneResponse) ToJsonString() string {
- b, _ := json.Marshal(r)
- return string(b)
-}
+ // 站点归属信息。
+ Ascription *AscriptionInfo `json:"Ascription,omitempty" name:"Ascription"`
-// FromJsonString It is highly **NOT** recommended to use this function
-// because it has no param check, nor strict type check
-func (r *IdentifyZoneResponse) FromJsonString(s string) error {
- return json.Unmarshal([]byte(s), &r)
+ // 域名当前的 NS 记录。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ OriginalNameServers []*string `json:"OriginalNameServers,omitempty" name:"OriginalNameServers"`
}
// Predefined struct for user
-type ImportDnsRecordsRequestParams struct {
- // 站点 ID
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
-
- // 文件内容
- File *string `json:"File,omitempty" name:"File"`
+type IdentifyZoneRequestParams struct {
+ // 站点名称。
+ ZoneName *string `json:"ZoneName,omitempty" name:"ZoneName"`
}
-type ImportDnsRecordsRequest struct {
+type IdentifyZoneRequest struct {
*tchttp.BaseRequest
- // 站点 ID
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
-
- // 文件内容
- File *string `json:"File,omitempty" name:"File"`
+ // 站点名称。
+ ZoneName *string `json:"ZoneName,omitempty" name:"ZoneName"`
}
-func (r *ImportDnsRecordsRequest) ToJsonString() string {
+func (r *IdentifyZoneRequest) 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 *ImportDnsRecordsRequest) FromJsonString(s string) error {
+func (r *IdentifyZoneRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "ZoneId")
- delete(f, "File")
+ delete(f, "ZoneName")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ImportDnsRecordsRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "IdentifyZoneRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type ImportDnsRecordsResponseParams struct {
- // 记录 ID
- Ids []*string `json:"Ids,omitempty" name:"Ids"`
+type IdentifyZoneResponseParams struct {
+ // 站点归属信息。
+ Ascription *AscriptionInfo `json:"Ascription,omitempty" name:"Ascription"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type ImportDnsRecordsResponse struct {
+type IdentifyZoneResponse struct {
*tchttp.BaseResponse
- Response *ImportDnsRecordsResponseParams `json:"Response"`
+ Response *IdentifyZoneResponseParams `json:"Response"`
}
-func (r *ImportDnsRecordsResponse) ToJsonString() string {
+func (r *IdentifyZoneResponse) 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 *ImportDnsRecordsResponse) FromJsonString(s string) error {
+func (r *IdentifyZoneResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type IntelligenceRule struct {
- // 开关
+ // 开关,取值有:
+ // on:开启;
+ // off:关闭。
// 注意:此字段可能返回 null,表示取不到有效值。
Switch *string `json:"Switch,omitempty" name:"Switch"`
- // 规则详情
+ // 规则详情。
// 注意:此字段可能返回 null,表示取不到有效值。
- Items []*IntelligenceRuleItem `json:"Items,omitempty" name:"Items"`
+ IntelligenceRuleItems []*IntelligenceRuleItem `json:"IntelligenceRuleItems,omitempty" name:"IntelligenceRuleItems"`
}
type IntelligenceRuleItem struct {
- // 恶意BOT
- // 注意:此字段可能返回 null,表示取不到有效值。
+ // 智能分析标签,取值有:
+ // evil_bot:恶意bot;
+ // suspect_bot:疑似bot;
+ // good_bot:良好bot;
+ // normal:正常请求。
Label *string `json:"Label,omitempty" name:"Label"`
- // 动作
- // 注意:此字段可能返回 null,表示取不到有效值。
+ // 触发智能分析标签对应的处置方式,取值有:
+ // drop:拦截;
+ // trans:放行;
+ // alg:Javascript挑战;
+ // captcha:数字验证码;
+ // monitor:观察。
Action *string `json:"Action,omitempty" name:"Action"`
}
type IpTableConfig struct {
- // 开关
+ // 开关,取值有:
+ // on:开启;
+ // off:关闭;
// 注意:此字段可能返回 null,表示取不到有效值。
Switch *string `json:"Switch,omitempty" name:"Switch"`
- // []
+ // 基础管控规则。如果为null,默认使用历史配置。
// 注意:此字段可能返回 null,表示取不到有效值。
- Rules []*IpTableRule `json:"Rules,omitempty" name:"Rules"`
+ IpTableRules []*IpTableRule `json:"IpTableRules,omitempty" name:"IpTableRules"`
}
type IpTableRule struct {
- // 动作: drop拦截,trans放行,monitor观察
- // 注意:此字段可能返回 null,表示取不到有效值。
+ // 动作,取值有:
+ // drop:拦截;
+ // trans:放行;
+ // monitor:观察。
Action *string `json:"Action,omitempty" name:"Action"`
- // 根据类型匹配:ip(根据ip), area(根据区域)
- // 注意:此字段可能返回 null,表示取不到有效值。
+ // 根据类型匹配,取值有:
+ // ip:对ip进行匹配;
+ // area:对ip所属地区匹配。
MatchFrom *string `json:"MatchFrom,omitempty" name:"MatchFrom"`
- // 匹配内容
- // 注意:此字段可能返回 null,表示取不到有效值。
+ // 匹配内容。
MatchContent *string `json:"MatchContent,omitempty" name:"MatchContent"`
- // 规则id
- // 注意:此字段可能返回 null,表示取不到有效值。
+ // 规则id。仅出参使用。
RuleID *int64 `json:"RuleID,omitempty" name:"RuleID"`
- // 更新时间
- // 注意:此字段可能返回 null,表示取不到有效值。
+ // 更新时间。仅出参使用。
UpdateTime *string `json:"UpdateTime,omitempty" name:"UpdateTime"`
}
-type Ipv6Access struct {
+type Ipv6 struct {
// Ipv6访问功能配置,取值有:
// on:开启Ipv6访问功能;
// off:关闭Ipv6访问功能。
Switch *string `json:"Switch,omitempty" name:"Switch"`
}
-type L7OfflineLog struct {
- // 日志打包开始时间
- // 注意:此字段可能返回 null,表示取不到有效值。
+type L4OfflineLog struct {
+ // 日志打包开始时间。
LogTime *int64 `json:"LogTime,omitempty" name:"LogTime"`
- // 子域名
+ // 四层实例ID。
// 注意:此字段可能返回 null,表示取不到有效值。
- Domain *string `json:"Domain,omitempty" name:"Domain"`
+ ProxyId *string `json:"ProxyId,omitempty" name:"ProxyId"`
- // 原始大小 单位byte
- // 注意:此字段可能返回 null,表示取不到有效值。
+ // 原始大小 单位byte。
Size *int64 `json:"Size,omitempty" name:"Size"`
- // 下载地址
- // 注意:此字段可能返回 null,表示取不到有效值。
+ // 下载地址。
Url *string `json:"Url,omitempty" name:"Url"`
- // 日志数据包名
- // 注意:此字段可能返回 null,表示取不到有效值。
+ // 日志数据包名。
LogPacketName *string `json:"LogPacketName,omitempty" name:"LogPacketName"`
// 加速区域,取值有:
@@ -8789,71 +10552,131 @@ type L7OfflineLog struct {
Area *string `json:"Area,omitempty" name:"Area"`
}
+type L7OfflineLog struct {
+ // 日志打包开始时间。
+ LogTime *int64 `json:"LogTime,omitempty" name:"LogTime"`
+
+ // 子域名。
+ Domain *string `json:"Domain,omitempty" name:"Domain"`
+
+ // 原始大小,单位byte。
+ Size *int64 `json:"Size,omitempty" name:"Size"`
+
+ // 下载地址。
+ Url *string `json:"Url,omitempty" name:"Url"`
+
+ // 日志数据包名。
+ LogPacketName *string `json:"LogPacketName,omitempty" name:"LogPacketName"`
+
+ // 加速区域,取值有:
+ // mainland:中国大陆境内;
+ // overseas:全球(不含中国大陆)。
+ Area *string `json:"Area,omitempty" name:"Area"`
+}
+
type LoadBalancing struct {
- // 负载均衡ID
+ // 负载均衡ID。
LoadBalancingId *string `json:"LoadBalancingId,omitempty" name:"LoadBalancingId"`
- // 站点ID
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 子域名,填写@表示根域
+ // 子域名,填写@表示根域。
Host *string `json:"Host,omitempty" name:"Host"`
- // 代理模式:
- // dns_only: 仅DNS
- // proxied: 开启代理
+ // 代理模式,取值有:
+ // dns_only:仅DNS;
+ // proxied:开启代理。
Type *string `json:"Type,omitempty" name:"Type"`
- // 当Type=dns_only表示DNS的TTL时间
+ // 当Type=dns_only表示DNS记录的缓存时间。
TTL *uint64 `json:"TTL,omitempty" name:"TTL"`
- // 使用的源站组ID
- OriginId []*string `json:"OriginId,omitempty" name:"OriginId"`
+ // 状态,取值有:
+ // online:部署成功;
+ // process:部署中。
+ Status *string `json:"Status,omitempty" name:"Status"`
+
+ // 调度域名。
+ Cname *string `json:"Cname,omitempty" name:"Cname"`
+
+ // 主源源站组ID。
+ OriginGroupId *string `json:"OriginGroupId,omitempty" name:"OriginGroupId"`
- // 使用的源站信息
- Origin []*OriginGroup `json:"Origin,omitempty" name:"Origin"`
+ // 备用源站源站组ID。为空表示不适用备用源站。
+ BackupOriginGroupId *string `json:"BackupOriginGroupId,omitempty" name:"BackupOriginGroupId"`
- // 更新时间
+ // 更新时间。
UpdateTime *string `json:"UpdateTime,omitempty" name:"UpdateTime"`
+}
- // 状态
- Status *string `json:"Status,omitempty" name:"Status"`
+type LogSetInfo struct {
+ // 日志集所属地区。
+ LogSetRegion *string `json:"LogSetRegion,omitempty" name:"LogSetRegion"`
- // 调度域名
- // 注意:此字段可能返回 null,表示取不到有效值。
- Cname *string `json:"Cname,omitempty" name:"Cname"`
+ // 日志集名
+ LogSetName *string `json:"LogSetName,omitempty" name:"LogSetName"`
+
+ // 日志集Id
+ LogSetId *string `json:"LogSetId,omitempty" name:"LogSetId"`
+
+ // 该日志集是否已被删除, 可选的值有:
+ // no: 日志集没有被删除;
+ // yes: 日志集已经被删除;
+ Deleted *string `json:"Deleted,omitempty" name:"Deleted"`
}
-type ManagedRule struct {
- // 规则id
- RuleId *int64 `json:"RuleId,omitempty" name:"RuleId"`
+type LogTopicDetailInfo struct {
+ // 推送任务的任务名称。
+ TaskName *string `json:"TaskName,omitempty" name:"TaskName"`
- // 规则描述
- Description *string `json:"Description,omitempty" name:"Description"`
+ // 日志集所属的地域。
+ LogSetRegion *string `json:"LogSetRegion,omitempty" name:"LogSetRegion"`
- // 规则类型名
- RuleTypeName *string `json:"RuleTypeName,omitempty" name:"RuleTypeName"`
+ // 推送任务的类型。
+ EntityType *string `json:"EntityType,omitempty" name:"EntityType"`
- // 策略规则防护等级
- RuleLevelDesc *string `json:"RuleLevelDesc,omitempty" name:"RuleLevelDesc"`
+ // 任务实体列表。
+ EntityList []*string `json:"EntityList,omitempty" name:"EntityList"`
- // 更新时间
- UpdateTime *string `json:"UpdateTime,omitempty" name:"UpdateTime"`
+ // 日志集ID。
+ LogSetId *string `json:"LogSetId,omitempty" name:"LogSetId"`
- // 规则当前状态 block, allow
- Status *string `json:"Status,omitempty" name:"Status"`
+ // 日志集名称。
+ LogSetName *string `json:"LogSetName,omitempty" name:"LogSetName"`
- // 规则标签
- // 注意:此字段可能返回 null,表示取不到有效值。
- RuleTags []*string `json:"RuleTags,omitempty" name:"RuleTags"`
+ // 推送任务主题ID。
+ TopicId *string `json:"TopicId,omitempty" name:"TopicId"`
- // 规则类型详细描述
+ // 推送任务主题名称。
+ TopicName *string `json:"TopicName,omitempty" name:"TopicName"`
+
+ // 推送任务主题保存时间,单位为天。
+ Period *uint64 `json:"Period,omitempty" name:"Period"`
+
+ // 推送任务是否开启。
+ Enabled *bool `json:"Enabled,omitempty" name:"Enabled"`
+
+ // 推送任务创建时间,时间格式为: YYYY-mm-dd HH:MM:SS。
+ CreateTime *string `json:"CreateTime,omitempty" name:"CreateTime"`
+
+ // 加速区域,取值有:
+ // mainland:中国大陆境内;
+ // overseas:全球(不含中国大陆)。
+ Area *string `json:"Area,omitempty" name:"Area"`
+
+ // 站点ID。
// 注意:此字段可能返回 null,表示取不到有效值。
- RuleTypeDesc *string `json:"RuleTypeDesc,omitempty" name:"RuleTypeDesc"`
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 规则类型id
+ // 站点名称。
// 注意:此字段可能返回 null,表示取不到有效值。
- RuleTypeId *int64 `json:"RuleTypeId,omitempty" name:"RuleTypeId"`
+ ZoneName *string `json:"ZoneName,omitempty" name:"ZoneName"`
+
+ // 是否被删除了,取值有:
+ // yes: 已经被删除;
+ // no: 没有被删除。
+ Deleted *string `json:"Deleted,omitempty" name:"Deleted"`
}
type MaxAge struct {
@@ -8867,6 +10690,167 @@ type MaxAge struct {
MaxAgeTime *int64 `json:"MaxAgeTime,omitempty" name:"MaxAgeTime"`
}
+// Predefined struct for user
+type ModifyAlarmConfigRequestParams struct {
+ // 告警服务类型,取值有:
+ // ddos:ddos告警服务。
+ ServiceType *string `json:"ServiceType,omitempty" name:"ServiceType"`
+
+ // 站点ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 告警维度值列表。
+ EntityList []*string `json:"EntityList,omitempty" name:"EntityList"`
+
+ // 告警阈值,不传或者传0表示不修改阈值。
+ Threshold *int64 `json:"Threshold,omitempty" name:"Threshold"`
+
+ // 是否使用默认值,只有在不传Threshold或者Threshold=0时该参数有效。
+ IsDefault *bool `json:"IsDefault,omitempty" name:"IsDefault"`
+}
+
+type ModifyAlarmConfigRequest struct {
+ *tchttp.BaseRequest
+
+ // 告警服务类型,取值有:
+ // ddos:ddos告警服务。
+ ServiceType *string `json:"ServiceType,omitempty" name:"ServiceType"`
+
+ // 站点ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 告警维度值列表。
+ EntityList []*string `json:"EntityList,omitempty" name:"EntityList"`
+
+ // 告警阈值,不传或者传0表示不修改阈值。
+ Threshold *int64 `json:"Threshold,omitempty" name:"Threshold"`
+
+ // 是否使用默认值,只有在不传Threshold或者Threshold=0时该参数有效。
+ IsDefault *bool `json:"IsDefault,omitempty" name:"IsDefault"`
+}
+
+func (r *ModifyAlarmConfigRequest) 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 *ModifyAlarmConfigRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "ServiceType")
+ delete(f, "ZoneId")
+ delete(f, "EntityList")
+ delete(f, "Threshold")
+ delete(f, "IsDefault")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyAlarmConfigRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type ModifyAlarmConfigResponseParams struct {
+ // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
+}
+
+type ModifyAlarmConfigResponse struct {
+ *tchttp.BaseResponse
+ Response *ModifyAlarmConfigResponseParams `json:"Response"`
+}
+
+func (r *ModifyAlarmConfigResponse) 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 *ModifyAlarmConfigResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type ModifyAlarmDefaultThresholdRequestParams struct {
+ // 告警服务类型,取值有:
+ // ddos:ddos告警服务。
+ ServiceType *string `json:"ServiceType,omitempty" name:"ServiceType"`
+
+ // 站点ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 新的阈值,单位为Mbps,最小阈值为10。
+ Threshold *int64 `json:"Threshold,omitempty" name:"Threshold"`
+
+ // 防护实体,如果是四层防护,防护实体为通道ID。如果是七层防护,防护实体为站点名称。
+ Entity *string `json:"Entity,omitempty" name:"Entity"`
+}
+
+type ModifyAlarmDefaultThresholdRequest struct {
+ *tchttp.BaseRequest
+
+ // 告警服务类型,取值有:
+ // ddos:ddos告警服务。
+ ServiceType *string `json:"ServiceType,omitempty" name:"ServiceType"`
+
+ // 站点ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 新的阈值,单位为Mbps,最小阈值为10。
+ Threshold *int64 `json:"Threshold,omitempty" name:"Threshold"`
+
+ // 防护实体,如果是四层防护,防护实体为通道ID。如果是七层防护,防护实体为站点名称。
+ Entity *string `json:"Entity,omitempty" name:"Entity"`
+}
+
+func (r *ModifyAlarmDefaultThresholdRequest) 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 *ModifyAlarmDefaultThresholdRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "ServiceType")
+ delete(f, "ZoneId")
+ delete(f, "Threshold")
+ delete(f, "Entity")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyAlarmDefaultThresholdRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type ModifyAlarmDefaultThresholdResponseParams struct {
+ // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
+}
+
+type ModifyAlarmDefaultThresholdResponse struct {
+ *tchttp.BaseResponse
+ Response *ModifyAlarmDefaultThresholdResponseParams `json:"Response"`
+}
+
+func (r *ModifyAlarmDefaultThresholdResponse) 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 *ModifyAlarmDefaultThresholdResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
// Predefined struct for user
type ModifyApplicationProxyRequestParams struct {
// 站点ID。
@@ -8879,13 +10863,8 @@ type ModifyApplicationProxyRequestParams struct {
// 当ProxyType=instance时,表示代理名称。
ProxyName *string `json:"ProxyName,omitempty" name:"ProxyName"`
- // 参数已经废弃。
- ForwardClientIp *string `json:"ForwardClientIp,omitempty" name:"ForwardClientIp"`
-
- // 参数已经废弃。
- SessionPersist *bool `json:"SessionPersist,omitempty" name:"SessionPersist"`
-
- // 会话保持时间,不填写保持原有配置。取值范围:30-3600,单位:秒。
+ // 会话保持时间,取值范围:30-3600,单位:秒。
+ // 不填写保持原有配置。
SessionPersistTime *uint64 `json:"SessionPersistTime,omitempty" name:"SessionPersistTime"`
// 四层代理模式,取值有:
@@ -8894,7 +10873,7 @@ type ModifyApplicationProxyRequestParams struct {
ProxyType *string `json:"ProxyType,omitempty" name:"ProxyType"`
// Ipv6访问配置,不填写保持原有配置。
- Ipv6 *Ipv6Access `json:"Ipv6,omitempty" name:"Ipv6"`
+ Ipv6 *Ipv6 `json:"Ipv6,omitempty" name:"Ipv6"`
}
type ModifyApplicationProxyRequest struct {
@@ -8910,13 +10889,8 @@ type ModifyApplicationProxyRequest struct {
// 当ProxyType=instance时,表示代理名称。
ProxyName *string `json:"ProxyName,omitempty" name:"ProxyName"`
- // 参数已经废弃。
- ForwardClientIp *string `json:"ForwardClientIp,omitempty" name:"ForwardClientIp"`
-
- // 参数已经废弃。
- SessionPersist *bool `json:"SessionPersist,omitempty" name:"SessionPersist"`
-
- // 会话保持时间,不填写保持原有配置。取值范围:30-3600,单位:秒。
+ // 会话保持时间,取值范围:30-3600,单位:秒。
+ // 不填写保持原有配置。
SessionPersistTime *uint64 `json:"SessionPersistTime,omitempty" name:"SessionPersistTime"`
// 四层代理模式,取值有:
@@ -8925,7 +10899,7 @@ type ModifyApplicationProxyRequest struct {
ProxyType *string `json:"ProxyType,omitempty" name:"ProxyType"`
// Ipv6访问配置,不填写保持原有配置。
- Ipv6 *Ipv6Access `json:"Ipv6,omitempty" name:"Ipv6"`
+ Ipv6 *Ipv6 `json:"Ipv6,omitempty" name:"Ipv6"`
}
func (r *ModifyApplicationProxyRequest) ToJsonString() string {
@@ -8943,8 +10917,6 @@ func (r *ModifyApplicationProxyRequest) FromJsonString(s string) error {
delete(f, "ZoneId")
delete(f, "ProxyId")
delete(f, "ProxyName")
- delete(f, "ForwardClientIp")
- delete(f, "SessionPersist")
delete(f, "SessionPersistTime")
delete(f, "ProxyType")
delete(f, "Ipv6")
@@ -8956,9 +10928,6 @@ func (r *ModifyApplicationProxyRequest) FromJsonString(s string) error {
// Predefined struct for user
type ModifyApplicationProxyResponseParams struct {
- // 代理ID。
- ProxyId *string `json:"ProxyId,omitempty" name:"ProxyId"`
-
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
@@ -8981,96 +10950,98 @@ func (r *ModifyApplicationProxyResponse) FromJsonString(s string) error {
// Predefined struct for user
type ModifyApplicationProxyRuleRequestParams struct {
- // 站点ID
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 代理ID
+ // 代理ID。
ProxyId *string `json:"ProxyId,omitempty" name:"ProxyId"`
- // 规则ID
+ // 规则ID。
RuleId *string `json:"RuleId,omitempty" name:"RuleId"`
- // 协议,取值为TCP或者UDP
- Proto *string `json:"Proto,omitempty" name:"Proto"`
+ // 源站类型,取值有:
+ // custom:手动添加;
+ // origins:源站组。不填保持原有值。
+ OriginType *string `json:"OriginType,omitempty" name:"OriginType"`
// 端口,支持格式:
// 80:80端口
- // 81-90:81至90端口
+ // 81-90:81至90端口。不填保持原有值。
Port []*string `json:"Port,omitempty" name:"Port"`
- // 源站类型,取值:
- // custom:手动添加
- // origins:源站组
- OriginType *string `json:"OriginType,omitempty" name:"OriginType"`
+ // 协议,取值有:
+ // TCP:TCP协议;
+ // UDP:UDP协议。不填保持原有值。
+ Proto *string `json:"Proto,omitempty" name:"Proto"`
// 源站信息:
// 当OriginType=custom时,表示一个或多个源站,如:
// OriginValue=["8.8.8.8:80","9.9.9.9:80"]
- // OriginValue=["test.com:80"]
- //
- // 当OriginType=origins时,包含一个元素,表示源站组ID,如:
- // OriginValue=["origin-xxx"]
+ // OriginValue=["test.com:80"];
+ // 当OriginType=origins时,要求有且仅有一个元素,表示源站组ID,如:
+ // OriginValue=["origin-537f5b41-162a-11ed-abaa-525400c5da15"]。
+ // 不填保持原有值。
OriginValue []*string `json:"OriginValue,omitempty" name:"OriginValue"`
- // 传递客户端IP,当Proto=TCP时,取值:
- // TOA:TOA
- // PPV1: Proxy Protocol传递,协议版本V1
- // PPV2: Proxy Protocol传递,协议版本V2
- // OFF:不传递
- // 当Proto=UDP时,取值:
- // PPV2: Proxy Protocol传递,协议版本V2
- // OFF:不传递
+ // 传递客户端IP,取值有:
+ // TOA:TOA(仅Proto=TCP时可选);
+ // PPV1:Proxy Protocol传递,协议版本V1(仅Proto=TCP时可选);
+ // PPV2:Proxy Protocol传递,协议版本V2;
+ // OFF:不传递。不填保持原有值。
ForwardClientIp *string `json:"ForwardClientIp,omitempty" name:"ForwardClientIp"`
- // 是否开启会话保持
+ // 是否开启会话保持,取值有:
+ // true:开启;
+ // false:关闭。不填保持原有值。
SessionPersist *bool `json:"SessionPersist,omitempty" name:"SessionPersist"`
}
type ModifyApplicationProxyRuleRequest struct {
*tchttp.BaseRequest
- // 站点ID
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 代理ID
+ // 代理ID。
ProxyId *string `json:"ProxyId,omitempty" name:"ProxyId"`
- // 规则ID
+ // 规则ID。
RuleId *string `json:"RuleId,omitempty" name:"RuleId"`
- // 协议,取值为TCP或者UDP
- Proto *string `json:"Proto,omitempty" name:"Proto"`
+ // 源站类型,取值有:
+ // custom:手动添加;
+ // origins:源站组。不填保持原有值。
+ OriginType *string `json:"OriginType,omitempty" name:"OriginType"`
// 端口,支持格式:
// 80:80端口
- // 81-90:81至90端口
+ // 81-90:81至90端口。不填保持原有值。
Port []*string `json:"Port,omitempty" name:"Port"`
- // 源站类型,取值:
- // custom:手动添加
- // origins:源站组
- OriginType *string `json:"OriginType,omitempty" name:"OriginType"`
+ // 协议,取值有:
+ // TCP:TCP协议;
+ // UDP:UDP协议。不填保持原有值。
+ Proto *string `json:"Proto,omitempty" name:"Proto"`
// 源站信息:
// 当OriginType=custom时,表示一个或多个源站,如:
// OriginValue=["8.8.8.8:80","9.9.9.9:80"]
- // OriginValue=["test.com:80"]
- //
- // 当OriginType=origins时,包含一个元素,表示源站组ID,如:
- // OriginValue=["origin-xxx"]
+ // OriginValue=["test.com:80"];
+ // 当OriginType=origins时,要求有且仅有一个元素,表示源站组ID,如:
+ // OriginValue=["origin-537f5b41-162a-11ed-abaa-525400c5da15"]。
+ // 不填保持原有值。
OriginValue []*string `json:"OriginValue,omitempty" name:"OriginValue"`
- // 传递客户端IP,当Proto=TCP时,取值:
- // TOA:TOA
- // PPV1: Proxy Protocol传递,协议版本V1
- // PPV2: Proxy Protocol传递,协议版本V2
- // OFF:不传递
- // 当Proto=UDP时,取值:
- // PPV2: Proxy Protocol传递,协议版本V2
- // OFF:不传递
+ // 传递客户端IP,取值有:
+ // TOA:TOA(仅Proto=TCP时可选);
+ // PPV1:Proxy Protocol传递,协议版本V1(仅Proto=TCP时可选);
+ // PPV2:Proxy Protocol传递,协议版本V2;
+ // OFF:不传递。不填保持原有值。
ForwardClientIp *string `json:"ForwardClientIp,omitempty" name:"ForwardClientIp"`
- // 是否开启会话保持
+ // 是否开启会话保持,取值有:
+ // true:开启;
+ // false:关闭。不填保持原有值。
SessionPersist *bool `json:"SessionPersist,omitempty" name:"SessionPersist"`
}
@@ -9088,10 +11059,10 @@ func (r *ModifyApplicationProxyRuleRequest) FromJsonString(s string) error {
}
delete(f, "ZoneId")
delete(f, "ProxyId")
- delete(f, "RuleId")
- delete(f, "Proto")
- delete(f, "Port")
+ delete(f, "RuleId")
delete(f, "OriginType")
+ delete(f, "Port")
+ delete(f, "Proto")
delete(f, "OriginValue")
delete(f, "ForwardClientIp")
delete(f, "SessionPersist")
@@ -9103,9 +11074,6 @@ func (r *ModifyApplicationProxyRuleRequest) FromJsonString(s string) error {
// Predefined struct for user
type ModifyApplicationProxyRuleResponseParams struct {
- // 规则ID
- RuleId *string `json:"RuleId,omitempty" name:"RuleId"`
-
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
@@ -9128,36 +11096,36 @@ func (r *ModifyApplicationProxyRuleResponse) FromJsonString(s string) error {
// Predefined struct for user
type ModifyApplicationProxyRuleStatusRequestParams struct {
- // 站点ID
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 代理ID
+ // 代理ID。
ProxyId *string `json:"ProxyId,omitempty" name:"ProxyId"`
- // 规则ID
+ // 规则ID。
RuleId *string `json:"RuleId,omitempty" name:"RuleId"`
- // 状态
- // offline: 停用
- // online: 启用
+ // 状态,取值有:
+ // offline: 停用;
+ // online: 启用。
Status *string `json:"Status,omitempty" name:"Status"`
}
type ModifyApplicationProxyRuleStatusRequest struct {
*tchttp.BaseRequest
- // 站点ID
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 代理ID
+ // 代理ID。
ProxyId *string `json:"ProxyId,omitempty" name:"ProxyId"`
- // 规则ID
+ // 规则ID。
RuleId *string `json:"RuleId,omitempty" name:"RuleId"`
- // 状态
- // offline: 停用
- // online: 启用
+ // 状态,取值有:
+ // offline: 停用;
+ // online: 启用。
Status *string `json:"Status,omitempty" name:"Status"`
}
@@ -9185,9 +11153,6 @@ func (r *ModifyApplicationProxyRuleStatusRequest) FromJsonString(s string) error
// Predefined struct for user
type ModifyApplicationProxyRuleStatusResponseParams struct {
- // 规则ID
- RuleId *string `json:"RuleId,omitempty" name:"RuleId"`
-
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
@@ -9210,30 +11175,30 @@ func (r *ModifyApplicationProxyRuleStatusResponse) FromJsonString(s string) erro
// Predefined struct for user
type ModifyApplicationProxyStatusRequestParams struct {
- // 站点ID
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 代理ID
+ // 代理ID。
ProxyId *string `json:"ProxyId,omitempty" name:"ProxyId"`
- // 状态
- // offline: 停用
- // online: 启用
+ // 状态,取值有:
+ // offline: 停用;
+ // online: 启用。
Status *string `json:"Status,omitempty" name:"Status"`
}
type ModifyApplicationProxyStatusRequest struct {
*tchttp.BaseRequest
- // 站点ID
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 代理ID
+ // 代理ID。
ProxyId *string `json:"ProxyId,omitempty" name:"ProxyId"`
- // 状态
- // offline: 停用
- // online: 启用
+ // 状态,取值有:
+ // offline: 停用;
+ // online: 启用。
Status *string `json:"Status,omitempty" name:"Status"`
}
@@ -9260,9 +11225,6 @@ func (r *ModifyApplicationProxyStatusRequest) FromJsonString(s string) error {
// Predefined struct for user
type ModifyApplicationProxyStatusResponseParams struct {
- // 代理ID
- ProxyId *string `json:"ProxyId,omitempty" name:"ProxyId"`
-
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
@@ -9285,38 +11247,46 @@ func (r *ModifyApplicationProxyStatusResponse) FromJsonString(s string) error {
// Predefined struct for user
type ModifyDDoSPolicyHostRequestParams struct {
- // 站点id
+ // 站点Id。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 二级域名
+ // 子域名/应用名。
Host *string `json:"Host,omitempty" name:"Host"`
- // 加速开关 on-开启加速;off-关闭加速(AccelerateType:on,SecurityType:on,安全加速,未开防护增强;AccelerateType:off,SecurityType:on,安全加速,开启防护增强;AccelerateType:on,SecurityType:off,内容加速,未开防护增强)
+ // 加速开关,取值有:
+ // on:开启加速;
+ // off:关闭加速。
AccelerateType *string `json:"AccelerateType,omitempty" name:"AccelerateType"`
- // 策略id
+ // 策略id。
PolicyId *int64 `json:"PolicyId,omitempty" name:"PolicyId"`
- // 安全开关 on-开启安全;off-关闭安全(AccelerateType:on,SecurityType:on,安全加速,未开防护增强;AccelerateType:off,SecurityType:on,安全加速,开启防护增强;AccelerateType:on,SecurityType:off,内容加速,未开防护增强)
+ // 安全开关,取值有:
+ // on:开启安全;
+ // off:关闭安全。
SecurityType *string `json:"SecurityType,omitempty" name:"SecurityType"`
}
type ModifyDDoSPolicyHostRequest struct {
*tchttp.BaseRequest
- // 站点id
+ // 站点Id。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 二级域名
+ // 子域名/应用名。
Host *string `json:"Host,omitempty" name:"Host"`
- // 加速开关 on-开启加速;off-关闭加速(AccelerateType:on,SecurityType:on,安全加速,未开防护增强;AccelerateType:off,SecurityType:on,安全加速,开启防护增强;AccelerateType:on,SecurityType:off,内容加速,未开防护增强)
+ // 加速开关,取值有:
+ // on:开启加速;
+ // off:关闭加速。
AccelerateType *string `json:"AccelerateType,omitempty" name:"AccelerateType"`
- // 策略id
+ // 策略id。
PolicyId *int64 `json:"PolicyId,omitempty" name:"PolicyId"`
- // 安全开关 on-开启安全;off-关闭安全(AccelerateType:on,SecurityType:on,安全加速,未开防护增强;AccelerateType:off,SecurityType:on,安全加速,开启防护增强;AccelerateType:on,SecurityType:off,内容加速,未开防护增强)
+ // 安全开关,取值有:
+ // on:开启安全;
+ // off:关闭安全。
SecurityType *string `json:"SecurityType,omitempty" name:"SecurityType"`
}
@@ -9345,9 +11315,6 @@ func (r *ModifyDDoSPolicyHostRequest) FromJsonString(s string) error {
// Predefined struct for user
type ModifyDDoSPolicyHostResponseParams struct {
- // 修改成功的host
- Host *string `json:"Host,omitempty" name:"Host"`
-
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
@@ -9370,27 +11337,27 @@ func (r *ModifyDDoSPolicyHostResponse) FromJsonString(s string) error {
// Predefined struct for user
type ModifyDDoSPolicyRequestParams struct {
- // 策略id。
+ // 策略Id。
PolicyId *int64 `json:"PolicyId,omitempty" name:"PolicyId"`
- // 站点id。
+ // 站点Id。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
// DDoS防护配置详情。
- DdosRule *DdosRule `json:"DdosRule,omitempty" name:"DdosRule"`
+ DDoSRule *DDoSRule `json:"DDoSRule,omitempty" name:"DDoSRule"`
}
type ModifyDDoSPolicyRequest struct {
*tchttp.BaseRequest
- // 策略id。
+ // 策略Id。
PolicyId *int64 `json:"PolicyId,omitempty" name:"PolicyId"`
- // 站点id。
+ // 站点Id。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
// DDoS防护配置详情。
- DdosRule *DdosRule `json:"DdosRule,omitempty" name:"DdosRule"`
+ DDoSRule *DDoSRule `json:"DDoSRule,omitempty" name:"DDoSRule"`
}
func (r *ModifyDDoSPolicyRequest) ToJsonString() string {
@@ -9407,7 +11374,7 @@ func (r *ModifyDDoSPolicyRequest) FromJsonString(s string) error {
}
delete(f, "PolicyId")
delete(f, "ZoneId")
- delete(f, "DdosRule")
+ delete(f, "DDoSRule")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyDDoSPolicyRequest has unknown keys!", "")
}
@@ -9416,9 +11383,6 @@ func (r *ModifyDDoSPolicyRequest) FromJsonString(s string) error {
// Predefined struct for user
type ModifyDDoSPolicyResponseParams struct {
- // 策略id。
- PolicyId *int64 `json:"PolicyId,omitempty" name:"PolicyId"`
-
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
@@ -9441,32 +11405,30 @@ func (r *ModifyDDoSPolicyResponse) FromJsonString(s string) error {
// Predefined struct for user
type ModifyDefaultCertificateRequestParams struct {
- // Zone ID
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 默认证书ID
+ // 默认证书ID。
CertId *string `json:"CertId,omitempty" name:"CertId"`
- // 证书状态
- // deployed: 部署证书
- // disabled:禁用证书
- // 失败状态下重新deployed即可重试失败
+ // 证书状态,取值有:
+ // deployed :部署证书;
+ // disabled :禁用证书。失败状态下重新deployed即可重试。
Status *string `json:"Status,omitempty" name:"Status"`
}
type ModifyDefaultCertificateRequest struct {
*tchttp.BaseRequest
- // Zone ID
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 默认证书ID
+ // 默认证书ID。
CertId *string `json:"CertId,omitempty" name:"CertId"`
- // 证书状态
- // deployed: 部署证书
- // disabled:禁用证书
- // 失败状态下重新deployed即可重试失败
+ // 证书状态,取值有:
+ // deployed :部署证书;
+ // disabled :禁用证书。失败状态下重新deployed即可重试。
Status *string `json:"Status,omitempty" name:"Status"`
}
@@ -9515,56 +11477,76 @@ func (r *ModifyDefaultCertificateResponse) FromJsonString(s string) error {
// Predefined struct for user
type ModifyDnsRecordRequestParams struct {
- // 记录 ID
- Id *string `json:"Id,omitempty" name:"Id"`
+ // 记录ID。
+ DnsRecordId *string `json:"DnsRecordId,omitempty" name:"DnsRecordId"`
- // 站点 ID
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 记录类型
- Type *string `json:"Type,omitempty" name:"Type"`
+ // DNS记录类型,取值有:
+ // A:将域名指向一个外网 IPv4 地址,如 8.8.8.8;
+ // AAAA:将域名指向一个外网 IPv6 地址;
+ // MX:用于邮箱服务器,相关记录值/优先级参数由邮件注册商提供。存在多条 MX 记录时,优先级越低越优先;
+ // CNAME:将域名指向另一个域名,再由该域名解析出最终 IP 地址;
+ // TXT:对域名进行标识和说明,常用于域名验证和 SPF 记录(反垃圾邮件);
+ // NS:如果需要将子域名交给其他 DNS 服务商解析,则需要添加 NS 记录。根域名无法添加 NS 记录;
+ // CAA:指定可为本站点颁发证书的 CA;
+ // SRV:标识某台服务器使用了某个服务,常见于微软系统的目录管理。不填写保持原有配置。
+ DnsRecordType *string `json:"DnsRecordType,omitempty" name:"DnsRecordType"`
- // 记录名称
- Name *string `json:"Name,omitempty" name:"Name"`
+ // 记录名称,由主机记录+站点名称组成,不填写保持原有配置。
+ DnsRecordName *string `json:"DnsRecordName,omitempty" name:"DnsRecordName"`
- // 记录内容
+ // 记录内容,不填写保持原有配置。
Content *string `json:"Content,omitempty" name:"Content"`
- // 生存时间值
- Ttl *int64 `json:"Ttl,omitempty" name:"Ttl"`
+ // 缓存时间,数值越小,修改记录各地生效时间越快,默认为300,单位:秒,不填写保持原有配置。
+ TTL *int64 `json:"TTL,omitempty" name:"TTL"`
- // 优先级
+ // 该参数在修改MX记录时生效,值越小优先级越高,用户可指定值范围为1~50,不指定默认为0,不填写保持原有配置。
Priority *int64 `json:"Priority,omitempty" name:"Priority"`
- // 代理模式
+ // 代理模式,取值有:
+ // dns_only:仅DNS解析;
+ // proxied:代理加速。不填写保持原有配置。
Mode *string `json:"Mode,omitempty" name:"Mode"`
}
type ModifyDnsRecordRequest struct {
*tchttp.BaseRequest
- // 记录 ID
- Id *string `json:"Id,omitempty" name:"Id"`
+ // 记录ID。
+ DnsRecordId *string `json:"DnsRecordId,omitempty" name:"DnsRecordId"`
- // 站点 ID
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 记录类型
- Type *string `json:"Type,omitempty" name:"Type"`
+ // DNS记录类型,取值有:
+ // A:将域名指向一个外网 IPv4 地址,如 8.8.8.8;
+ // AAAA:将域名指向一个外网 IPv6 地址;
+ // MX:用于邮箱服务器,相关记录值/优先级参数由邮件注册商提供。存在多条 MX 记录时,优先级越低越优先;
+ // CNAME:将域名指向另一个域名,再由该域名解析出最终 IP 地址;
+ // TXT:对域名进行标识和说明,常用于域名验证和 SPF 记录(反垃圾邮件);
+ // NS:如果需要将子域名交给其他 DNS 服务商解析,则需要添加 NS 记录。根域名无法添加 NS 记录;
+ // CAA:指定可为本站点颁发证书的 CA;
+ // SRV:标识某台服务器使用了某个服务,常见于微软系统的目录管理。不填写保持原有配置。
+ DnsRecordType *string `json:"DnsRecordType,omitempty" name:"DnsRecordType"`
- // 记录名称
- Name *string `json:"Name,omitempty" name:"Name"`
+ // 记录名称,由主机记录+站点名称组成,不填写保持原有配置。
+ DnsRecordName *string `json:"DnsRecordName,omitempty" name:"DnsRecordName"`
- // 记录内容
+ // 记录内容,不填写保持原有配置。
Content *string `json:"Content,omitempty" name:"Content"`
- // 生存时间值
- Ttl *int64 `json:"Ttl,omitempty" name:"Ttl"`
+ // 缓存时间,数值越小,修改记录各地生效时间越快,默认为300,单位:秒,不填写保持原有配置。
+ TTL *int64 `json:"TTL,omitempty" name:"TTL"`
- // 优先级
+ // 该参数在修改MX记录时生效,值越小优先级越高,用户可指定值范围为1~50,不指定默认为0,不填写保持原有配置。
Priority *int64 `json:"Priority,omitempty" name:"Priority"`
- // 代理模式
+ // 代理模式,取值有:
+ // dns_only:仅DNS解析;
+ // proxied:代理加速。不填写保持原有配置。
Mode *string `json:"Mode,omitempty" name:"Mode"`
}
@@ -9580,12 +11562,12 @@ func (r *ModifyDnsRecordRequest) FromJsonString(s string) error {
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "Id")
+ delete(f, "DnsRecordId")
delete(f, "ZoneId")
- delete(f, "Type")
- delete(f, "Name")
+ delete(f, "DnsRecordType")
+ delete(f, "DnsRecordName")
delete(f, "Content")
- delete(f, "Ttl")
+ delete(f, "TTL")
delete(f, "Priority")
delete(f, "Mode")
if len(f) > 0 {
@@ -9596,49 +11578,6 @@ func (r *ModifyDnsRecordRequest) FromJsonString(s string) error {
// Predefined struct for user
type ModifyDnsRecordResponseParams struct {
- // 记录 ID
- Id *string `json:"Id,omitempty" name:"Id"`
-
- // 记录类型
- Type *string `json:"Type,omitempty" name:"Type"`
-
- // 记录名称
- Name *string `json:"Name,omitempty" name:"Name"`
-
- // 记录内容
- Content *string `json:"Content,omitempty" name:"Content"`
-
- // 生存时间值
- Ttl *int64 `json:"Ttl,omitempty" name:"Ttl"`
-
- // 优先级
- Priority *int64 `json:"Priority,omitempty" name:"Priority"`
-
- // 代理模式
- Mode *string `json:"Mode,omitempty" name:"Mode"`
-
- // 解析状态
- Status *string `json:"Status,omitempty" name:"Status"`
-
- // CNAME 地址
- // 注意:此字段可能返回 null,表示取不到有效值。
- Cname *string `json:"Cname,omitempty" name:"Cname"`
-
- // 锁定状态
- Locked *bool `json:"Locked,omitempty" name:"Locked"`
-
- // 创建时间
- CreatedOn *string `json:"CreatedOn,omitempty" name:"CreatedOn"`
-
- // 修改时间
- ModifiedOn *string `json:"ModifiedOn,omitempty" name:"ModifiedOn"`
-
- // 站点 ID
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
-
- // 站点名称
- ZoneName *string `json:"ZoneName,omitempty" name:"ZoneName"`
-
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
@@ -9661,24 +11600,24 @@ func (r *ModifyDnsRecordResponse) FromJsonString(s string) error {
// Predefined struct for user
type ModifyDnssecRequestParams struct {
- // 站点 ID
- Id *string `json:"Id,omitempty" name:"Id"`
+ // 站点ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // DNSSEC 状态
- // - enabled 开启
- // - disabled 关闭
+ // DNSSEC状态,取值有
+ // enabled:开启;
+ // disabled:关闭。
Status *string `json:"Status,omitempty" name:"Status"`
}
type ModifyDnssecRequest struct {
*tchttp.BaseRequest
- // 站点 ID
- Id *string `json:"Id,omitempty" name:"Id"`
+ // 站点ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // DNSSEC 状态
- // - enabled 开启
- // - disabled 关闭
+ // DNSSEC状态,取值有
+ // enabled:开启;
+ // disabled:关闭。
Status *string `json:"Status,omitempty" name:"Status"`
}
@@ -9694,7 +11633,7 @@ func (r *ModifyDnssecRequest) FromJsonString(s string) error {
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "Id")
+ delete(f, "ZoneId")
delete(f, "Status")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyDnssecRequest has unknown keys!", "")
@@ -9704,24 +11643,6 @@ func (r *ModifyDnssecRequest) FromJsonString(s string) error {
// Predefined struct for user
type ModifyDnssecResponseParams struct {
- // 站点 ID
- Id *string `json:"Id,omitempty" name:"Id"`
-
- // 站点名称
- Name *string `json:"Name,omitempty" name:"Name"`
-
- // DNSSEC 状态
- // - enabled 开启
- // - disabled 关闭
- Status *string `json:"Status,omitempty" name:"Status"`
-
- // DNSSEC 相关信息
- // 注意:此字段可能返回 null,表示取不到有效值。
- Dnssec *DnssecInfo `json:"Dnssec,omitempty" name:"Dnssec"`
-
- // 修改时间
- ModifiedOn *string `json:"ModifiedOn,omitempty" name:"ModifiedOn"`
-
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
@@ -9744,27 +11665,27 @@ func (r *ModifyDnssecResponse) FromJsonString(s string) error {
// Predefined struct for user
type ModifyHostsCertificateRequestParams struct {
- // Zone ID
+ // 站点 ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 本次变更的域名
+ // 本次变更的域名列表。
Hosts []*string `json:"Hosts,omitempty" name:"Hosts"`
- // 证书信息, 只需要传入 CertId 即可, 如果为空, 则使用默认证书
- CertInfo []*ServerCertInfo `json:"CertInfo,omitempty" name:"CertInfo"`
+ // 证书信息, 只需要传入 CertId 即可, 如果为空, 则使用默认证书。
+ ServerCertInfo []*ServerCertInfo `json:"ServerCertInfo,omitempty" name:"ServerCertInfo"`
}
type ModifyHostsCertificateRequest struct {
*tchttp.BaseRequest
- // Zone ID
+ // 站点 ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 本次变更的域名
+ // 本次变更的域名列表。
Hosts []*string `json:"Hosts,omitempty" name:"Hosts"`
- // 证书信息, 只需要传入 CertId 即可, 如果为空, 则使用默认证书
- CertInfo []*ServerCertInfo `json:"CertInfo,omitempty" name:"CertInfo"`
+ // 证书信息, 只需要传入 CertId 即可, 如果为空, 则使用默认证书。
+ ServerCertInfo []*ServerCertInfo `json:"ServerCertInfo,omitempty" name:"ServerCertInfo"`
}
func (r *ModifyHostsCertificateRequest) ToJsonString() string {
@@ -9781,7 +11702,7 @@ func (r *ModifyHostsCertificateRequest) FromJsonString(s string) error {
}
delete(f, "ZoneId")
delete(f, "Hosts")
- delete(f, "CertInfo")
+ delete(f, "ServerCertInfo")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyHostsCertificateRequest has unknown keys!", "")
}
@@ -9812,42 +11733,50 @@ func (r *ModifyHostsCertificateResponse) FromJsonString(s string) error {
// Predefined struct for user
type ModifyLoadBalancingRequestParams struct {
- // 站点ID
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 负载均衡ID
+ // 负载均衡ID。
LoadBalancingId *string `json:"LoadBalancingId,omitempty" name:"LoadBalancingId"`
- // 代理模式:
- // dns_only: 仅DNS
- // proxied: 开启代理
+ // 代理模式,取值有:
+ // dns_only:仅DNS;
+ // proxied:开启代理。
Type *string `json:"Type,omitempty" name:"Type"`
- // 使用的源站组ID
- OriginId []*string `json:"OriginId,omitempty" name:"OriginId"`
+ // 主源站源站组ID。
+ OriginGroupId *string `json:"OriginGroupId,omitempty" name:"OriginGroupId"`
+
+ // 备用源站源站组ID,当Type=proxied时可以填写,为空表示不使用备用源站。
+ BackupOriginGroupId *string `json:"BackupOriginGroupId,omitempty" name:"BackupOriginGroupId"`
- // 当Type=dns_only表示DNS的TTL时间
+ // 当Type=dns_only时,指解析记录在DNS服务器缓存的生存时间。
+ // 取值范围60-86400,单位:秒,不填写使用默认值:600。
TTL *uint64 `json:"TTL,omitempty" name:"TTL"`
}
type ModifyLoadBalancingRequest struct {
*tchttp.BaseRequest
- // 站点ID
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 负载均衡ID
+ // 负载均衡ID。
LoadBalancingId *string `json:"LoadBalancingId,omitempty" name:"LoadBalancingId"`
- // 代理模式:
- // dns_only: 仅DNS
- // proxied: 开启代理
+ // 代理模式,取值有:
+ // dns_only:仅DNS;
+ // proxied:开启代理。
Type *string `json:"Type,omitempty" name:"Type"`
- // 使用的源站组ID
- OriginId []*string `json:"OriginId,omitempty" name:"OriginId"`
+ // 主源站源站组ID。
+ OriginGroupId *string `json:"OriginGroupId,omitempty" name:"OriginGroupId"`
+
+ // 备用源站源站组ID,当Type=proxied时可以填写,为空表示不使用备用源站。
+ BackupOriginGroupId *string `json:"BackupOriginGroupId,omitempty" name:"BackupOriginGroupId"`
- // 当Type=dns_only表示DNS的TTL时间
+ // 当Type=dns_only时,指解析记录在DNS服务器缓存的生存时间。
+ // 取值范围60-86400,单位:秒,不填写使用默认值:600。
TTL *uint64 `json:"TTL,omitempty" name:"TTL"`
}
@@ -9866,7 +11795,8 @@ func (r *ModifyLoadBalancingRequest) FromJsonString(s string) error {
delete(f, "ZoneId")
delete(f, "LoadBalancingId")
delete(f, "Type")
- delete(f, "OriginId")
+ delete(f, "OriginGroupId")
+ delete(f, "BackupOriginGroupId")
delete(f, "TTL")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyLoadBalancingRequest has unknown keys!", "")
@@ -9876,9 +11806,6 @@ func (r *ModifyLoadBalancingRequest) FromJsonString(s string) error {
// Predefined struct for user
type ModifyLoadBalancingResponseParams struct {
- // 负载均衡ID
- LoadBalancingId *string `json:"LoadBalancingId,omitempty" name:"LoadBalancingId"`
-
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
@@ -9901,30 +11828,30 @@ func (r *ModifyLoadBalancingResponse) FromJsonString(s string) error {
// Predefined struct for user
type ModifyLoadBalancingStatusRequestParams struct {
- // 站点ID
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 负载均衡ID
+ // 负载均衡ID。
LoadBalancingId *string `json:"LoadBalancingId,omitempty" name:"LoadBalancingId"`
- // 状态
- // online: 启用
- // offline: 停用
+ // 负载均衡状态,取值有:
+ // online:启用;
+ // offline:停用。
Status *string `json:"Status,omitempty" name:"Status"`
}
type ModifyLoadBalancingStatusRequest struct {
*tchttp.BaseRequest
- // 站点ID
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 负载均衡ID
+ // 负载均衡ID。
LoadBalancingId *string `json:"LoadBalancingId,omitempty" name:"LoadBalancingId"`
- // 状态
- // online: 启用
- // offline: 停用
+ // 负载均衡状态,取值有:
+ // online:启用;
+ // offline:停用。
Status *string `json:"Status,omitempty" name:"Status"`
}
@@ -9951,9 +11878,6 @@ func (r *ModifyLoadBalancingStatusRequest) FromJsonString(s string) error {
// Predefined struct for user
type ModifyLoadBalancingStatusResponseParams struct {
- // 负载均衡ID
- LoadBalancingId *string `json:"LoadBalancingId,omitempty" name:"LoadBalancingId"`
-
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
@@ -9975,58 +11899,194 @@ func (r *ModifyLoadBalancingStatusResponse) FromJsonString(s string) error {
}
// Predefined struct for user
-type ModifyOriginGroupRequestParams struct {
- // 源站组ID
- OriginId *string `json:"OriginId,omitempty" name:"OriginId"`
+type ModifyLogTopicTaskRequestParams struct {
+ // 站点ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 源站组名称
- OriginName *string `json:"OriginName,omitempty" name:"OriginName"`
+ // 日志集所属地区。
+ LogSetRegion *string `json:"LogSetRegion,omitempty" name:"LogSetRegion"`
- // 配置类型,当OriginType=self 时,需要填写:
- // area: 按区域配置
- // weight: 按权重配置
- // 当OriginType=third_party/cos 时,不需要填写
- Type *string `json:"Type,omitempty" name:"Type"`
+ // 日志集ID。
+ LogSetId *string `json:"LogSetId,omitempty" name:"LogSetId"`
+
+ // 日志主题ID。
+ TopicId *string `json:"TopicId,omitempty" name:"TopicId"`
+
+ // 数据推送类型,可选的类型有:
+ // domain:七层代理日志;
+ // application:四层代理日志;
+ // web-rateLiming:速率限制日志;
+ // web-attack:Web攻击防护日志;
+ // web-rule:自定义规则日志;
+ // web-bot:Bot管理日志。
+ EntityType *string `json:"EntityType,omitempty" name:"EntityType"`
+
+ // 推送任务名。
+ TaskName *string `json:"TaskName,omitempty" name:"TaskName"`
+
+ // 待更新的主题名称,不填表示不更新主题名称。
+ TopicName *string `json:"TopicName,omitempty" name:"TopicName"`
+
+ // 更新后的日志集名称。
+ LogSetName *string `json:"LogSetName,omitempty" name:"LogSetName"`
+
+ // 更新后的日志集保存时间。
+ Period *int64 `json:"Period,omitempty" name:"Period"`
+
+ // 待添加的推送任务实体列表。
+ DropEntityList []*string `json:"DropEntityList,omitempty" name:"DropEntityList"`
+
+ // 待删除的推送任务实例列表。
+ AddedEntityList []*string `json:"AddedEntityList,omitempty" name:"AddedEntityList"`
+}
+
+type ModifyLogTopicTaskRequest struct {
+ *tchttp.BaseRequest
+
+ // 站点ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 日志集所属地区。
+ LogSetRegion *string `json:"LogSetRegion,omitempty" name:"LogSetRegion"`
+
+ // 日志集ID。
+ LogSetId *string `json:"LogSetId,omitempty" name:"LogSetId"`
+
+ // 日志主题ID。
+ TopicId *string `json:"TopicId,omitempty" name:"TopicId"`
+
+ // 数据推送类型,可选的类型有:
+ // domain:七层代理日志;
+ // application:四层代理日志;
+ // web-rateLiming:速率限制日志;
+ // web-attack:Web攻击防护日志;
+ // web-rule:自定义规则日志;
+ // web-bot:Bot管理日志。
+ EntityType *string `json:"EntityType,omitempty" name:"EntityType"`
+
+ // 推送任务名。
+ TaskName *string `json:"TaskName,omitempty" name:"TaskName"`
+
+ // 待更新的主题名称,不填表示不更新主题名称。
+ TopicName *string `json:"TopicName,omitempty" name:"TopicName"`
+
+ // 更新后的日志集名称。
+ LogSetName *string `json:"LogSetName,omitempty" name:"LogSetName"`
+
+ // 更新后的日志集保存时间。
+ Period *int64 `json:"Period,omitempty" name:"Period"`
+
+ // 待添加的推送任务实体列表。
+ DropEntityList []*string `json:"DropEntityList,omitempty" name:"DropEntityList"`
+
+ // 待删除的推送任务实例列表。
+ AddedEntityList []*string `json:"AddedEntityList,omitempty" name:"AddedEntityList"`
+}
+
+func (r *ModifyLogTopicTaskRequest) 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 *ModifyLogTopicTaskRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "ZoneId")
+ delete(f, "LogSetRegion")
+ delete(f, "LogSetId")
+ delete(f, "TopicId")
+ delete(f, "EntityType")
+ delete(f, "TaskName")
+ delete(f, "TopicName")
+ delete(f, "LogSetName")
+ delete(f, "Period")
+ delete(f, "DropEntityList")
+ delete(f, "AddedEntityList")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyLogTopicTaskRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type ModifyLogTopicTaskResponseParams struct {
+ // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
+}
+
+type ModifyLogTopicTaskResponse struct {
+ *tchttp.BaseResponse
+ Response *ModifyLogTopicTaskResponseParams `json:"Response"`
+}
+
+func (r *ModifyLogTopicTaskResponse) ToJsonString() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
- // 源站记录
- Record []*OriginRecord `json:"Record,omitempty" name:"Record"`
+// FromJsonString It is highly **NOT** recommended to use this function
+// because it has no param check, nor strict type check
+func (r *ModifyLogTopicTaskResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
- // 站点ID
+// Predefined struct for user
+type ModifyOriginGroupRequestParams struct {
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 源站类型
- // self:自有源站
- // third_party:第三方源站
- // cos:腾讯云COS源站
+ // 源站组ID。
+ OriginGroupId *string `json:"OriginGroupId,omitempty" name:"OriginGroupId"`
+
+ // 源站类型,取值有:
+ // self:自有源站;
+ // third_party:第三方源站;
+ // cos:腾讯云COS源站。
OriginType *string `json:"OriginType,omitempty" name:"OriginType"`
+
+ // 源站组名称。
+ OriginGroupName *string `json:"OriginGroupName,omitempty" name:"OriginGroupName"`
+
+ // 源站配置类型,当OriginType=self时,取值有:
+ // area:按区域配置;
+ // weight: 按权重配置;
+ // proto: 按HTTP协议配置。当OriginType=third_party/cos时放空。
+ ConfigurationType *string `json:"ConfigurationType,omitempty" name:"ConfigurationType"`
+
+ // 源站记录信息。
+ OriginRecords []*OriginRecord `json:"OriginRecords,omitempty" name:"OriginRecords"`
}
type ModifyOriginGroupRequest struct {
*tchttp.BaseRequest
- // 源站组ID
- OriginId *string `json:"OriginId,omitempty" name:"OriginId"`
+ // 站点ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 源站组名称
- OriginName *string `json:"OriginName,omitempty" name:"OriginName"`
+ // 源站组ID。
+ OriginGroupId *string `json:"OriginGroupId,omitempty" name:"OriginGroupId"`
- // 配置类型,当OriginType=self 时,需要填写:
- // area: 按区域配置
- // weight: 按权重配置
- // 当OriginType=third_party/cos 时,不需要填写
- Type *string `json:"Type,omitempty" name:"Type"`
+ // 源站类型,取值有:
+ // self:自有源站;
+ // third_party:第三方源站;
+ // cos:腾讯云COS源站。
+ OriginType *string `json:"OriginType,omitempty" name:"OriginType"`
- // 源站记录
- Record []*OriginRecord `json:"Record,omitempty" name:"Record"`
+ // 源站组名称。
+ OriginGroupName *string `json:"OriginGroupName,omitempty" name:"OriginGroupName"`
- // 站点ID
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+ // 源站配置类型,当OriginType=self时,取值有:
+ // area:按区域配置;
+ // weight: 按权重配置;
+ // proto: 按HTTP协议配置。当OriginType=third_party/cos时放空。
+ ConfigurationType *string `json:"ConfigurationType,omitempty" name:"ConfigurationType"`
- // 源站类型
- // self:自有源站
- // third_party:第三方源站
- // cos:腾讯云COS源站
- OriginType *string `json:"OriginType,omitempty" name:"OriginType"`
+ // 源站记录信息。
+ OriginRecords []*OriginRecord `json:"OriginRecords,omitempty" name:"OriginRecords"`
}
func (r *ModifyOriginGroupRequest) ToJsonString() string {
@@ -10041,12 +12101,12 @@ func (r *ModifyOriginGroupRequest) FromJsonString(s string) error {
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "OriginId")
- delete(f, "OriginName")
- delete(f, "Type")
- delete(f, "Record")
delete(f, "ZoneId")
+ delete(f, "OriginGroupId")
delete(f, "OriginType")
+ delete(f, "OriginGroupName")
+ delete(f, "ConfigurationType")
+ delete(f, "OriginRecords")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyOriginGroupRequest has unknown keys!", "")
}
@@ -10055,9 +12115,6 @@ func (r *ModifyOriginGroupRequest) FromJsonString(s string) error {
// Predefined struct for user
type ModifyOriginGroupResponseParams struct {
- // 源站组ID
- OriginId *string `json:"OriginId,omitempty" name:"OriginId"`
-
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
@@ -10148,7 +12205,7 @@ type ModifyRuleRequestParams struct {
RuleName *string `json:"RuleName,omitempty" name:"RuleName"`
// 规则内容。
- Rules []*RuleItem `json:"Rules,omitempty" name:"Rules"`
+ Rules []*Rule `json:"Rules,omitempty" name:"Rules"`
// 规则 ID。
RuleId *string `json:"RuleId,omitempty" name:"RuleId"`
@@ -10169,7 +12226,7 @@ type ModifyRuleRequest struct {
RuleName *string `json:"RuleName,omitempty" name:"RuleName"`
// 规则内容。
- Rules []*RuleItem `json:"Rules,omitempty" name:"Rules"`
+ Rules []*Rule `json:"Rules,omitempty" name:"Rules"`
// 规则 ID。
RuleId *string `json:"RuleId,omitempty" name:"RuleId"`
@@ -10229,93 +12286,214 @@ func (r *ModifyRuleResponse) FromJsonString(s string) error {
}
// Predefined struct for user
-type ModifySecurityPolicyRequestParams struct {
- // 一级域名
+type ModifySecurityPolicyRequestParams struct {
+ // 站点Id。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 子域名/应用名。
+ Entity *string `json:"Entity,omitempty" name:"Entity"`
+
+ // 安全配置。
+ SecurityConfig *SecurityConfig `json:"SecurityConfig,omitempty" name:"SecurityConfig"`
+}
+
+type ModifySecurityPolicyRequest struct {
+ *tchttp.BaseRequest
+
+ // 站点Id。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 子域名/应用名。
+ Entity *string `json:"Entity,omitempty" name:"Entity"`
+
+ // 安全配置。
+ SecurityConfig *SecurityConfig `json:"SecurityConfig,omitempty" name:"SecurityConfig"`
+}
+
+func (r *ModifySecurityPolicyRequest) 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 *ModifySecurityPolicyRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "ZoneId")
+ delete(f, "Entity")
+ delete(f, "SecurityConfig")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifySecurityPolicyRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type ModifySecurityPolicyResponseParams struct {
+ // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
+}
+
+type ModifySecurityPolicyResponse struct {
+ *tchttp.BaseResponse
+ Response *ModifySecurityPolicyResponseParams `json:"Response"`
+}
+
+func (r *ModifySecurityPolicyResponse) 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 *ModifySecurityPolicyResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type ModifySecurityWafGroupPolicyRequestParams struct {
+ // 站点Id。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 二级域名/应用名
+ // 子域名。
Entity *string `json:"Entity,omitempty" name:"Entity"`
- // 安全配置
- Config *SecurityConfig `json:"Config,omitempty" name:"Config"`
+ // 总开关,取值有:
+ // on:开启;
+ // off:关闭。不填默认为上次的配置。
+ Switch *string `json:"Switch,omitempty" name:"Switch"`
+
+ // 规则等级,取值有:
+ // loose:宽松;
+ // normal:正常;
+ // strict:严格;
+ // stricter:超严格;
+ // custom:自定义。不填默认为上次的配置。
+ Level *string `json:"Level,omitempty" name:"Level"`
+
+ // 处置方式,取值有:
+ // block:阻断;
+ // observe:观察。不填默认为上次的配置。
+ Mode *string `json:"Mode,omitempty" name:"Mode"`
+
+ // 托管规则。不填默认为上次的配置。
+ WafRules *WafRule `json:"WafRules,omitempty" name:"WafRules"`
+
+ // AI引擎模式。不填默认为上次的配置。
+ AiRule *AiRule `json:"AiRule,omitempty" name:"AiRule"`
+
+ // 托管规则等级组。不填默认为上次的配置。
+ WafGroups []*WafGroup `json:"WafGroups,omitempty" name:"WafGroups"`
}
-type ModifySecurityPolicyRequest struct {
+type ModifySecurityWafGroupPolicyRequest struct {
*tchttp.BaseRequest
- // 一级域名
+ // 站点Id。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 二级域名/应用名
+ // 子域名。
Entity *string `json:"Entity,omitempty" name:"Entity"`
- // 安全配置
- Config *SecurityConfig `json:"Config,omitempty" name:"Config"`
+ // 总开关,取值有:
+ // on:开启;
+ // off:关闭。不填默认为上次的配置。
+ Switch *string `json:"Switch,omitempty" name:"Switch"`
+
+ // 规则等级,取值有:
+ // loose:宽松;
+ // normal:正常;
+ // strict:严格;
+ // stricter:超严格;
+ // custom:自定义。不填默认为上次的配置。
+ Level *string `json:"Level,omitempty" name:"Level"`
+
+ // 处置方式,取值有:
+ // block:阻断;
+ // observe:观察。不填默认为上次的配置。
+ Mode *string `json:"Mode,omitempty" name:"Mode"`
+
+ // 托管规则。不填默认为上次的配置。
+ WafRules *WafRule `json:"WafRules,omitempty" name:"WafRules"`
+
+ // AI引擎模式。不填默认为上次的配置。
+ AiRule *AiRule `json:"AiRule,omitempty" name:"AiRule"`
+
+ // 托管规则等级组。不填默认为上次的配置。
+ WafGroups []*WafGroup `json:"WafGroups,omitempty" name:"WafGroups"`
}
-func (r *ModifySecurityPolicyRequest) ToJsonString() string {
+func (r *ModifySecurityWafGroupPolicyRequest) 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 *ModifySecurityPolicyRequest) FromJsonString(s string) error {
+func (r *ModifySecurityWafGroupPolicyRequest) FromJsonString(s string) error {
f := make(map[string]interface{})
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
delete(f, "ZoneId")
delete(f, "Entity")
- delete(f, "Config")
+ delete(f, "Switch")
+ delete(f, "Level")
+ delete(f, "Mode")
+ delete(f, "WafRules")
+ delete(f, "AiRule")
+ delete(f, "WafGroups")
if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifySecurityPolicyRequest has unknown keys!", "")
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifySecurityWafGroupPolicyRequest has unknown keys!", "")
}
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
-type ModifySecurityPolicyResponseParams struct {
+type ModifySecurityWafGroupPolicyResponseParams struct {
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
-type ModifySecurityPolicyResponse struct {
+type ModifySecurityWafGroupPolicyResponse struct {
*tchttp.BaseResponse
- Response *ModifySecurityPolicyResponseParams `json:"Response"`
+ Response *ModifySecurityWafGroupPolicyResponseParams `json:"Response"`
}
-func (r *ModifySecurityPolicyResponse) ToJsonString() string {
+func (r *ModifySecurityWafGroupPolicyResponse) 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 *ModifySecurityPolicyResponse) FromJsonString(s string) error {
+func (r *ModifySecurityWafGroupPolicyResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
// Predefined struct for user
type ModifyZoneCnameSpeedUpRequestParams struct {
- // 站点 ID
- Id *string `json:"Id,omitempty" name:"Id"`
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // CNAME 加速状态
- // - enabled 开启
- // - disabled 关闭
+ // CNAME 加速状态,取值有:
+ // enabled:开启;
+ // disabled:关闭。
Status *string `json:"Status,omitempty" name:"Status"`
}
type ModifyZoneCnameSpeedUpRequest struct {
*tchttp.BaseRequest
- // 站点 ID
- Id *string `json:"Id,omitempty" name:"Id"`
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // CNAME 加速状态
- // - enabled 开启
- // - disabled 关闭
+ // CNAME 加速状态,取值有:
+ // enabled:开启;
+ // disabled:关闭。
Status *string `json:"Status,omitempty" name:"Status"`
}
@@ -10331,7 +12509,7 @@ func (r *ModifyZoneCnameSpeedUpRequest) FromJsonString(s string) error {
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "Id")
+ delete(f, "ZoneId")
delete(f, "Status")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyZoneCnameSpeedUpRequest has unknown keys!", "")
@@ -10341,20 +12519,6 @@ func (r *ModifyZoneCnameSpeedUpRequest) FromJsonString(s string) error {
// Predefined struct for user
type ModifyZoneCnameSpeedUpResponseParams struct {
- // 站点 ID
- Id *string `json:"Id,omitempty" name:"Id"`
-
- // 站点名称
- Name *string `json:"Name,omitempty" name:"Name"`
-
- // CNAME 加速状态
- // - enabled 开启
- // - disabled 关闭
- Status *string `json:"Status,omitempty" name:"Status"`
-
- // 更新时间
- ModifiedOn *string `json:"ModifiedOn,omitempty" name:"ModifiedOn"`
-
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
@@ -10377,30 +12541,30 @@ func (r *ModifyZoneCnameSpeedUpResponse) FromJsonString(s string) error {
// Predefined struct for user
type ModifyZoneRequestParams struct {
- // 站点 ID,用于唯一标识站点信息
- Id *string `json:"Id,omitempty" name:"Id"`
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 站点接入方式
- // - full NS 接入
- // - partial CNAME 接入
+ // 站点接入方式,取值有:
+ // full:NS 接入;
+ // partial:CNAME 接入。不填写保持原有配置。
Type *string `json:"Type,omitempty" name:"Type"`
- // 自定义站点信息
+ // 自定义站点信息,以替代系统默认分配的名称服务器。不填写保持原有配置。
VanityNameServers *VanityNameServers `json:"VanityNameServers,omitempty" name:"VanityNameServers"`
}
type ModifyZoneRequest struct {
*tchttp.BaseRequest
- // 站点 ID,用于唯一标识站点信息
- Id *string `json:"Id,omitempty" name:"Id"`
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 站点接入方式
- // - full NS 接入
- // - partial CNAME 接入
+ // 站点接入方式,取值有:
+ // full:NS 接入;
+ // partial:CNAME 接入。不填写保持原有配置。
Type *string `json:"Type,omitempty" name:"Type"`
- // 自定义站点信息
+ // 自定义站点信息,以替代系统默认分配的名称服务器。不填写保持原有配置。
VanityNameServers *VanityNameServers `json:"VanityNameServers,omitempty" name:"VanityNameServers"`
}
@@ -10416,7 +12580,7 @@ func (r *ModifyZoneRequest) FromJsonString(s string) error {
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "Id")
+ delete(f, "ZoneId")
delete(f, "Type")
delete(f, "VanityNameServers")
if len(f) > 0 {
@@ -10427,41 +12591,6 @@ func (r *ModifyZoneRequest) FromJsonString(s string) error {
// Predefined struct for user
type ModifyZoneResponseParams struct {
- // 站点 ID
- Id *string `json:"Id,omitempty" name:"Id"`
-
- // 站点名称
- Name *string `json:"Name,omitempty" name:"Name"`
-
- // 站点当前使用的 NS
- OriginalNameServers []*string `json:"OriginalNameServers,omitempty" name:"OriginalNameServers"`
-
- // 站点状态
- // - pending 未接入 NS
- // - active 已接入 NS
- // - moved NS 已切走
- Status *string `json:"Status,omitempty" name:"Status"`
-
- // 站点接入方式
- // - full NS 接入
- // - partial CNAME 接入
- Type *string `json:"Type,omitempty" name:"Type"`
-
- // 腾讯云分配的 NS 列表
- NameServers []*string `json:"NameServers,omitempty" name:"NameServers"`
-
- // 创建时间
- CreatedOn *string `json:"CreatedOn,omitempty" name:"CreatedOn"`
-
- // 修改时间
- ModifiedOn *string `json:"ModifiedOn,omitempty" name:"ModifiedOn"`
-
- // cname 接入状态
- // - finished 站点验证完成
- // - pending 站点验证中
- // 注意:此字段可能返回 null,表示取不到有效值。
- CnameStatus *string `json:"CnameStatus,omitempty" name:"CnameStatus"`
-
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
@@ -10489,7 +12618,7 @@ type ModifyZoneSettingRequestParams struct {
// 缓存过期时间配置。
// 不填写表示保持原有配置。
- Cache *CacheConfig `json:"Cache,omitempty" name:"Cache"`
+ CacheConfig *CacheConfig `json:"CacheConfig,omitempty" name:"CacheConfig"`
// 节点缓存键配置。
// 不填写表示保持原有配置。
@@ -10541,7 +12670,7 @@ type ModifyZoneSettingRequestParams struct {
// 客户端IP回源请求头配置。
// 不填写表示保持原有配置。
- ClientIpHeader *ClientIp `json:"ClientIpHeader,omitempty" name:"ClientIpHeader"`
+ ClientIpHeader *ClientIpHeader `json:"ClientIpHeader,omitempty" name:"ClientIpHeader"`
// 缓存预刷新配置。
// 不填写表示保持原有配置。
@@ -10549,7 +12678,7 @@ type ModifyZoneSettingRequestParams struct {
// Ipv6访问配置。
// 不填写表示保持原有配置。
- Ipv6 *Ipv6Access `json:"Ipv6,omitempty" name:"Ipv6"`
+ Ipv6 *Ipv6 `json:"Ipv6,omitempty" name:"Ipv6"`
}
type ModifyZoneSettingRequest struct {
@@ -10560,7 +12689,7 @@ type ModifyZoneSettingRequest struct {
// 缓存过期时间配置。
// 不填写表示保持原有配置。
- Cache *CacheConfig `json:"Cache,omitempty" name:"Cache"`
+ CacheConfig *CacheConfig `json:"CacheConfig,omitempty" name:"CacheConfig"`
// 节点缓存键配置。
// 不填写表示保持原有配置。
@@ -10612,7 +12741,7 @@ type ModifyZoneSettingRequest struct {
// 客户端IP回源请求头配置。
// 不填写表示保持原有配置。
- ClientIpHeader *ClientIp `json:"ClientIpHeader,omitempty" name:"ClientIpHeader"`
+ ClientIpHeader *ClientIpHeader `json:"ClientIpHeader,omitempty" name:"ClientIpHeader"`
// 缓存预刷新配置。
// 不填写表示保持原有配置。
@@ -10620,7 +12749,7 @@ type ModifyZoneSettingRequest struct {
// Ipv6访问配置。
// 不填写表示保持原有配置。
- Ipv6 *Ipv6Access `json:"Ipv6,omitempty" name:"Ipv6"`
+ Ipv6 *Ipv6 `json:"Ipv6,omitempty" name:"Ipv6"`
}
func (r *ModifyZoneSettingRequest) ToJsonString() string {
@@ -10636,7 +12765,7 @@ func (r *ModifyZoneSettingRequest) FromJsonString(s string) error {
return err
}
delete(f, "ZoneId")
- delete(f, "Cache")
+ delete(f, "CacheConfig")
delete(f, "CacheKey")
delete(f, "MaxAge")
delete(f, "OfflineCache")
@@ -10660,9 +12789,6 @@ func (r *ModifyZoneSettingRequest) FromJsonString(s string) error {
// Predefined struct for user
type ModifyZoneSettingResponseParams struct {
- // 站点ID。
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
-
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
@@ -10685,24 +12811,24 @@ func (r *ModifyZoneSettingResponse) FromJsonString(s string) error {
// Predefined struct for user
type ModifyZoneStatusRequestParams struct {
- // 站点 ID
- Id *string `json:"Id,omitempty" name:"Id"`
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 站点状态
- // - false 开启站点
- // - true 关闭站点
+ // 站点状态,取值有:
+ // false:开启站点;
+ // true:关闭站点。
Paused *bool `json:"Paused,omitempty" name:"Paused"`
}
type ModifyZoneStatusRequest struct {
*tchttp.BaseRequest
- // 站点 ID
- Id *string `json:"Id,omitempty" name:"Id"`
+ // 站点 ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 站点状态
- // - false 开启站点
- // - true 关闭站点
+ // 站点状态,取值有:
+ // false:开启站点;
+ // true:关闭站点。
Paused *bool `json:"Paused,omitempty" name:"Paused"`
}
@@ -10718,7 +12844,7 @@ func (r *ModifyZoneStatusRequest) FromJsonString(s string) error {
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "Id")
+ delete(f, "ZoneId")
delete(f, "Paused")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyZoneStatusRequest has unknown keys!", "")
@@ -10728,20 +12854,6 @@ func (r *ModifyZoneStatusRequest) FromJsonString(s string) error {
// Predefined struct for user
type ModifyZoneStatusResponseParams struct {
- // 站点 ID
- Id *string `json:"Id,omitempty" name:"Id"`
-
- // 站点名称
- Name *string `json:"Name,omitempty" name:"Name"`
-
- // 站点状态
- // - false 开启站点
- // - true 关闭站点
- Paused *bool `json:"Paused,omitempty" name:"Paused"`
-
- // 更新时间
- ModifiedOn *string `json:"ModifiedOn,omitempty" name:"ModifiedOn"`
-
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
@@ -10762,6 +12874,21 @@ func (r *ModifyZoneStatusResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
+type NoCache struct {
+ // 不缓存配置开关,取值有:
+ // on:开启;
+ // off:关闭。
+ Switch *string `json:"Switch,omitempty" name:"Switch"`
+}
+
+type NormalAction struct {
+ // 功能名称,功能名称填写规范可调用接口 [查询规则引擎的设置参数](https://tcloud4api.woa.com/document/product/1657/79433?!preview&!document=1) 查看。
+ Action *string `json:"Action,omitempty" name:"Action"`
+
+ // 参数。
+ Parameters []*RuleNormalActionParams `json:"Parameters,omitempty" name:"Parameters"`
+}
+
type OfflineCache struct {
// 离线缓存是否开启,取值有:
// on:开启;
@@ -10769,6 +12896,23 @@ type OfflineCache struct {
Switch *string `json:"Switch,omitempty" name:"Switch"`
}
+type OptimizeAction struct {
+ // 站点性能优化配置项,取值有:
+ // Http2;
+ // Http3;
+ // Brotli。
+ Name *string `json:"Name,omitempty" name:"Name"`
+
+ // 网络环境。
+ Connectivity *string `json:"Connectivity,omitempty" name:"Connectivity"`
+
+ // 开启配置项后,预估性能优化效果,单位ms。
+ Value *int64 `json:"Value,omitempty" name:"Value"`
+
+ // 开启配置项后,预估性能提升比例,单位%。
+ Ratio *int64 `json:"Ratio,omitempty" name:"Ratio"`
+}
+
type Origin struct {
// 主源站列表。
// 注意:此字段可能返回 null,表示取不到有效值。
@@ -10790,117 +12934,77 @@ type Origin struct {
CosPrivateAccess *string `json:"CosPrivateAccess,omitempty" name:"CosPrivateAccess"`
}
-type OriginCheckOriginStatus struct {
- // healthy: 健康,unhealthy: 不健康,process: 探测中
- Status *string `json:"Status,omitempty" name:"Status"`
-
- // host列表,源站组不健康时存在值
- // 注意:此字段可能返回 null,表示取不到有效值。
- Host []*string `json:"Host,omitempty" name:"Host"`
-}
-
-type OriginFilter struct {
- // 要过滤的字段,支持:name
- Name *string `json:"Name,omitempty" name:"Name"`
-
- // 要过滤的值
- Value *string `json:"Value,omitempty" name:"Value"`
-}
-
type OriginGroup struct {
- // 源站组ID
- OriginId *string `json:"OriginId,omitempty" name:"OriginId"`
-
- // 源站组名称
- OriginName *string `json:"OriginName,omitempty" name:"OriginName"`
-
- // 源站组配置类型
- // area:表示按照Record记录中的Area字段进行按客户端IP所在区域回源。
- // weight:表示按照Record记录中的Weight字段进行按权重回源。
- Type *string `json:"Type,omitempty" name:"Type"`
-
- // 记录
- Record []*OriginRecord `json:"Record,omitempty" name:"Record"`
-
- // 更新时间
- UpdateTime *string `json:"UpdateTime,omitempty" name:"UpdateTime"`
-
- // 站点ID
+ // 站点ID。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 站点名称
+ // 站点名称。
ZoneName *string `json:"ZoneName,omitempty" name:"ZoneName"`
- // 源站类型
- // 注意:此字段可能返回 null,表示取不到有效值。
+ // 源站组ID。
+ OriginGroupId *string `json:"OriginGroupId,omitempty" name:"OriginGroupId"`
+
+ // 源站类型,取值有:
+ // self:自有源站;
+ // third_party:第三方源站;
+ // cos:腾讯云COS源站。
OriginType *string `json:"OriginType,omitempty" name:"OriginType"`
- // 当前源站组是否被四层代理使用。
- // 注意:此字段可能返回 null,表示取不到有效值。
- ApplicationProxyUsed *bool `json:"ApplicationProxyUsed,omitempty" name:"ApplicationProxyUsed"`
+ // 源站组名称。
+ OriginGroupName *string `json:"OriginGroupName,omitempty" name:"OriginGroupName"`
- // 当前源站组是否被负载均衡使用。
- // 注意:此字段可能返回 null,表示取不到有效值。
- LoadBalancingUsed *bool `json:"LoadBalancingUsed,omitempty" name:"LoadBalancingUsed"`
+ // 源站配置类型,当OriginType=self时,取值有:
+ // area:按区域配置;
+ // weight: 按权重配置。
+ // proto: 按HTTP协议配置。当OriginType=third_party/cos时放空。
+ ConfigurationType *string `json:"ConfigurationType,omitempty" name:"ConfigurationType"`
- // 源站状态信息
- // 注意:此字段可能返回 null,表示取不到有效值。
- Status *OriginCheckOriginStatus `json:"Status,omitempty" name:"Status"`
+ // 源站记录信息。
+ OriginRecords []*OriginRecord `json:"OriginRecords,omitempty" name:"OriginRecords"`
- // 使用当前源站组的负载均衡的类型:
- // none:未被使用
- // dns_only:被仅DNS类型负载均衡使用
- // proxied:被代理加速类型负载均衡使用
- // both:同时被仅DNS和代理加速类型负载均衡使用
- // 注意:此字段可能返回 null,表示取不到有效值。
- LoadBalancingUsedType *string `json:"LoadBalancingUsedType,omitempty" name:"LoadBalancingUsedType"`
+ // 源站组更新时间。
+ UpdateTime *string `json:"UpdateTime,omitempty" name:"UpdateTime"`
}
type OriginRecord struct {
- // 记录值
+ // 源站记录值,不包含端口信息,可以为:IPv4,IPv6,域名格式。
Record *string `json:"Record,omitempty" name:"Record"`
- // 当源站配置类型Type=area时,表示区域
- // 为空表示默认区域
- Area []*string `json:"Area,omitempty" name:"Area"`
+ // 源站记录ID。
+ RecordId *string `json:"RecordId,omitempty" name:"RecordId"`
+
+ // 源站端口,取值范围:[1-65535]。
+ Port *uint64 `json:"Port,omitempty" name:"Port"`
- // 当源站配置类型Type=weight时,表示权重
- // 取值范围为[1-100]
- // 源站组内多个源站权重总和应为100。
- // 当源站配置类型Type=proto,表示权重
- // 取值范围为[1-100]
- // 源站组内Proto相同的多个源站权重总和应为100。
+ // 当源站配置类型ConfigurationType=weight时,表示权重。
+ // 不配置权重信息时,所有源站组记录统一填写为0或者不填写,表示多个源站轮询回源。
+ // 配置权重信息时,取值为[1-100],多个源站权重总和应为100,表示多个源站按照权重回源。
+ // 当源站配置类型ConfigurationType=proto时,表示权重。
+ // 不配置权重信息时,所有源站组记录统一填写为0或者不填写,表示多个源站轮询回源。
+ // 配置权重信息时,取值为[1-100],源站组内Proto相同的多个源站权重总和应为100,表示多个源站按照权重回源。
Weight *uint64 `json:"Weight,omitempty" name:"Weight"`
- // 端口
- Port *uint64 `json:"Port,omitempty" name:"Port"`
+ // 当源站配置类型ConfigurationType=proto时,表示源站的协议类型,将按照客户端请求协议回到相应的源站,取值有:
+ // http:HTTP协议源站;
+ // https:HTTPS协议源站。
+ Proto *string `json:"Proto,omitempty" name:"Proto"`
- // 记录ID
- RecordId *string `json:"RecordId,omitempty" name:"RecordId"`
+ // 当源站配置类型ConfigurationType=area时,表示区域,为空表示全部地区。取值为iso-3166中alpha-2编码或者大洲区域代码。大洲区域代码取值为:
+ // Asia:亚洲;
+ // Europe:欧洲;
+ // Africa:非洲;
+ // Oceania:大洋洲;
+ // Americas:美洲。源站组记录中,至少需要有一项为全部地区。
+ Area []*string `json:"Area,omitempty" name:"Area"`
- // 是否私有鉴权
// 当源站类型OriginType=third_part时有效
- // 注意:此字段可能返回 null,表示取不到有效值。
+ // 是否私有鉴权,取值有:
+ // true:使用私有鉴权;
+ // false:不使用私有鉴权。不填写,默认值为:false。
Private *bool `json:"Private,omitempty" name:"Private"`
- // 私有鉴权参数
- // 当源站类型Private=true时有效
- // 注意:此字段可能返回 null,表示取不到有效值。
- PrivateParameter []*OriginRecordPrivateParameter `json:"PrivateParameter,omitempty" name:"PrivateParameter"`
-
- // 当源站配置类型Type=proto时,表示客户端请求协议,取值:http/https
- // 注意:此字段可能返回 null,表示取不到有效值。
- Proto *string `json:"Proto,omitempty" name:"Proto"`
-}
-
-type OriginRecordPrivateParameter struct {
- // 私有鉴权参数名称:
- // "AccessKeyId":Access Key ID
- // "SecretAccessKey":Secret Access Key
- Name *string `json:"Name,omitempty" name:"Name"`
-
- // 私有鉴权参数数值
- Value *string `json:"Value,omitempty" name:"Value"`
+ // 当源站类型Private=true时有效,表示私有鉴权使用参数。
+ PrivateParameters []*PrivateParameter `json:"PrivateParameters,omitempty" name:"PrivateParameters"`
}
type PlanInfo struct {
@@ -10909,7 +13013,7 @@ type PlanInfo struct {
// USD :美元结算。
Currency *string `json:"Currency,omitempty" name:"Currency"`
- // 套餐所含流量(单位:字节)
+ // 套餐所含流量,该流量数值为安全加速流量,内容加速流量和智能加速流量的总和(单位:字节)。
Flux *uint64 `json:"Flux,omitempty" name:"Flux"`
// 结算周期,取值有:
@@ -10931,34 +13035,39 @@ type PlanInfo struct {
// ent_cm_with_bot :中国大陆内容分发网络企业版套餐附带bot管理。
PlanType *string `json:"PlanType,omitempty" name:"PlanType"`
- // 套餐价格(单位:分)
+ // 套餐价格(单位:分)。
Price *float64 `json:"Price,omitempty" name:"Price"`
- // 套餐所含请求次数(单位:字节)
+ // 套餐所含请求次数,该请求次数为安全加速请求次数。(单位:次)。
Request *uint64 `json:"Request,omitempty" name:"Request"`
// 套餐所能绑定的站点个数。
SiteNumber *uint64 `json:"SiteNumber,omitempty" name:"SiteNumber"`
+
+ // 套餐加速区域类型,取值有:
+ // mainland :中国大陆;
+ // overseas :全球(不包括中国大陆)。
+ Area *string `json:"Area,omitempty" name:"Area"`
}
type PortraitManagedRuleDetail struct {
- // 规则唯一id
+ // 规则唯一id。
// 注意:此字段可能返回 null,表示取不到有效值。
RuleId *int64 `json:"RuleId,omitempty" name:"RuleId"`
- // 规则的描述
+ // 规则的描述。
// 注意:此字段可能返回 null,表示取不到有效值。
Description *string `json:"Description,omitempty" name:"Description"`
- // 规则所属类型的名字, botdb(用户画像)
+ // 规则所属类型的名字, botdb(用户画像)。
// 注意:此字段可能返回 null,表示取不到有效值。
RuleTypeName *string `json:"RuleTypeName,omitempty" name:"RuleTypeName"`
- // 规则内的功能分类Id(扫描器,Bot行为等)
+ // 规则内的功能分类Id。
// 注意:此字段可能返回 null,表示取不到有效值。
ClassificationId *int64 `json:"ClassificationId,omitempty" name:"ClassificationId"`
- // 规则当前所属动作状态(block, alg, ...)
+ // 规则当前所属动作状态。
// 注意:此字段可能返回 null,表示取不到有效值。
Status *string `json:"Status,omitempty" name:"Status"`
}
@@ -10974,14 +13083,32 @@ type PostMaxSize struct {
MaxSize *int64 `json:"MaxSize,omitempty" name:"MaxSize"`
}
+type PrivateParameter struct {
+ // 私有鉴权参数名称,取值有:
+ // AccessKeyId:鉴权参数Access Key ID;
+ // SecretAccessKey:鉴权参数Secret Access Key。
+ Name *string `json:"Name,omitempty" name:"Name"`
+
+ // 私有鉴权参数值。
+ Value *string `json:"Value,omitempty" name:"Value"`
+}
+
type QueryCondition struct {
- // 维度
+ // 筛选条件的key。
Key *string `json:"Key,omitempty" name:"Key"`
- // 操作符
+ // 查询条件操作符,操作类型有:
+ // equals: 等于;
+ // notEquals: 不等于;
+ // include: 包含;
+ // notInclude: 不包含;
+ // startWith: 开始于;
+ // notStartWith: 不开始于;
+ // endWith: 结尾是;
+ // notEndWith: 不结尾是。
Operator *string `json:"Operator,omitempty" name:"Operator"`
- // 维度值
+ // 筛选条件的值。
Value []*string `json:"Value,omitempty" name:"Value"`
}
@@ -11009,120 +13136,180 @@ type Quic struct {
Switch *string `json:"Switch,omitempty" name:"Switch"`
}
+type Quota struct {
+ // 单次批量提交配额上限。
+ Batch *int64 `json:"Batch,omitempty" name:"Batch"`
+
+ // 每日提交配额上限。
+ Daily *int64 `json:"Daily,omitempty" name:"Daily"`
+
+ // 每日剩余的可提交配额。
+ DailyAvailable *int64 `json:"DailyAvailable,omitempty" name:"DailyAvailable"`
+
+ // 配额类型,取值有:
+ // purge_prefix:前缀;
+ // purge_url:URL;
+ // purge_host:Hostname;
+ // purge_all:全部缓存内容。
+ Type *string `json:"Type,omitempty" name:"Type"`
+}
+
type RateLimitConfig struct {
- // 开关
+ // 开关,取值有:
+ // on:开启;
+ // off:关闭。
Switch *string `json:"Switch,omitempty" name:"Switch"`
- // 用户规则
- UserRules []*RateLimitUserRule `json:"UserRules,omitempty" name:"UserRules"`
+ // 速率限制-用户规则列表。如果为null,默认使用历史配置。
+ RateLimitUserRules []*RateLimitUserRule `json:"RateLimitUserRules,omitempty" name:"RateLimitUserRules"`
- // 默认模板
+ // 速率限制模板功能。如果为null,默认使用历史配置。
// 注意:此字段可能返回 null,表示取不到有效值。
- Template *RateLimitTemplate `json:"Template,omitempty" name:"Template"`
+ RateLimitTemplate *RateLimitTemplate `json:"RateLimitTemplate,omitempty" name:"RateLimitTemplate"`
- // 智能客户端过滤
+ // 智能客户端过滤。如果为null,默认使用历史配置。
// 注意:此字段可能返回 null,表示取不到有效值。
- Intelligence *RateLimitIntelligence `json:"Intelligence,omitempty" name:"Intelligence"`
+ RateLimitIntelligence *RateLimitIntelligence `json:"RateLimitIntelligence,omitempty" name:"RateLimitIntelligence"`
}
type RateLimitIntelligence struct {
- // 功能开关
- // 注意:此字段可能返回 null,表示取不到有效值。
+ // 功能开关,取值有:
+ // on:开启;
+ // off:关闭。
Switch *string `json:"Switch,omitempty" name:"Switch"`
- // 执行动作 monitor(观察), alg(挑战)
- // 注意:此字段可能返回 null,表示取不到有效值。
+ // 执行动作,取值有:
+ // monitor:观察;
+ // alg:挑战。
+ Action *string `json:"Action,omitempty" name:"Action"`
+}
+
+type RateLimitIntelligenceRuleDetail struct {
+ // 智能识别到的客户端IP。
+ MatchContent *string `json:"MatchContent,omitempty" name:"MatchContent"`
+
+ // 应用的动作。
Action *string `json:"Action,omitempty" name:"Action"`
+
+ // 更新时间。
+ EffectiveTime *string `json:"EffectiveTime,omitempty" name:"EffectiveTime"`
+
+ // 失效时间。
+ ExpireTime *string `json:"ExpireTime,omitempty" name:"ExpireTime"`
+
+ // 规则id。
+ RuleId *int64 `json:"RuleId,omitempty" name:"RuleId"`
+
+ // 处置状态,allowed即已经人为放行。
+ Status *string `json:"Status,omitempty" name:"Status"`
}
type RateLimitTemplate struct {
- // 模板名称
- // 注意:此字段可能返回 null,表示取不到有效值。
+ // 模板等级名称,取值有:
+ // sup_loose:超级宽松;
+ // loose:宽松;
+ // emergency:紧急;
+ // normal:适中;
+ // strict:严格;
+ // close:关闭 - 仅精准速率限制生效。
Mode *string `json:"Mode,omitempty" name:"Mode"`
- // 模板值详情
- // 注意:此字段可能返回 null,表示取不到有效值。
- Detail *RateLimitTemplateDetail `json:"Detail,omitempty" name:"Detail"`
+ // 模板值详情。仅出参返回。
+ RateLimitTemplateDetail *RateLimitTemplateDetail `json:"RateLimitTemplateDetail,omitempty" name:"RateLimitTemplateDetail"`
}
type RateLimitTemplateDetail struct {
- // 模板名称
+ // 模板名称,取值有:
+ // sup_loose:超级宽松;
+ // loose:宽松;
+ // emergency:紧急;
+ // normal:适中;
+ // strict:严格;
+ // close:关闭 - 仅精准速率限制生效。
// 注意:此字段可能返回 null,表示取不到有效值。
Mode *string `json:"Mode,omitempty" name:"Mode"`
- // 唯一id
- // 注意:此字段可能返回 null,表示取不到有效值。
+ // 唯一id。
ID *int64 `json:"ID,omitempty" name:"ID"`
- // 处置动作
+ // 处置动作。模板阀值触发后的处罚行为。
// 注意:此字段可能返回 null,表示取不到有效值。
Action *string `json:"Action,omitempty" name:"Action"`
- // 惩罚时间,秒
+ // 惩罚时间,0-2天,单位是秒。
// 注意:此字段可能返回 null,表示取不到有效值。
PunishTime *int64 `json:"PunishTime,omitempty" name:"PunishTime"`
- // 阈值
- // 注意:此字段可能返回 null,表示取不到有效值。
+ // 统计阈值,单位是次,取值范围0-4294967294。
Threshold *int64 `json:"Threshold,omitempty" name:"Threshold"`
- // 统计周期
- // 注意:此字段可能返回 null,表示取不到有效值。
+ // 统计周期,取值范围0-120秒。
Period *int64 `json:"Period,omitempty" name:"Period"`
}
type RateLimitUserRule struct {
- // RateLimit统计阈值
+ // 速率限制统计阈值,单位是次,取值范围0-4294967294。
Threshold *int64 `json:"Threshold,omitempty" name:"Threshold"`
- // RateLimit统计时间
+ // 速率限制统计时间,取值范围 10/20/30/40/50/60 单位是秒。
Period *int64 `json:"Period,omitempty" name:"Period"`
- // 规则名
+ // 规则名,只能以英文字符,数字,下划线组合,且不能以下划线开头。
RuleName *string `json:"RuleName,omitempty" name:"RuleName"`
- // 动作:monitor(观察), drop(拦截)
+ // 处置动作,取值有:
+ // monitor:观察;
+ // drop:拦截;
+ // alg:JavaScript挑战。
Action *string `json:"Action,omitempty" name:"Action"`
- // 惩罚时长
+ // 惩罚时长,0-2天。
PunishTime *int64 `json:"PunishTime,omitempty" name:"PunishTime"`
- // 处罚时长单位,second
+ // 处罚时长单位,取值有:
+ // second:秒;
+ // minutes:分钟;
+ // hour:小时。
PunishTimeUnit *string `json:"PunishTimeUnit,omitempty" name:"PunishTimeUnit"`
- // 规则状态
+ // 规则状态,取值有:
+ // on:生效;
+ // off:不生效。
+ // hour:小时。默认on生效。
RuleStatus *string `json:"RuleStatus,omitempty" name:"RuleStatus"`
- // 规则
- Conditions []*ACLCondition `json:"Conditions,omitempty" name:"Conditions"`
+ // 规则详情。
+ AclConditions []*AclCondition `json:"AclConditions,omitempty" name:"AclConditions"`
- // 规则权重
+ // 规则权重,取值范围0-100。
RulePriority *int64 `json:"RulePriority,omitempty" name:"RulePriority"`
- // 规则id
+ // 规则id。仅出参使用。
// 注意:此字段可能返回 null,表示取不到有效值。
RuleID *int64 `json:"RuleID,omitempty" name:"RuleID"`
- // 过滤词
+ // 过滤词,取值有:
+ // host:域名;
+ // sip:客户端ip。
// 注意:此字段可能返回 null,表示取不到有效值。
FreqFields []*string `json:"FreqFields,omitempty" name:"FreqFields"`
- // 更新时间
+ // 更新时间。
// 注意:此字段可能返回 null,表示取不到有效值。
UpdateTime *string `json:"UpdateTime,omitempty" name:"UpdateTime"`
}
// Predefined struct for user
type ReclaimZoneRequestParams struct {
- // 站点名称
- Name *string `json:"Name,omitempty" name:"Name"`
+ // 站点名称。
+ ZoneName *string `json:"ZoneName,omitempty" name:"ZoneName"`
}
type ReclaimZoneRequest struct {
*tchttp.BaseRequest
- // 站点名称
- Name *string `json:"Name,omitempty" name:"Name"`
+ // 站点名称。
+ ZoneName *string `json:"ZoneName,omitempty" name:"ZoneName"`
}
func (r *ReclaimZoneRequest) ToJsonString() string {
@@ -11137,7 +13324,7 @@ func (r *ReclaimZoneRequest) FromJsonString(s string) error {
if err := json.Unmarshal([]byte(s), &f); err != nil {
return err
}
- delete(f, "Name")
+ delete(f, "ZoneName")
if len(f) > 0 {
return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ReclaimZoneRequest has unknown keys!", "")
}
@@ -11146,9 +13333,6 @@ func (r *ReclaimZoneRequest) FromJsonString(s string) error {
// Predefined struct for user
type ReclaimZoneResponseParams struct {
- // 站点名称
- Name *string `json:"Name,omitempty" name:"Name"`
-
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
}
@@ -11210,45 +13394,21 @@ type Resource struct {
Area *string `json:"Area,omitempty" name:"Area"`
}
-type RuleAction struct {
- // 常规功能操作,选择该类型的功能项有:
- // 访问URL 重写(AccessUrlRedirect);
- // 回源 URL 重写 (UpstreamUrlRedirect);
- // QUIC(QUIC);
- // WebSocket (WebSocket);
- // 视频拖拽(VideoSeek);
- // Token 鉴权(Authentication);
- // 自定义CacheKey(CacheKey);
- // 节点缓存 TTL (Cache);
- // 浏览器缓存 TTL(MaxAge);
- // 离线缓存(OfflineCache);
- // 智能加速(SmartRouting);
- // 分片回源(RangeOriginPull);
- // HTTP/2 回源(UpstreamHttp2);
- // Host Header 重写(HostHeader);
- // 强制 HTTPS(ForceRedirect);
- // 回源 HTTPS(OriginPullProtocol);
- // 缓存预刷新(CachePrefresh);
- // 智能压缩(Compression);
- // Hsts;
- // ClientIpHeader;
- // TlsVersion;
- // OcspStapling。
- // HTTP/2 访问(Http2)。
- // 注意:此字段可能返回 null,表示取不到有效值。
- NormalAction *RuleNormalAction `json:"NormalAction,omitempty" name:"NormalAction"`
+type RewriteAction struct {
+ // 功能名称,功能名称填写规范可调用接口 [查询规则引擎的设置参数](https://tcloud4api.woa.com/document/product/1657/79433?!preview&!document=1) 查看。
+ Action *string `json:"Action,omitempty" name:"Action"`
- // 带有请求头/响应头的功能操作,选择该类型的功能项有:
- // 修改 HTTP 请求头(RequestHeader);
- // 修改HTTP响应头(ResponseHeader)。
- // 注意:此字段可能返回 null,表示取不到有效值。
- RewriteAction *RuleRewriteAction `json:"RewriteAction,omitempty" name:"RewriteAction"`
+ // 参数。
+ Parameters []*RuleRewriteActionParams `json:"Parameters,omitempty" name:"Parameters"`
+}
- // 带有状态码的功能操作,选择该类型的功能项有:
- // 自定义错误页面(ErrorPage);
- // 状态码缓存 TTL(StatusCodeCache)。
- // 注意:此字段可能返回 null,表示取不到有效值。
- CodeAction *RuleCodeAction `json:"CodeAction,omitempty" name:"CodeAction"`
+type Rule struct {
+ // 执行功能判断条件。
+ // 注意:满足该数组内任意一项条件,功能即可执行。
+ Conditions []*RuleAndConditions `json:"Conditions,omitempty" name:"Conditions"`
+
+ // 执行的功能。
+ Actions []*Action `json:"Actions,omitempty" name:"Actions"`
}
type RuleAndConditions struct {
@@ -11290,14 +13450,6 @@ type RuleChoicePropertiesItem struct {
ExtraParameter *RuleExtraParameter `json:"ExtraParameter,omitempty" name:"ExtraParameter"`
}
-type RuleCodeAction struct {
- // 功能名称,功能名称填写规范可调用接口 [查询规则引擎的设置参数](https://tcloud4api.woa.com/document/product/1657/79433?!preview&!document=1) 查看。
- Action *string `json:"Action,omitempty" name:"Action"`
-
- // 操作参数。
- Parameters []*RuleCodeActionParams `json:"Parameters,omitempty" name:"Parameters"`
-}
-
type RuleCodeActionParams struct {
// 状态 Code。
StatusCode *int64 `json:"StatusCode,omitempty" name:"StatusCode"`
@@ -11348,33 +13500,26 @@ type RuleExtraParameter struct {
// 可选参数值。
// 注意:当 Id 的值为 StatusCode 时数组中的值为整型,填写参数值时请填写字符串的整型数值。
- Choices *string `json:"Choices,omitempty" name:"Choices"`
-}
-
-type RuleFilter struct {
- // 过滤参数,取值有:
- // RULE_ID:规则 ID。
- Name *string `json:"Name,omitempty" name:"Name"`
-
- // 参数值。
- Values []*string `json:"Values,omitempty" name:"Values"`
+ Choices []*string `json:"Choices,omitempty" name:"Choices"`
}
type RuleItem struct {
- // 执行功能判断条件。
- // 注意:满足该数组内任意一项条件,功能即可执行。
- Conditions []*RuleAndConditions `json:"Conditions,omitempty" name:"Conditions"`
+ // 规则ID。
+ RuleId *string `json:"RuleId,omitempty" name:"RuleId"`
- // 执行的功能。
- Actions []*RuleAction `json:"Actions,omitempty" name:"Actions"`
-}
+ // 规则名称,名称字符串长度 1~255。
+ RuleName *string `json:"RuleName,omitempty" name:"RuleName"`
-type RuleNormalAction struct {
- // 功能名称,功能名称填写规范可调用接口 [查询规则引擎的设置参数](https://tcloud4api.woa.com/document/product/1657/79433?!preview&!document=1) 查看。
- Action *string `json:"Action,omitempty" name:"Action"`
+ // 规则状态,取值有:
+ // enable: 启用;
+ // disable: 未启用。
+ Status *string `json:"Status,omitempty" name:"Status"`
- // 参数。
- Parameters []*RuleNormalActionParams `json:"Parameters,omitempty" name:"Parameters"`
+ // 规则内容。
+ Rules []*Rule `json:"Rules,omitempty" name:"Rules"`
+
+ // 规则优先级, 值越大优先级越高,最小为 1。
+ RulePriority *int64 `json:"RulePriority,omitempty" name:"RulePriority"`
}
type RuleNormalActionParams struct {
@@ -11385,14 +13530,6 @@ type RuleNormalActionParams struct {
Values []*string `json:"Values,omitempty" name:"Values"`
}
-type RuleRewriteAction struct {
- // 功能名称,功能名称填写规范可调用接口 [查询规则引擎的设置参数](https://tcloud4api.woa.com/document/product/1657/79433?!preview&!document=1) 查看。
- Action *string `json:"Action,omitempty" name:"Action"`
-
- // 参数。
- Parameters []*RuleRewriteActionParams `json:"Parameters,omitempty" name:"Parameters"`
-}
-
type RuleRewriteActionParams struct {
// 功能参数名称,参数填写规范可调用接口 [查询规则引擎的设置参数](https://tcloud4api.woa.com/document/product/1657/79433?!preview&!document=1) 查看。现在只有三种取值:
// add:添加 HTTP 头部;
@@ -11407,25 +13544,6 @@ type RuleRewriteActionParams struct {
Values []*string `json:"Values,omitempty" name:"Values"`
}
-type RuleSettingDetail struct {
- // 规则ID。
- RuleId *string `json:"RuleId,omitempty" name:"RuleId"`
-
- // 规则名称,名称字符串长度 1~255。
- RuleName *string `json:"RuleName,omitempty" name:"RuleName"`
-
- // 规则状态,取值有:
- // enable: 启用;
- // disable: 未启用。
- Status *string `json:"Status,omitempty" name:"Status"`
-
- // 规则内容。
- Rules []*RuleItem `json:"Rules,omitempty" name:"Rules"`
-
- // 规则优先级, 值越大优先级越高,最小为 1。
- RulePriority *int64 `json:"RulePriority,omitempty" name:"RulePriority"`
-}
-
type RulesProperties struct {
// 值为参数名称。
Name *string `json:"Name,omitempty" name:"Name"`
@@ -11498,100 +13616,72 @@ type RulesSettingAction struct {
Properties []*RulesProperties `json:"Properties,omitempty" name:"Properties"`
}
-// Predefined struct for user
-type ScanDnsRecordsRequestParams struct {
- // 站点 ID
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
-}
-
-type ScanDnsRecordsRequest struct {
- *tchttp.BaseRequest
-
- // 站点 ID
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
-}
-
-func (r *ScanDnsRecordsRequest) 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 *ScanDnsRecordsRequest) FromJsonString(s string) error {
- f := make(map[string]interface{})
- if err := json.Unmarshal([]byte(s), &f); err != nil {
- return err
- }
- delete(f, "ZoneId")
- if len(f) > 0 {
- return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ScanDnsRecordsRequest has unknown keys!", "")
- }
- return json.Unmarshal([]byte(s), &r)
-}
-
-// Predefined struct for user
-type ScanDnsRecordsResponseParams struct {
- // 扫描状态
- // - doing 扫描中
- // - done 扫描完成
- Status *string `json:"Status,omitempty" name:"Status"`
-
- // 扫描后添加的记录数
- RecordsAdded *int64 `json:"RecordsAdded,omitempty" name:"RecordsAdded"`
-
- // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
- RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
-}
-
-type ScanDnsRecordsResponse struct {
- *tchttp.BaseResponse
- Response *ScanDnsRecordsResponseParams `json:"Response"`
-}
+type SecClientIp struct {
+ // 客户端ip。
+ ClientIp *string `json:"ClientIp,omitempty" name:"ClientIp"`
-func (r *ScanDnsRecordsResponse) ToJsonString() string {
- b, _ := json.Marshal(r)
- return string(b)
-}
+ // 最大qps。
+ RequestMaxQps *int64 `json:"RequestMaxQps,omitempty" name:"RequestMaxQps"`
-// FromJsonString It is highly **NOT** recommended to use this function
-// because it has no param check, nor strict type check
-func (r *ScanDnsRecordsResponse) FromJsonString(s string) error {
- return json.Unmarshal([]byte(s), &r)
+ // 请求数。
+ RequestNum *int64 `json:"RequestNum,omitempty" name:"RequestNum"`
}
type SecEntry struct {
// 查询维度值。
- // 注意:此字段可能返回 null,表示取不到有效值。
Key *string `json:"Key,omitempty" name:"Key"`
// 查询维度下详细数据。
- // 注意:此字段可能返回 null,表示取不到有效值。
Value []*SecEntryValue `json:"Value,omitempty" name:"Value"`
}
type SecEntryValue struct {
// 指标名称。
- // 注意:此字段可能返回 null,表示取不到有效值。
Metric *string `json:"Metric,omitempty" name:"Metric"`
// 时序数据详情。
- // 注意:此字段可能返回 null,表示取不到有效值。
Detail []*TimingDataItem `json:"Detail,omitempty" name:"Detail"`
// 最大值。
- // 注意:此字段可能返回 null,表示取不到有效值。
Max *int64 `json:"Max,omitempty" name:"Max"`
// 平均值。
- // 注意:此字段可能返回 null,表示取不到有效值。
Avg *float64 `json:"Avg,omitempty" name:"Avg"`
// 数据总和。
- // 注意:此字段可能返回 null,表示取不到有效值。
Sum *float64 `json:"Sum,omitempty" name:"Sum"`
}
+type SecHitRuleInfo struct {
+ // 规则ID。
+ RuleId *int64 `json:"RuleId,omitempty" name:"RuleId"`
+
+ // 规则类型名称。
+ RuleTypeName *string `json:"RuleTypeName,omitempty" name:"RuleTypeName"`
+
+ // 执行动作(处置方式),取值有:
+ // trans :通过 ;
+ // alg :算法挑战 ;
+ // drop :丢弃 ;
+ // ban :封禁源ip ;
+ // redirect :重定向 ;
+ // page :返回指定页面 ;
+ // monitor :观察 。
+ Action *string `json:"Action,omitempty" name:"Action"`
+
+ // 命中时间,采用unix秒级时间戳。
+ HitTime *int64 `json:"HitTime,omitempty" name:"HitTime"`
+
+ // 请求数。
+ RequestNum *int64 `json:"RequestNum,omitempty" name:"RequestNum"`
+
+ // 规则描述。
+ Description *string `json:"Description,omitempty" name:"Description"`
+
+ // 子域名。
+ Domain *string `json:"Domain,omitempty" name:"Domain"`
+}
+
type SecRuleRelatedInfo struct {
// 规则ID列表(99999为无效id)。
RuleId *int64 `json:"RuleId,omitempty" name:"RuleId"`
@@ -11625,120 +13715,310 @@ type SecRuleRelatedInfo struct {
}
type SecurityConfig struct {
- // 门神配置
+ // 托管规则。如果为null,默认使用历史配置。
// 注意:此字段可能返回 null,表示取不到有效值。
WafConfig *WafConfig `json:"WafConfig,omitempty" name:"WafConfig"`
- // RateLimit配置
+ // 速率限制。如果为null,默认使用历史配置。
// 注意:此字段可能返回 null,表示取不到有效值。
RateLimitConfig *RateLimitConfig `json:"RateLimitConfig,omitempty" name:"RateLimitConfig"`
- // DDoS配置
- // 注意:此字段可能返回 null,表示取不到有效值。
- DdosConfig *DDoSConfig `json:"DdosConfig,omitempty" name:"DdosConfig"`
-
- // ACL配置
+ // 自定义规则。如果为null,默认使用历史配置。
// 注意:此字段可能返回 null,表示取不到有效值。
AclConfig *AclConfig `json:"AclConfig,omitempty" name:"AclConfig"`
- // Bot配置
+ // Bot配置。如果为null,默认使用历史配置。
// 注意:此字段可能返回 null,表示取不到有效值。
BotConfig *BotConfig `json:"BotConfig,omitempty" name:"BotConfig"`
- // 总开关
+ // 七层防护总开关。如果为null,默认使用历史配置。
// 注意:此字段可能返回 null,表示取不到有效值。
SwitchConfig *SwitchConfig `json:"SwitchConfig,omitempty" name:"SwitchConfig"`
- // IP黑白名单
+ // 基础访问管控。如果为null,默认使用历史配置。
// 注意:此字段可能返回 null,表示取不到有效值。
IpTableConfig *IpTableConfig `json:"IpTableConfig,omitempty" name:"IpTableConfig"`
+
+ // 例外规则配置。如果为null,默认使用历史配置。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ ExceptConfig *ExceptConfig `json:"ExceptConfig,omitempty" name:"ExceptConfig"`
+
+ // 自定义拦截页面配置。如果为null,默认使用历史配置。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ DropPageConfig *DropPageConfig `json:"DropPageConfig,omitempty" name:"DropPageConfig"`
}
type SecurityEntity struct {
- // 用户appid
- AppId *int64 `json:"AppId,omitempty" name:"AppId"`
-
- // 一级域名
+ // 站点Id。
ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
- // 二级域名
+ // 子域名/应用名。
Entity *string `json:"Entity,omitempty" name:"Entity"`
- // 类型 domain/application
+ // 类型,取值有:
+ // domain:7层子域名;
+ // application:4层应用名。
EntityType *string `json:"EntityType,omitempty" name:"EntityType"`
}
-type ServerCertInfo struct {
- // 服务器证书 ID, 默认证书ID, 或在 SSL 证书管理进行证书托管时自动生成
+type SecurityType struct {
+ // 安全类型开关,取值为:
+ // on:开启;
+ // off:关闭。
+ Switch *string `json:"Switch,omitempty" name:"Switch"`
+}
+
+type ServerCertInfo struct {
+ // 服务器证书 ID。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ CertId *string `json:"CertId,omitempty" name:"CertId"`
+
+ // 证书备注名。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Alias *string `json:"Alias,omitempty" name:"Alias"`
+
+ // 证书类型,取值有:
+ // default:默认证书;
+ // upload:用户上传;
+ // managed:腾讯云托管。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Type *string `json:"Type,omitempty" name:"Type"`
+
+ // 证书过期时间。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ ExpireTime *string `json:"ExpireTime,omitempty" name:"ExpireTime"`
+
+ // 证书部署时间。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ DeployTime *string `json:"DeployTime,omitempty" name:"DeployTime"`
+
+ // 签名算法。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ SignAlgo *string `json:"SignAlgo,omitempty" name:"SignAlgo"`
+}
+
+type ShieldArea struct {
+ // 站点Id。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // DDoS策略Id。
+ PolicyId *int64 `json:"PolicyId,omitempty" name:"PolicyId"`
+
+ // 防护类型,参考值:
+ // domain:7层子域;
+ // application:4层应用。
+ Type *string `json:"Type,omitempty" name:"Type"`
+
+ // 7层站点名。
+ EntityName *string `json:"EntityName,omitempty" name:"EntityName"`
+
+ // 该防护分区下的7层子域名。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ DDoSHosts []*DDoSHost `json:"DDoSHosts,omitempty" name:"DDoSHosts"`
+
+ // 四层tcp转发规则数。
+ TcpNum *int64 `json:"TcpNum,omitempty" name:"TcpNum"`
+
+ // 四层udp转发规则数。
+ UdpNum *int64 `json:"UdpNum,omitempty" name:"UdpNum"`
+
+ // 实例名称。
+ Entity *string `json:"Entity,omitempty" name:"Entity"`
+}
+
+type SingleDataRecord struct {
+ // 查询维度值。
+ TypeKey *string `json:"TypeKey,omitempty" name:"TypeKey"`
+
+ // 查询维度下具体指标值。
+ TypeValue []*SingleTypeValue `json:"TypeValue,omitempty" name:"TypeValue"`
+}
+
+type SingleTypeValue struct {
+ // 指标名。
+ MetricName *string `json:"MetricName,omitempty" name:"MetricName"`
+
+ // 指标值。
+ DetailData *int64 `json:"DetailData,omitempty" name:"DetailData"`
+}
+
+type SmartRouting struct {
+ // 智能加速配置开关,取值有:
+ // on:开启;
+ // off:关闭。
+ Switch *string `json:"Switch,omitempty" name:"Switch"`
+}
+
+type Sort struct {
+ // 排序字段,当前支持:
+ // createTime,域名创建时间
+ // certExpireTime,证书过期时间
+ // certDeployTime, 证书部署时间
+ Key *string `json:"Key,omitempty" name:"Key"`
+
+ // asc/desc,默认desc。
+ Sequence *string `json:"Sequence,omitempty" name:"Sequence"`
+}
+
+type SpeedTestingConfig struct {
+ // 任务类型,取值有:
+ // 1:页面性能;
+ // 2:文件上传;
+ // 3:文件下载;
+ // 4:端口性能;
+ // 5:网络质量;
+ // 6:音视频体验。
+ TaskType *int64 `json:"TaskType,omitempty" name:"TaskType"`
+
+ // 拨测 url。
+ Url *string `json:"Url,omitempty" name:"Url"`
+
+ // 拨测 UA。
+ UA *string `json:"UA,omitempty" name:"UA"`
+
+ // 网络类型。
+ Connectivity *string `json:"Connectivity,omitempty" name:"Connectivity"`
+}
+
+type SpeedTestingDetailData struct {
+ // 站点ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 站点名称。
+ ZoneName *string `json:"ZoneName,omitempty" name:"ZoneName"`
+
+ // 地域性能数据。
+ DistrictStatistics []*DistrictStatistics `json:"DistrictStatistics,omitempty" name:"DistrictStatistics"`
+}
+
+type SpeedTestingInfo struct {
+ // 任务状态,取值有:
+ // 200:任务完成;
+ // 100:任务进行中;
+ // 503: 任务失败。
+ StatusCode *int64 `json:"StatusCode,omitempty" name:"StatusCode"`
+
+ // 拨测任务 ID。
+ TestId *string `json:"TestId,omitempty" name:"TestId"`
+
+ // 拨测任务配置。
+ SpeedTestingConfig *SpeedTestingConfig `json:"SpeedTestingConfig,omitempty" name:"SpeedTestingConfig"`
+
+ // 拨测任务统计结果。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ SpeedTestingStatistics *SpeedTestingStatistics `json:"SpeedTestingStatistics,omitempty" name:"SpeedTestingStatistics"`
+}
+
+type SpeedTestingMetricData struct {
+ // 站点ID。
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
+
+ // 站点名称。
+ ZoneName *string `json:"ZoneName,omitempty" name:"ZoneName"`
+
+ // 源站拨测信息。
+ OriginSpeedTestingInfo []*SpeedTestingInfo `json:"OriginSpeedTestingInfo,omitempty" name:"OriginSpeedTestingInfo"`
+
+ // EO 拨测信息。
+ ProxySpeedTestingInfo []*SpeedTestingInfo `json:"ProxySpeedTestingInfo,omitempty" name:"ProxySpeedTestingInfo"`
+
+ // 站点状态。
+ SpeedTestingStatus *SpeedTestingStatus `json:"SpeedTestingStatus,omitempty" name:"SpeedTestingStatus"`
+
+ // 优化建议。
+ OptimizeAction []*OptimizeAction `json:"OptimizeAction,omitempty" name:"OptimizeAction"`
+
+ // EO 整体性能,单位ms。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ ProxyLoadTime *int64 `json:"ProxyLoadTime,omitempty" name:"ProxyLoadTime"`
+
+ // 源站整体性能,单位ms。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ OriginLoadTime *int64 `json:"OriginLoadTime,omitempty" name:"OriginLoadTime"`
+}
+
+type SpeedTestingQuota struct {
+ // 站点总拨测次数。
+ TotalTestRuns *int64 `json:"TotalTestRuns,omitempty" name:"TotalTestRuns"`
+
+ // 站点剩余可用拨测次数。
+ AvailableTestRuns *int64 `json:"AvailableTestRuns,omitempty" name:"AvailableTestRuns"`
+}
+
+type SpeedTestingStatistics struct {
+ // 首屏时间,单位 ms。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ FirstContentfulPaint *int64 `json:"FirstContentfulPaint,omitempty" name:"FirstContentfulPaint"`
+
+ // 首屏完全渲染时间,单位 ms。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ FirstMeaningfulPaint *int64 `json:"FirstMeaningfulPaint,omitempty" name:"FirstMeaningfulPaint"`
+
+ // 整体下载速度,单位 KB/s。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ OverallDownloadSpeed *float64 `json:"OverallDownloadSpeed,omitempty" name:"OverallDownloadSpeed"`
+
+ // 渲染时间,单位 ms。
// 注意:此字段可能返回 null,表示取不到有效值。
- CertId *string `json:"CertId,omitempty" name:"CertId"`
+ RenderTime *int64 `json:"RenderTime,omitempty" name:"RenderTime"`
- // 证书备注名
+ // 文档完成时间, 单位 ms。
// 注意:此字段可能返回 null,表示取不到有效值。
- Alias *string `json:"Alias,omitempty" name:"Alias"`
+ DocumentFinishTime *int64 `json:"DocumentFinishTime,omitempty" name:"DocumentFinishTime"`
- // 证书类型:
- // default: 默认证书
- // upload:用户上传
- // managed:腾讯云托管
+ // 基础文档TCP连接时间,单位 ms。
// 注意:此字段可能返回 null,表示取不到有效值。
- Type *string `json:"Type,omitempty" name:"Type"`
+ TcpConnectionTime *int64 `json:"TcpConnectionTime,omitempty" name:"TcpConnectionTime"`
- // 证书过期时间
+ // 基础文档服务器响应时间,单位 ms。
// 注意:此字段可能返回 null,表示取不到有效值。
- ExpireTime *string `json:"ExpireTime,omitempty" name:"ExpireTime"`
+ ResponseTime *int64 `json:"ResponseTime,omitempty" name:"ResponseTime"`
- // 证书部署时间
+ // 基础文档下载时间,单位 ms。
// 注意:此字段可能返回 null,表示取不到有效值。
- DeployTime *string `json:"DeployTime,omitempty" name:"DeployTime"`
+ FileDownloadTime *int64 `json:"FileDownloadTime,omitempty" name:"FileDownloadTime"`
- // 部署状态:
- // processing: 部署中
- // deployed: 已部署
+ // 整体性能,测试总时间,单位 ms。
// 注意:此字段可能返回 null,表示取不到有效值。
- Status *string `json:"Status,omitempty" name:"Status"`
+ LoadTime *int64 `json:"LoadTime,omitempty" name:"LoadTime"`
}
-type ShieldArea struct {
- // 一级域名id
- ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
-
- // 策略id
- PolicyId *int64 `json:"PolicyId,omitempty" name:"PolicyId"`
+type SpeedTestingStatus struct {
+ // 拨测 url。
+ Url *string `json:"Url,omitempty" name:"Url"`
- // 防护类型 domain/application
- Type *string `json:"Type,omitempty" name:"Type"`
+ // 拨测 url 是否使用 https。
+ Tls *bool `json:"Tls,omitempty" name:"Tls"`
- // 四层应用名
- // 注意:此字段可能返回 null,表示取不到有效值。
- EntityName *string `json:"EntityName,omitempty" name:"EntityName"`
+ // 任务创建时间。
+ CreatedOn *string `json:"CreatedOn,omitempty" name:"CreatedOn"`
- // 7层域名参数
+ // 任务状态,取值有:
+ // 200:任务完成;
+ // 100:任务进行中。
+ // 503: 任务失败。
// 注意:此字段可能返回 null,表示取不到有效值。
- Application []*DDoSApplication `json:"Application,omitempty" name:"Application"`
+ StatusCode *int64 `json:"StatusCode,omitempty" name:"StatusCode"`
- // 四层tcp转发规则数
+ // 拨测 UA。
// 注意:此字段可能返回 null,表示取不到有效值。
- TcpNum *int64 `json:"TcpNum,omitempty" name:"TcpNum"`
+ UA *string `json:"UA,omitempty" name:"UA"`
- // 四层udp转发规则数
+ // 网络环境。
// 注意:此字段可能返回 null,表示取不到有效值。
- UdpNum *int64 `json:"UdpNum,omitempty" name:"UdpNum"`
+ Connectivity *string `json:"Connectivity,omitempty" name:"Connectivity"`
- // 实例名称
+ // 是否可达,取值:
+ // true:可达;
+ // false:不可达。
// 注意:此字段可能返回 null,表示取不到有效值。
- Entity *string `json:"Entity,omitempty" name:"Entity"`
+ Reachable *bool `json:"Reachable,omitempty" name:"Reachable"`
- // 是否为共享资源客户,注意共享资源用户不可以切换代理模式,true-是;false-否
+ // 是否超时,取值:
+ // true:超时;
+ // false:不超时。
// 注意:此字段可能返回 null,表示取不到有效值。
- Share *bool `json:"Share,omitempty" name:"Share"`
-}
-
-type SmartRouting struct {
- // 智能加速配置开关,取值有:
- // on:开启;
- // off:关闭。
- Switch *string `json:"Switch,omitempty" name:"Switch"`
+ TimedOut *bool `json:"TimedOut,omitempty" name:"TimedOut"`
}
type Sv struct {
@@ -11750,110 +14030,166 @@ type Sv struct {
}
type SwitchConfig struct {
- // Web类型的安全总开关:Web基础防护,自定义规则,速率限制
+ // Web类型的安全总开关,取值有:
+ // on:开启;
+ // off:关闭。不影响DDoS与Bot的开关。
WebSwitch *string `json:"WebSwitch,omitempty" name:"WebSwitch"`
}
+// Predefined struct for user
+type SwitchLogTopicTaskRequestParams struct {
+ // 推送任务的主题ID。
+ TopicId *string `json:"TopicId,omitempty" name:"TopicId"`
+
+ // 是否开启推送,可选的动作有:
+ // true:开启推送任务;
+ // false:关闭推送任务。
+ IsOpen *bool `json:"IsOpen,omitempty" name:"IsOpen"`
+}
+
+type SwitchLogTopicTaskRequest struct {
+ *tchttp.BaseRequest
+
+ // 推送任务的主题ID。
+ TopicId *string `json:"TopicId,omitempty" name:"TopicId"`
+
+ // 是否开启推送,可选的动作有:
+ // true:开启推送任务;
+ // false:关闭推送任务。
+ IsOpen *bool `json:"IsOpen,omitempty" name:"IsOpen"`
+}
+
+func (r *SwitchLogTopicTaskRequest) 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 *SwitchLogTopicTaskRequest) FromJsonString(s string) error {
+ f := make(map[string]interface{})
+ if err := json.Unmarshal([]byte(s), &f); err != nil {
+ return err
+ }
+ delete(f, "TopicId")
+ delete(f, "IsOpen")
+ if len(f) > 0 {
+ return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "SwitchLogTopicTaskRequest has unknown keys!", "")
+ }
+ return json.Unmarshal([]byte(s), &r)
+}
+
+// Predefined struct for user
+type SwitchLogTopicTaskResponseParams struct {
+ // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
+ RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
+}
+
+type SwitchLogTopicTaskResponse struct {
+ *tchttp.BaseResponse
+ Response *SwitchLogTopicTaskResponseParams `json:"Response"`
+}
+
+func (r *SwitchLogTopicTaskResponse) 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 *SwitchLogTopicTaskResponse) FromJsonString(s string) error {
+ return json.Unmarshal([]byte(s), &r)
+}
+
type Tag struct {
- // 标签键
+ // 标签键。
// 注意:此字段可能返回 null,表示取不到有效值。
TagKey *string `json:"TagKey,omitempty" name:"TagKey"`
- // 标签值
+ // 标签值。
// 注意:此字段可能返回 null,表示取不到有效值。
TagValue *string `json:"TagValue,omitempty" name:"TagValue"`
}
type Task struct {
- // 任务ID
+ // 任务 ID。
JobId *string `json:"JobId,omitempty" name:"JobId"`
- // 状态
+ // 状态。
Status *string `json:"Status,omitempty" name:"Status"`
- // 资源
+ // 资源。
Target *string `json:"Target,omitempty" name:"Target"`
- // 任务类型
+ // 任务类型。
Type *string `json:"Type,omitempty" name:"Type"`
- // 任务创建时间
+ // 任务创建时间。
CreateTime *string `json:"CreateTime,omitempty" name:"CreateTime"`
- // 任务完成时间
+ // 任务完成时间。
UpdateTime *string `json:"UpdateTime,omitempty" name:"UpdateTime"`
}
type TimingDataItem struct {
- // 返回数据对应时间点,采用unix秒级时间戳
- // 注意:此字段可能返回 null,表示取不到有效值。
+ // 返回数据对应时间点,采用unix秒级时间戳。
Timestamp *int64 `json:"Timestamp,omitempty" name:"Timestamp"`
- // 具体数值
- // 注意:此字段可能返回 null,表示取不到有效值。
+ // 具体数值。
Value *int64 `json:"Value,omitempty" name:"Value"`
}
type TimingDataRecord struct {
- // 查询维度值
+ // 查询维度值。
TypeKey *string `json:"TypeKey,omitempty" name:"TypeKey"`
- // 详细时序数据
- // 注意:此字段可能返回 null,表示取不到有效值。
+ // 详细时序数据。
TypeValue []*TimingTypeValue `json:"TypeValue,omitempty" name:"TypeValue"`
}
type TimingTypeValue struct {
- // 数据和
- // 注意:此字段可能返回 null,表示取不到有效值。
+ // 数据和。
Sum *int64 `json:"Sum,omitempty" name:"Sum"`
- // 最大
- // 注意:此字段可能返回 null,表示取不到有效值。
+ // 最大值。
Max *int64 `json:"Max,omitempty" name:"Max"`
- // 平均
- // 注意:此字段可能返回 null,表示取不到有效值。
+ // 平均值。
Avg *int64 `json:"Avg,omitempty" name:"Avg"`
- // 指标名
+ // 指标名。
MetricName *string `json:"MetricName,omitempty" name:"MetricName"`
- // 废弃字段,即将下线,请使用Detail字段
- // 注意:此字段可能返回 null,表示取不到有效值。
- DetailData []*int64 `json:"DetailData,omitempty" name:"DetailData"`
-
- // 详细数据
+ // 详细数据。
// 注意:此字段可能返回 null,表示取不到有效值。
Detail []*TimingDataItem `json:"Detail,omitempty" name:"Detail"`
}
type TopDataRecord struct {
- // 查询维度值
+ // 查询维度值。
TypeKey *string `json:"TypeKey,omitempty" name:"TypeKey"`
- // top数据排行
- // 注意:此字段可能返回 null,表示取不到有效值。
+ // top数据排行。
DetailData []*TopDetailData `json:"DetailData,omitempty" name:"DetailData"`
}
type TopDetailData struct {
- // 字段名
+ // 字段名。
Key *string `json:"Key,omitempty" name:"Key"`
- // 字段值
+ // 字段值。
Value *int64 `json:"Value,omitempty" name:"Value"`
}
-type TopNEntry struct {
+type TopEntry struct {
// top查询维度值。
Key *string `json:"Key,omitempty" name:"Key"`
// 查询具体数据。
- Value []*TopNEntryValue `json:"Value,omitempty" name:"Value"`
+ Value []*TopEntryValue `json:"Value,omitempty" name:"Value"`
}
-type TopNEntryValue struct {
+type TopEntryValue struct {
// 排序实体名。
Name *string `json:"Name,omitempty" name:"Name"`
@@ -11869,164 +14205,204 @@ type UpstreamHttp2 struct {
}
type VanityNameServers struct {
- // 自定义 ns 开关
- // - on 开启
- // - off 关闭
+ // 自定义 ns 开关,取值有:
+ // on:开启;
+ // off:关闭。
Switch *string `json:"Switch,omitempty" name:"Switch"`
- // 自定义 ns 列表
+ // 自定义 ns 列表。
Servers []*string `json:"Servers,omitempty" name:"Servers"`
}
type VanityNameServersIps struct {
- // 自定义名字服务器名称
+ // 自定义名字服务器名称。
Name *string `json:"Name,omitempty" name:"Name"`
- // 自定义名字服务器 IPv4 地址
+ // 自定义名字服务器 IPv4 地址。
IPv4 *string `json:"IPv4,omitempty" name:"IPv4"`
}
+type Waf struct {
+ // Waf开关,取值为:
+ // on:开启;
+ // off:关闭。
+ Switch *string `json:"Switch,omitempty" name:"Switch"`
+
+ // 策略ID。
+ PolicyId *int64 `json:"PolicyId,omitempty" name:"PolicyId"`
+}
+
type WafConfig struct {
- // 开关
+ // WafConfig开关,取值有:
+ // on:开启;
+ // off:关闭。开关仅与配置是否生效有关,即使为off(关闭),也可以正常修改配置的内容。
Switch *string `json:"Switch,omitempty" name:"Switch"`
- // 防护级别,loose/normal/strict/stricter/custom
+ // 上一次设置的防护级别,取值有:
+ // loose:宽松;
+ // normal:正常;
+ // strict:严格;
+ // stricter:超严格;
+ // custom:自定义。
Level *string `json:"Level,omitempty" name:"Level"`
- // 模式 block-阻断;observe-观察模式;close-关闭
+ // 全局WAF模式,取值有:
+ // block:阻断(全局阻断,但可对详细规则配置观察);
+ // observe:观察(无论详细规则配置什么,都为观察)。
Mode *string `json:"Mode,omitempty" name:"Mode"`
- // 托管规则黑白名单
- WafRules *WafRule `json:"WafRules,omitempty" name:"WafRules"`
+ // 托管规则详细配置。如果为null,默认使用历史配置。
+ WafRule *WafRule `json:"WafRule,omitempty" name:"WafRule"`
- // AI规则引擎防护
- // 注意:此字段可能返回 null,表示取不到有效值。
+ // AI规则引擎防护配置。如果为null,默认使用历史配置。
AiRule *AiRule `json:"AiRule,omitempty" name:"AiRule"`
}
-type WafRule struct {
- // 黑名单,ID参考接口 DescribeSecurityPolicyManagedRules
- BlockRuleIDs []*int64 `json:"BlockRuleIDs,omitempty" name:"BlockRuleIDs"`
-
- // 托管规则 开关
- Switch *string `json:"Switch,omitempty" name:"Switch"`
-
- // 观察模式,ID参考接口 DescribeSecurityPolicyManagedRules
- // 注意:此字段可能返回 null,表示取不到有效值。
- ObserveRuleIDs []*int64 `json:"ObserveRuleIDs,omitempty" name:"ObserveRuleIDs"`
-}
-
-type WebAttackEvent struct {
- // 客户端ip
+type WafGroup struct {
+ // 执行动作,取值有:
+ // block:阻断;
+ // observe:观察。
// 注意:此字段可能返回 null,表示取不到有效值。
- ClientIp *string `json:"ClientIp,omitempty" name:"ClientIp"`
+ Action *string `json:"Action,omitempty" name:"Action"`
- // 攻击URL
+ // 防护级别,取值有:
+ // loose:宽松;
+ // normal:正常;
+ // strict:严格;
+ // stricter:超严格;
+ // custom:自定义。
// 注意:此字段可能返回 null,表示取不到有效值。
- AttackUrl *string `json:"AttackUrl,omitempty" name:"AttackUrl"`
+ Level *string `json:"Level,omitempty" name:"Level"`
- // 攻击时间 单位为s
+ // 规则类型id。
// 注意:此字段可能返回 null,表示取不到有效值。
- AttackTime *int64 `json:"AttackTime,omitempty" name:"AttackTime"`
+ TypeId *int64 `json:"TypeId,omitempty" name:"TypeId"`
}
-type WebEventData struct {
- // 攻击事件数据集合
- // 注意:此字段可能返回 null,表示取不到有效值。
- List []*WebAttackEvent `json:"List,omitempty" name:"List"`
+type WafGroupDetail struct {
+ // 规则类型ID。
+ RuleTypeId *int64 `json:"RuleTypeId,omitempty" name:"RuleTypeId"`
- // 当前页
- // 注意:此字段可能返回 null,表示取不到有效值。
- PageNo *int64 `json:"PageNo,omitempty" name:"PageNo"`
+ // 规则类型名称。
+ RuleTypeName *string `json:"RuleTypeName,omitempty" name:"RuleTypeName"`
- // 每页展示条数
- // 注意:此字段可能返回 null,表示取不到有效值。
- PageSize *int64 `json:"PageSize,omitempty" name:"PageSize"`
+ // 规则类型描述。
+ RuleTypeDesc *string `json:"RuleTypeDesc,omitempty" name:"RuleTypeDesc"`
- // 总页数
- // 注意:此字段可能返回 null,表示取不到有效值。
- Pages *int64 `json:"Pages,omitempty" name:"Pages"`
+ // 规则列表。
+ WafGroupRules []*WafGroupRule `json:"WafGroupRules,omitempty" name:"WafGroupRules"`
- // 总条数
- // 注意:此字段可能返回 null,表示取不到有效值。
- TotalSize *int64 `json:"TotalSize,omitempty" name:"TotalSize"`
+ // 规则等级。
+ Level *string `json:"Level,omitempty" name:"Level"`
+
+ // 动作。
+ Action *string `json:"Action,omitempty" name:"Action"`
}
-type WebLogData struct {
- // 分组数据。
- // 注意:此字段可能返回 null,表示取不到有效值。
- List []*WebLogs `json:"List,omitempty" name:"List"`
+type WafGroupInfo struct {
+ // 托管规则组列表。
+ WafGroupDetails []*WafGroupDetail `json:"WafGroupDetails,omitempty" name:"WafGroupDetails"`
- // 分页拉取的起始页号。最小值:1。
- PageNo *int64 `json:"PageNo,omitempty" name:"PageNo"`
+ // 规则组等级,取值有:
+ // loose:宽松;
+ // normal:正常;
+ // strict:严格;
+ // stricter:超严格。
+ Level *string `json:"Level,omitempty" name:"Level"`
- // 分页拉取的最大返回结果数。最大值:1000。
- PageSize *int64 `json:"PageSize,omitempty" name:"PageSize"`
+ // 保留字段。
+ Act *string `json:"Act,omitempty" name:"Act"`
- // 总页数。
- Pages *int64 `json:"Pages,omitempty" name:"Pages"`
+ // 模式,取值有:
+ // block:阻断;
+ // observe:观察。
+ Mode *string `json:"Mode,omitempty" name:"Mode"`
- // 总条数。
- TotalSize *int64 `json:"TotalSize,omitempty" name:"TotalSize"`
+ // 开关,取值有:
+ // on:开启;
+ // off:关闭。
+ Switch *string `json:"Switch,omitempty" name:"Switch"`
}
-type WebLogs struct {
- // 该字段已废弃。
- // 注意:此字段可能返回 null,表示取不到有效值。
- AttackContent *string `json:"AttackContent,omitempty" name:"AttackContent"`
-
- // 攻击源(客户端)Ip。
- AttackIp *string `json:"AttackIp,omitempty" name:"AttackIp"`
+type WafGroupRule struct {
+ // 规则id。
+ RuleId *int64 `json:"RuleId,omitempty" name:"RuleId"`
- // 该字段已废弃。
- // 注意:此字段可能返回 null,表示取不到有效值。
- AttackType *string `json:"AttackType,omitempty" name:"AttackType"`
+ // 规则描述。
+ Description *string `json:"Description,omitempty" name:"Description"`
- // 受攻击子域名。
- Domain *string `json:"Domain,omitempty" name:"Domain"`
+ // 等级描述。
+ RuleLevelDesc *string `json:"RuleLevelDesc,omitempty" name:"RuleLevelDesc"`
- // 该字段已废弃。
+ // 规则标签。部分类型的规则不存在该参数。
// 注意:此字段可能返回 null,表示取不到有效值。
- Msuuid *string `json:"Msuuid,omitempty" name:"Msuuid"`
+ RuleTags []*string `json:"RuleTags,omitempty" name:"RuleTags"`
- // 该字段已废弃。
+ // 更新时间,格式为YYYY-MM-DD hh:mm:ss。部分类型的规则不存在该参数。
// 注意:此字段可能返回 null,表示取不到有效值。
- RequestMethod *string `json:"RequestMethod,omitempty" name:"RequestMethod"`
+ UpdateTime *string `json:"UpdateTime,omitempty" name:"UpdateTime"`
- // URI
- RequestUri *string `json:"RequestUri,omitempty" name:"RequestUri"`
+ // 状态,取值有:
+ // on:开启;
+ // off:关闭。为空时对应接口Status无意义,例如仅查询规则详情时。
+ Status *string `json:"Status,omitempty" name:"Status"`
- // 该字段已废弃。
- // 注意:此字段可能返回 null,表示取不到有效值。
- RiskLevel *string `json:"RiskLevel,omitempty" name:"RiskLevel"`
+ // 规则类型名。
+ RuleTypeName *string `json:"RuleTypeName,omitempty" name:"RuleTypeName"`
- // 该字段已废弃。
- // 注意:此字段可能返回 null,表示取不到有效值。
- RuleId *uint64 `json:"RuleId,omitempty" name:"RuleId"`
+ // 规则类型id。
+ RuleTypeId *int64 `json:"RuleTypeId,omitempty" name:"RuleTypeId"`
- // IP所在国家iso-3166中alpha-2编码,编码信息请参考[ISO-3166](https://git.woa.com/edgeone/iso-3166/blob/master/all/all.json)
- SipCountryCode *string `json:"SipCountryCode,omitempty" name:"SipCountryCode"`
+ // 规则类型描述。
+ RuleTypeDesc *string `json:"RuleTypeDesc,omitempty" name:"RuleTypeDesc"`
+}
+
+type WafRule struct {
+ // 托管规则开关,取值有:
+ // on:开启;
+ // off:关闭。
+ Switch *string `json:"Switch,omitempty" name:"Switch"`
+
+ // 黑名单,ID参考接口 [DescribeSecurityGroupManagedRules](https://tcloud4api.woa.com/document/product/1657/80807?!preview&!document=1)。
+ BlockRuleIDs []*int64 `json:"BlockRuleIDs,omitempty" name:"BlockRuleIDs"`
+ // 观察模式ID列表,将规则ID加入本参数列表中代表该ID使用观察模式生效,即该规则ID进入观察模式。ID参考接口 [DescribeSecurityGroupManagedRules](https://tcloud4api.woa.com/document/product/1657/80807?!preview&!document=1)。
+ ObserveRuleIDs []*int64 `json:"ObserveRuleIDs,omitempty" name:"ObserveRuleIDs"`
+}
+
+type WebLogs struct {
// 请求(事件)ID。
EventId *string `json:"EventId,omitempty" name:"EventId"`
- // 该字段已废弃。
- // 注意:此字段可能返回 null,表示取不到有效值。
- DisposalMethod *string `json:"DisposalMethod,omitempty" name:"DisposalMethod"`
+ // 攻击源(客户端)Ip。
+ AttackIp *string `json:"AttackIp,omitempty" name:"AttackIp"`
- // http log。
+ // 受攻击子域名。
+ Domain *string `json:"Domain,omitempty" name:"Domain"`
+
+ // http 日志内容。
HttpLog *string `json:"HttpLog,omitempty" name:"HttpLog"`
- // 该字段已废弃。
- // 注意:此字段可能返回 null,表示取不到有效值。
- Ua *string `json:"Ua,omitempty" name:"Ua"`
+ // IP所在国家iso-3166中alpha-2编码,编码信息请参考[ISO-3166](https://git.woa.com/edgeone/iso-3166/blob/master/all/all.json)
+ SipCountryCode *string `json:"SipCountryCode,omitempty" name:"SipCountryCode"`
// 攻击时间,采用unix秒级时间戳。
AttackTime *uint64 `json:"AttackTime,omitempty" name:"AttackTime"`
+ // 请求地址。
+ RequestUri *string `json:"RequestUri,omitempty" name:"RequestUri"`
+
+ // 攻击内容。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ AttackContent *string `json:"AttackContent,omitempty" name:"AttackContent"`
+
// 规则相关信息列表。
// 注意:此字段可能返回 null,表示取不到有效值。
RuleDetailList []*SecRuleRelatedInfo `json:"RuleDetailList,omitempty" name:"RuleDetailList"`
+
+ // 请求类型。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ ReqMethod *string `json:"ReqMethod,omitempty" name:"ReqMethod"`
}
type WebSocket struct {
@@ -12041,10 +14417,10 @@ type WebSocket struct {
type Zone struct {
// 站点ID。
- Id *string `json:"Id,omitempty" name:"Id"`
+ ZoneId *string `json:"ZoneId,omitempty" name:"ZoneId"`
// 站点名称。
- Name *string `json:"Name,omitempty" name:"Name"`
+ ZoneName *string `json:"ZoneName,omitempty" name:"ZoneName"`
// 站点当前使用的 NS 列表。
OriginalNameServers []*string `json:"OriginalNameServers,omitempty" name:"OriginalNameServers"`
@@ -12089,24 +14465,91 @@ type Zone struct {
// 站点修改时间。
ModifiedOn *string `json:"ModifiedOn,omitempty" name:"ModifiedOn"`
- // 站点接入地域,取值为:
+ // 站点接入地域,取值有:
// global:全球;
// mainland:中国大陆;
// overseas:境外区域。
Area *string `json:"Area,omitempty" name:"Area"`
+
+ // 用户自定义 NS 信息。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ VanityNameServers *VanityNameServers `json:"VanityNameServers,omitempty" name:"VanityNameServers"`
+
+ // 用户自定义 NS IP 信息。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ VanityNameServersIps []*VanityNameServersIps `json:"VanityNameServersIps,omitempty" name:"VanityNameServersIps"`
}
-type ZoneFilter struct {
- // 过滤字段名,支持的列表如下:
- // name:站点名;
- // status:站点状态;
- // tagKey:标签键;
- // tagValue: 标签值。
- Name *string `json:"Name,omitempty" name:"Name"`
+type ZoneSetting struct {
+ // 站点名称。
+ ZoneName *string `json:"ZoneName,omitempty" name:"ZoneName"`
- // 过滤字段值。
- Values []*string `json:"Values,omitempty" name:"Values"`
+ // 站点加速区域信息,取值有:
+ // mainland:中国境内加速;
+ // overseas:中国境外加速。
+ Area *string `json:"Area,omitempty" name:"Area"`
- // 是否启用模糊查询,仅支持过滤字段名为name。模糊查询时,Values长度最大为1。默认为false。
- Fuzzy *bool `json:"Fuzzy,omitempty" name:"Fuzzy"`
+ // 节点缓存键配置。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ CacheKey *CacheKey `json:"CacheKey,omitempty" name:"CacheKey"`
+
+ // Quic访问配置。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Quic *Quic `json:"Quic,omitempty" name:"Quic"`
+
+ // POST请求传输配置。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ PostMaxSize *PostMaxSize `json:"PostMaxSize,omitempty" name:"PostMaxSize"`
+
+ // 智能压缩配置。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Compression *Compression `json:"Compression,omitempty" name:"Compression"`
+
+ // Http2回源配置。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ UpstreamHttp2 *UpstreamHttp2 `json:"UpstreamHttp2,omitempty" name:"UpstreamHttp2"`
+
+ // 访问协议强制Https跳转配置。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ ForceRedirect *ForceRedirect `json:"ForceRedirect,omitempty" name:"ForceRedirect"`
+
+ // 缓存过期时间配置。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ CacheConfig *CacheConfig `json:"CacheConfig,omitempty" name:"CacheConfig"`
+
+ // 源站配置。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Origin *Origin `json:"Origin,omitempty" name:"Origin"`
+
+ // 智能加速配置。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ SmartRouting *SmartRouting `json:"SmartRouting,omitempty" name:"SmartRouting"`
+
+ // 浏览器缓存配置。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ MaxAge *MaxAge `json:"MaxAge,omitempty" name:"MaxAge"`
+
+ // 离线缓存配置。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ OfflineCache *OfflineCache `json:"OfflineCache,omitempty" name:"OfflineCache"`
+
+ // WebSocket配置。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ WebSocket *WebSocket `json:"WebSocket,omitempty" name:"WebSocket"`
+
+ // 客户端IP回源请求头配置。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ ClientIpHeader *ClientIpHeader `json:"ClientIpHeader,omitempty" name:"ClientIpHeader"`
+
+ // 缓存预刷新配置。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ CachePrefresh *CachePrefresh `json:"CachePrefresh,omitempty" name:"CachePrefresh"`
+
+ // Ipv6访问配置。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Ipv6 *Ipv6 `json:"Ipv6,omitempty" name:"Ipv6"`
+
+ // Https 加速配置。
+ // 注意:此字段可能返回 null,表示取不到有效值。
+ Https *Https `json:"Https,omitempty" name:"Https"`
}
\ No newline at end of file
diff --git a/vendor/modules.txt b/vendor/modules.txt
index aaa8f1a563..4fec24a9d1 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -557,7 +557,7 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb/v20180317
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cloudaudit/v20190319
# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls v1.0.412
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls/v20201016
-# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.494
+# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.500
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http
@@ -615,8 +615,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcr/v20190924
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tdmq/v20200217
# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tem v1.0.472
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tem/v20210701
-# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.0.486
-github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220106
+# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.0.500
+github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901
# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.489
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525
# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vod v1.0.199
diff --git a/website/docs/d/teo_bot_managed_rules.html.markdown b/website/docs/d/teo_bot_managed_rules.html.markdown
new file mode 100644
index 0000000000..d8952b1e20
--- /dev/null
+++ b/website/docs/d/teo_bot_managed_rules.html.markdown
@@ -0,0 +1,41 @@
+---
+subcategory: "TencentCloud EdgeOne(TEO)"
+layout: "tencentcloud"
+page_title: "TencentCloud: tencentcloud_teo_bot_managed_rules"
+sidebar_current: "docs-tencentcloud-datasource-teo_bot_managed_rules"
+description: |-
+ Use this data source to query detailed information of teo botManagedRules
+---
+
+# tencentcloud_teo_bot_managed_rules
+
+Use this data source to query detailed information of teo botManagedRules
+
+## Example Usage
+
+```hcl
+data "tencentcloud_teo_bot_managed_rules" "botManagedRules" {
+ zone_id = ""
+ entity = ""
+}
+```
+
+## Argument Reference
+
+The following arguments are supported:
+
+* `entity` - (Required, String) Subdomain or application name.
+* `zone_id` - (Required, String) Site ID.
+* `result_output_file` - (Optional, String) Used to save results.
+
+## Attributes Reference
+
+In addition to all arguments above, the following attributes are exported:
+
+* `rules` - Managed rules list.
+ * `description` - Description of the rule.
+ * `rule_id` - Rule ID.
+ * `rule_type_name` - Type of the rule.
+ * `status` - Status of the rule.
+
+
diff --git a/website/docs/d/teo_bot_portrait_rules.html.markdown b/website/docs/d/teo_bot_portrait_rules.html.markdown
new file mode 100644
index 0000000000..b3a5c5515d
--- /dev/null
+++ b/website/docs/d/teo_bot_portrait_rules.html.markdown
@@ -0,0 +1,42 @@
+---
+subcategory: "TencentCloud EdgeOne(TEO)"
+layout: "tencentcloud"
+page_title: "TencentCloud: tencentcloud_teo_bot_portrait_rules"
+sidebar_current: "docs-tencentcloud-datasource-teo_bot_portrait_rules"
+description: |-
+ Use this data source to query detailed information of teo botPortraitRules
+---
+
+# tencentcloud_teo_bot_portrait_rules
+
+Use this data source to query detailed information of teo botPortraitRules
+
+## Example Usage
+
+```hcl
+data "tencentcloud_teo_bot_portrait_rules" "botPortraitRules" {
+ zone_id = ""
+ entity = ""
+}
+```
+
+## Argument Reference
+
+The following arguments are supported:
+
+* `entity` - (Required, String) Subdomain or application name.
+* `zone_id` - (Required, String) Site ID.
+* `result_output_file` - (Optional, String) Used to save results.
+
+## Attributes Reference
+
+In addition to all arguments above, the following attributes are exported:
+
+* `rules` - Portrait rules list.
+ * `classification_id` - Classification of the rule. Note: This field may return null, indicating that no valid value can be obtained.
+ * `description` - Description of the rule. Note: This field may return null, indicating that no valid value can be obtained.
+ * `rule_id` - Rule ID.
+ * `rule_type_name` - Type of the rule. Note: This field may return null, indicating that no valid value can be obtained.
+ * `status` - Status of the rule. Note: This field may return null, indicating that no valid value can be obtained.
+
+
diff --git a/website/docs/d/teo_rule_engine_settings.html.markdown b/website/docs/d/teo_rule_engine_settings.html.markdown
new file mode 100644
index 0000000000..5d2a309053
--- /dev/null
+++ b/website/docs/d/teo_rule_engine_settings.html.markdown
@@ -0,0 +1,58 @@
+---
+subcategory: "TencentCloud EdgeOne(TEO)"
+layout: "tencentcloud"
+page_title: "TencentCloud: tencentcloud_teo_rule_engine_settings"
+sidebar_current: "docs-tencentcloud-datasource-teo_rule_engine_settings"
+description: |-
+ Use this data source to query detailed information of teo ruleEngineSettings
+---
+
+# tencentcloud_teo_rule_engine_settings
+
+Use this data source to query detailed information of teo ruleEngineSettings
+
+## Example Usage
+
+```hcl
+data "tencentcloud_teo_rule_engine_settings" "ruleEngineSettings" {
+}
+```
+
+## Argument Reference
+
+The following arguments are supported:
+
+* `result_output_file` - (Optional, String) Used to save results.
+
+## Attributes Reference
+
+In addition to all arguments above, the following attributes are exported:
+
+* `actions` - Detail info of actions which can be used in rule engine.
+ * `action` - Action name.
+ * `properties` - Action properties.
+ * `choice_properties` - Associative properties of this property, they are all required. Note: This field may return null, indicating that no valid value can be obtained.
+ * `choices_value` - The choices which can bse used. This list may be empty.
+ * `extra_parameter` - Special parameter. Note: This field may return null, indicating that no valid value can be obtained.
+ * `choices` - A list of choices which can be used when `Type` is `CHOICE`.
+ * `id` - Parameter name. Valid values:- `Action`: this extra parameter is required when modify HTTP header, this action should be a `RewriteAction`.- `StatusCode`: this extra parameter is required when modify HTTP status code, this action should be a `CodeAction`.- `NULL`: this action should be a `NormalAction`.
+ * `type` - Parameter value type. Valid values:- `CHOICE`: select one value from `Choices`.- `CUSTOM_NUM`: integer value.- `CUSTOM_STRING`: string value.
+ * `is_allow_empty` - Whether this property is allowed to set empty.
+ * `is_multiple` - Whether this property is allowed to set multiple values.
+ * `max` - Max integer value can bse used when property type is `CUSTOM_NUM`. When `Min` and `Max` both are 0, this field is meaningless.
+ * `min` - Min integer value can bse used when property type is `CUSTOM_NUM`. When `Min` and `Max` both are 0, this field is meaningless.
+ * `name` - Property name.
+ * `type` - Property value type. Valid values:- `CHOICE`: enum type, must select one of the value in `ChoicesValue`.- `TOGGLE`: switch type, must select one of the value in `ChoicesValue`.- `CUSTOM_NUM`: integer type.- `CUSTOM_STRING`: string type.
+ * `choices_value` - The choices which can be used. This list may be empty.
+ * `extra_parameter` - Special parameter. Note: This field may return null, indicating that no valid value can be obtained.
+ * `choices` - A list of choices which can be used when `Type` is `CHOICE`.
+ * `id` - Parameter name. Valid values:- `Action`: this extra parameter is required when modify HTTP header, this action should be a `RewriteAction`.- `StatusCode`: this extra parameter is required when modify HTTP status code, this action should be a `CodeAction`.- `NULL`: this action should be a `NormalAction`.
+ * `type` - Parameter value type. Valid values:- `CHOICE`: select one value from `Choices`.- `CUSTOM_NUM`: integer value.- `CUSTOM_STRING`: string value.
+ * `is_allow_empty` - Whether this property is allowed to set empty.
+ * `is_multiple` - Whether this property is allowed to set multiple values.
+ * `max` - Max integer value can bse used when property type is `CUSTOM_NUM`. When `Min` and `Max` both are 0, this field is meaningless.
+ * `min` - Min integer value can bse used when property type is `CUSTOM_NUM`. When `Min` and `Max` both are 0, this field is meaningless.
+ * `name` - Property name.
+ * `type` - Property value type. Valid values:- `CHOICE`: enum type, must select one of the value in `ChoicesValue`.- `TOGGLE`: switch type, must select one of the value in `ChoicesValue`.- `OBJECT`: object type, the `ChoiceProperties` list all properties of the object.- `CUSTOM_NUM`: integer type.- `CUSTOM_STRING`: string type.
+
+
diff --git a/website/docs/d/teo_security_policy_regions.html.markdown b/website/docs/d/teo_security_policy_regions.html.markdown
new file mode 100644
index 0000000000..f6c2203189
--- /dev/null
+++ b/website/docs/d/teo_security_policy_regions.html.markdown
@@ -0,0 +1,37 @@
+---
+subcategory: "TencentCloud EdgeOne(TEO)"
+layout: "tencentcloud"
+page_title: "TencentCloud: tencentcloud_teo_security_policy_regions"
+sidebar_current: "docs-tencentcloud-datasource-teo_security_policy_regions"
+description: |-
+ Use this data source to query detailed information of teo securityPolicyRegions
+---
+
+# tencentcloud_teo_security_policy_regions
+
+Use this data source to query detailed information of teo securityPolicyRegions
+
+## Example Usage
+
+```hcl
+data "tencentcloud_teo_security_policy_regions" "securityPolicyRegions" {
+}
+```
+
+## Argument Reference
+
+The following arguments are supported:
+
+* `result_output_file` - (Optional, String) Used to save results.
+
+## Attributes Reference
+
+In addition to all arguments above, the following attributes are exported:
+
+* `geo_ip` - Region info.
+ * `continent` - Name of the continent.
+ * `country` - Name of the country.
+ * `province` - Province of the region. Note: This field may return null, indicating that no valid value can be obtained.
+ * `region_id` - Region ID.
+
+
diff --git a/website/docs/d/teo_waf_rule_groups.html.markdown b/website/docs/d/teo_waf_rule_groups.html.markdown
new file mode 100644
index 0000000000..cb02a16fc1
--- /dev/null
+++ b/website/docs/d/teo_waf_rule_groups.html.markdown
@@ -0,0 +1,45 @@
+---
+subcategory: "TencentCloud EdgeOne(TEO)"
+layout: "tencentcloud"
+page_title: "TencentCloud: tencentcloud_teo_waf_rule_groups"
+sidebar_current: "docs-tencentcloud-datasource-teo_waf_rule_groups"
+description: |-
+ Use this data source to query detailed information of teo wafRuleGroups
+---
+
+# tencentcloud_teo_waf_rule_groups
+
+Use this data source to query detailed information of teo wafRuleGroups
+
+## Example Usage
+
+```hcl
+data "tencentcloud_teo_waf_rule_groups" "wafRuleGroups" {
+ zone_id = ""
+ entity = ""
+}
+```
+
+## Argument Reference
+
+The following arguments are supported:
+
+* `entity` - (Required, String) Subdomain or application name.
+* `zone_id` - (Required, String) Site ID.
+* `result_output_file` - (Optional, String) Used to save results.
+
+## Attributes Reference
+
+In addition to all arguments above, the following attributes are exported:
+
+* `waf_rule_groups` - List of WAF rule groups.
+ * `rule_type_desc` - Description of rule type in this group.
+ * `rule_type_id` - Type id of rules in this group.
+ * `rule_type_name` - Type name of rules in this group.
+ * `rules` - Rules detail.
+ * `description` - Description of the rule.
+ * `rule_id` - WAF managed rule id.
+ * `rule_level_desc` - System default level of the rule.
+ * `rule_tags` - Tags of the rule. Note: This field may return null, indicating that no valid value can be obtained.
+
+
diff --git a/website/docs/d/teo_zone_available_plans.html.markdown b/website/docs/d/teo_zone_available_plans.html.markdown
index 3e9e957f4a..9e75e1a8c5 100644
--- a/website/docs/d/teo_zone_available_plans.html.markdown
+++ b/website/docs/d/teo_zone_available_plans.html.markdown
@@ -4,33 +4,35 @@ layout: "tencentcloud"
page_title: "TencentCloud: tencentcloud_teo_zone_available_plans"
sidebar_current: "docs-tencentcloud-datasource-teo_zone_available_plans"
description: |-
- Use this data source to query zone available plans.
+ Use this data source to query detailed information of teo zoneAvailablePlans
---
# tencentcloud_teo_zone_available_plans
-Use this data source to query zone available plans.
+Use this data source to query detailed information of teo zoneAvailablePlans
## Example Usage
```hcl
-data "tencentcloud_teo_zone_available_plans" "available_plans" {}
+data "tencentcloud_teo_zone_available_plans" "zoneAvailablePlans" {
+}
```
## Argument Reference
The following arguments are supported:
-* `result_output_file` - (Optional, String) Used for save results.
+* `result_output_file` - (Optional, String) Used to save results.
## Attributes Reference
In addition to all arguments above, the following attributes are exported:
-* `plan_info_list` - Available plans for a zone.
- * `currency` - Currency type. Valid values: `CNY`, `USD`.
+* `plan_info_list` - Zone plans which current account can use.
+ * `area` - Acceleration area of the plan. Valid value: `mainland`, `overseas`.
+ * `currency` - Settlement Currency Type. Valid values: `CNY`, `USD`.
* `flux` - The number of fluxes included in the zone plan. Unit: Byte.
- * `frequency` - Billing cycle. Valid values: `y`: Billed by the year; `m`: Billed by the month; `h`: Billed by the hour; `M`: Billed by the minute; `s`: Billed by the second.
+ * `frequency` - Billing cycle. Valid values:- `y`: Billed by the year.- `m`: Billed by the month.- `h`: Billed by the hour.- `M`: Billed by the minute.- `s`: Billed by the second.
* `plan_type` - Plan type.
* `price` - Price of the plan. Unit: cent.
* `request` - The number of requests included in the zone plan.
diff --git a/website/docs/d/teo_zone_ddos_policy.html.markdown b/website/docs/d/teo_zone_ddos_policy.html.markdown
new file mode 100644
index 0000000000..e52959bff4
--- /dev/null
+++ b/website/docs/d/teo_zone_ddos_policy.html.markdown
@@ -0,0 +1,52 @@
+---
+subcategory: "TencentCloud EdgeOne(TEO)"
+layout: "tencentcloud"
+page_title: "TencentCloud: tencentcloud_teo_zone_ddos_policy"
+sidebar_current: "docs-tencentcloud-datasource-teo_zone_ddos_policy"
+description: |-
+ Use this data source to query detailed information of teo zoneDDoSPolicy
+---
+
+# tencentcloud_teo_zone_ddos_policy
+
+Use this data source to query detailed information of teo zoneDDoSPolicy
+
+## Example Usage
+
+```hcl
+data "tencentcloud_teo_zone_ddos_policy" "zoneDDoSPolicy" {
+ zone_id = ""
+}
+```
+
+## Argument Reference
+
+The following arguments are supported:
+
+* `zone_id` - (Required, String) Site ID.
+* `result_output_file` - (Optional, String) Used to save results.
+
+## Attributes Reference
+
+In addition to all arguments above, the following attributes are exported:
+
+* `domains` - All subdomain info. Note: This field may return null, indicating that no valid value can be obtained.
+ * `accelerate_type` - Acceleration function switch. Valid values:- `on`: Enable.- `off`: Disable.
+ * `host` - Subdomain.
+ * `security_type` - Security function switch. Valid values:- `on`: Enable.- `off`: Disable.
+ * `status` - Status of the subdomain. Valid values:- `init`: waiting to config NS.- `offline`: need to enable site accelerating.- `process`: processing the config deployment.- `online`: normal status. Note: This field may return null, indicating that no valid value can be obtained.
+* `shield_areas` - Shielded areas of the zone.
+ * `application` - DDoS layer 7 application.
+ * `accelerate_type` - Acceleration function switch. Valid values:- `on`: Enable.- `off`: Disable.
+ * `host` - Subdomain.
+ * `security_type` - Security function switch. Valid values:- `on`: Enable.- `off`: Disable.
+ * `status` - Status of the subdomain. Valid values:- `init`: waiting to config NS.- `offline`: need to enable site accelerating.- `process`: processing the config deployment.- `online`: normal status. Note: This field may return null, indicating that no valid value can be obtained.
+ * `entity_name` - When `Type` is `domain`, this field is `ZoneName`. When `Type` is `application`, this field is `ProxyName`. Note: This field may return null, indicating that no valid value can be obtained.
+ * `entity` - When `Type` is `domain`, this field is `ZoneId`. When `Type` is `application`, this field is `ProxyId`. Note: This field may return null, indicating that no valid value can be obtained.
+ * `policy_id` - Policy ID.
+ * `tcp_num` - TCP forwarding rule number of layer 4 application.
+ * `type` - Valid values: `domain`, `application`.
+ * `udp_num` - UDP forwarding rule number of layer 4 application.
+ * `zone_id` - Site ID.
+
+
diff --git a/website/docs/r/teo_application_proxy.html.markdown b/website/docs/r/teo_application_proxy.html.markdown
index 4a4dbd7a21..c979b5cbf9 100644
--- a/website/docs/r/teo_application_proxy.html.markdown
+++ b/website/docs/r/teo_application_proxy.html.markdown
@@ -15,15 +15,19 @@ Provides a resource to create a teo application_proxy
```hcl
resource "tencentcloud_teo_application_proxy" "application_proxy" {
- zone_id = tencentcloud_teo_zone.zone.id
- zone_name = "sfurnace.work"
-
accelerate_type = 1
- security_type = 1
plat_type = "domain"
- proxy_name = "www.sfurnace.work"
- proxy_type = "hostname"
+ proxy_name = "applicationProxies-test-1"
+ proxy_type = "instance"
+ security_type = 1
session_persist_time = 2400
+ status = "online"
+ tags = {}
+ zone_id = "zone-2983wizgxqvm"
+
+ ipv6 {
+ switch = "off"
+ }
}
```
@@ -31,21 +35,28 @@ resource "tencentcloud_teo_application_proxy" "application_proxy" {
The following arguments are supported:
-* `accelerate_type` - (Required, Int) - 0: Disable acceleration.- 1: Enable acceleration.
-* `plat_type` - (Required, String) Scheduling mode.- ip: Anycast IP.- domain: CNAME.
-* `proxy_name` - (Required, String) Layer-4 proxy name.
-* `security_type` - (Required, Int) - 0: Disable security protection.- 1: Enable security protection.
+* `accelerate_type` - (Required, Int) - `0`: Disable acceleration.- `1`: Enable acceleration.
+* `plat_type` - (Required, String) Scheduling mode.- `ip`: Anycast IP.- `domain`: CNAME.
+* `proxy_name` - (Required, String) When `ProxyType` is hostname, `ProxyName` is the domain or subdomain name.When `ProxyType` is instance, `ProxyName` is the name of proxy application.
+* `security_type` - (Required, Int) - `0`: Disable security protection.- `1`: Enable security protection.
* `zone_id` - (Required, String) Site ID.
-* `zone_name` - (Required, String) Site name.
-* `proxy_type` - (Optional, String) Specifies how a layer-4 proxy is created.- hostname: Subdomain name.- instance: Instance.
-* `session_persist_time` - (Optional, Int) Session persistence duration. Value range: 30-3600 (in seconds).
+* `ipv6` - (Optional, List) IPv6 access configuration.
+* `proxy_type` - (Optional, String) Layer 4 proxy mode. Valid values:- `hostname`: subdomain mode.- `instance`: instance mode.
+* `session_persist_time` - (Optional, Int) Session persistence duration. Value range: 30-3600 (in seconds), default value is 600.
+* `status` - (Optional, String) Status of this application proxy. Valid values to set is `online` and `offline`.- `online`: Enable.- `offline`: Disable.- `progress`: Deploying.- `stopping`: Deactivating.- `fail`: Deploy or deactivate failed.
+
+The `ipv6` object supports the following:
+
+* `switch` - (Required, String) - `on`: Enable.- `off`: Disable.
## Attributes Reference
In addition to all arguments above, the following attributes are exported:
* `id` - ID of the resource.
-* `host_id` - ID of the layer-7 domain name.
+* `area` - Acceleration area. Valid values: `mainland`, `overseas`.
+* `ban_status` - Application proxy block status. Valid values: `banned`, `banning`, `recover`, `recovering`.
+* `host_id` - When `ProxyType` is hostname, this field is the ID of the subdomain.
* `proxy_id` - Proxy ID.
* `schedule_value` - Scheduling information.
* `update_time` - Last modification date.
@@ -53,8 +64,8 @@ In addition to all arguments above, the following attributes are exported:
## Import
-teo application_proxy can be imported using the id, e.g.
+teo application_proxy can be imported using the zoneId#proxyId, e.g.
```
-$ terraform import tencentcloud_teo_application_proxy.application_proxy zoneId#proxyId
+$ terraform import tencentcloud_teo_application_proxy.application_proxy zone-2983wizgxqvm#proxy-6972528a-373a-11ed-afca-52540044a456
```
diff --git a/website/docs/r/teo_application_proxy_rule.html.markdown b/website/docs/r/teo_application_proxy_rule.html.markdown
index fea0a2246b..08ec75f42f 100644
--- a/website/docs/r/teo_application_proxy_rule.html.markdown
+++ b/website/docs/r/teo_application_proxy_rule.html.markdown
@@ -15,19 +15,19 @@ Provides a resource to create a teo application_proxy_rule
```hcl
resource "tencentcloud_teo_application_proxy_rule" "application_proxy_rule" {
- zone_id = tencentcloud_teo_zone.zone.id
- proxy_id = tencentcloud_teo_application_proxy.application_proxy_rule.proxy_id
-
forward_client_ip = "TOA"
origin_type = "custom"
origin_value = [
- "1.1.1.1:80",
+ "127.0.0.1:8081",
]
port = [
- "80",
+ "8083",
]
proto = "TCP"
+ proxy_id = "proxy-6972528a-373a-11ed-afca-52540044a456"
session_persist = false
+ status = "online"
+ zone_id = "zone-2983wizgxqvm"
}
```
@@ -35,14 +35,15 @@ resource "tencentcloud_teo_application_proxy_rule" "application_proxy_rule" {
The following arguments are supported:
-* `origin_type` - (Required, String) Origin server type.- custom: Specified origins.- origins: An origin group.- load_balancing: A load balancer.
-* `origin_value` - (Required, Set: [`String`]) Origin server information.When OriginType is custom, this field value indicates multiple origin servers in either of the following formats:- IP:Port- Domain name:Port.When OriginType is origins, it indicates the origin group ID.
+* `origin_type` - (Required, String) Origin server type.- `custom`: Specified origins.- `origins`: An origin group.
+* `origin_value` - (Required, Set: [`String`]) Origin server information.When `OriginType` is custom, this field value indicates multiple origin servers in either of the following formats:- `IP`:Port- Domain name:Port.When `OriginType` is origins, it indicates the origin group ID.
* `port` - (Required, Set: [`String`]) Valid values:- port number: `80` means port 80.- port range: `81-90` means port range 81-90.
* `proto` - (Required, String) Protocol. Valid values: `TCP`, `UDP`.
-* `proxy_id` - (Required, String, ForceNew) Proxy ID.
-* `zone_id` - (Required, String, ForceNew) Site ID.
-* `forward_client_ip` - (Optional, String) Passes the client IP.When Proto is TCP, valid values:- TOA: Pass the client IP via TOA.- PPV1: Pass the client IP via Proxy Protocol V1.- PPV2: Pass the client IP via Proxy Protocol V2.- OFF: Do not pass the client IP.When Proto=UDP, valid values:- PPV2: Pass the client IP via Proxy Protocol V2.- OFF: Do not pass the client IP.
-* `session_persist` - (Optional, Bool) Specifies whether to enable session persistence.
+* `proxy_id` - (Required, String) Proxy ID.
+* `zone_id` - (Required, String) Site ID.
+* `forward_client_ip` - (Optional, String) Passes the client IP. Default value is OFF.When Proto is TCP, valid values:- `TOA`: Pass the client IP via TOA.- `PPV1`: Pass the client IP via Proxy Protocol V1.- `PPV2`: Pass the client IP via Proxy Protocol V2.- `OFF`: Do not pass the client IP.When Proto=UDP, valid values:- `PPV2`: Pass the client IP via Proxy Protocol V2.- `OFF`: Do not pass the client IP.
+* `session_persist` - (Optional, Bool) Specifies whether to enable session persistence. Default value is false.
+* `status` - (Optional, String) Status of this application proxy rule. Valid values to set is `online` and `offline`.- `online`: Enable.- `offline`: Disable.- `progress`: Deploying.- `stopping`: Disabling.- `fail`: Deployment/Disabling failed.
## Attributes Reference
@@ -54,8 +55,8 @@ In addition to all arguments above, the following attributes are exported:
## Import
-teo application_proxy_rule can be imported using the id, e.g.
+teo application_proxy_rule can be imported using the zoneId#proxyId#ruleId, e.g.
```
-$ terraform import tencentcloud_teo_application_proxy_rule.application_proxy_rule zoneId#proxyId#ruleId
+$ terraform import tencentcloud_teo_application_proxy_rule.application_proxy_rule zone-2983wizgxqvm#proxy-6972528a-373a-11ed-afca-52540044a456#rule-90b13bb4-373a-11ed-8794-525400eddfed
```
diff --git a/website/docs/r/teo_custom_error_page.html.markdown b/website/docs/r/teo_custom_error_page.html.markdown
new file mode 100644
index 0000000000..b243ff2f05
--- /dev/null
+++ b/website/docs/r/teo_custom_error_page.html.markdown
@@ -0,0 +1,42 @@
+---
+subcategory: "TencentCloud EdgeOne(TEO)"
+layout: "tencentcloud"
+page_title: "TencentCloud: tencentcloud_teo_custom_error_page"
+sidebar_current: "docs-tencentcloud-resource-teo_custom_error_page"
+description: |-
+ Provides a resource to create a teo custom_error_page
+---
+
+# tencentcloud_teo_custom_error_page
+
+Provides a resource to create a teo custom_error_page
+
+## Example Usage
+
+```hcl
+resource "tencentcloud_teo_custom_error_page" "error_page_0" {
+ zone_id = data.tencentcloud_teo_zone_ddos_policy.zone_policy.zone_id
+ entity = data.tencentcloud_teo_zone_ddos_policy.zone_policy.shield_areas[0].application[0].host
+
+ name = "test"
+ content = ""
+}
+```
+
+## Argument Reference
+
+The following arguments are supported:
+
+* `content` - (Required, String) Page content.
+* `entity` - (Required, String) Subdomain.
+* `name` - (Required, String) Page name.
+* `zone_id` - (Required, String) Site ID.
+
+## Attributes Reference
+
+In addition to all arguments above, the following attributes are exported:
+
+* `id` - ID of the resource.
+* `page_id` - Page ID.
+
+
diff --git a/website/docs/r/teo_ddos_policy.html.markdown b/website/docs/r/teo_ddos_policy.html.markdown
new file mode 100644
index 0000000000..0e25345b92
--- /dev/null
+++ b/website/docs/r/teo_ddos_policy.html.markdown
@@ -0,0 +1,187 @@
+---
+subcategory: "TencentCloud EdgeOne(TEO)"
+layout: "tencentcloud"
+page_title: "TencentCloud: tencentcloud_teo_ddos_policy"
+sidebar_current: "docs-tencentcloud-resource-teo_ddos_policy"
+description: |-
+ Provides a resource to create a teo ddos_policy
+---
+
+# tencentcloud_teo_ddos_policy
+
+Provides a resource to create a teo ddos_policy
+
+## Example Usage
+
+```hcl
+resource "tencentcloud_teo_ddos_policy" "ddos_policy" {
+ policy_id = 1278
+ zone_id = "zone-2983wizgxqvm"
+
+ ddos_rule {
+ switch = "on"
+
+ acl {
+ switch = "on"
+ }
+
+ allow_block {
+ switch = "on"
+ }
+
+ anti_ply {
+ abnormal_connect_num = 0
+ abnormal_syn_num = 0
+ abnormal_syn_ratio = 0
+ connect_timeout = 0
+ destination_connect_limit = 0
+ destination_create_limit = 0
+ drop_icmp = "off"
+ drop_other = "off"
+ drop_tcp = "off"
+ drop_udp = "off"
+ empty_connect_protect = "off"
+ source_connect_limit = 0
+ source_create_limit = 0
+ udp_shard = "off"
+ }
+
+ geo_ip {
+ region_ids = []
+ switch = "on"
+ }
+
+ packet_filter {
+ switch = "on"
+ }
+
+ speed_limit {
+ flux_limit = "0 bps"
+ package_limit = "0 pps"
+ }
+
+ status_info {
+ ply_level = "middle"
+ }
+ }
+}
+```
+
+## Argument Reference
+
+The following arguments are supported:
+
+* `policy_id` - (Required, Int) Policy ID.
+* `zone_id` - (Required, String) Site ID.
+* `ddos_rule` - (Optional, List) DDoS Configuration of the zone.
+
+The `acl` object supports the following:
+
+* `acls` - (Optional, List) DDoS ACL rule configuration detail.
+* `switch` - (Optional, String) - `on`: Enable. `Acl` parameter is require.- `off`: Disable.
+
+The `acls` object supports the following:
+
+* `action` - (Optional, String) Action to take. Valid values: `drop`, `transmit`, `forward`.
+* `dport_end` - (Optional, Int) End of the dest port range. Valid value range: 0-65535.
+* `dport_start` - (Optional, Int) Start of the dest port range. Valid value range: 0-65535.
+* `protocol` - (Optional, String) Valid values: `tcp`, `udp`, `all`.
+* `sport_end` - (Optional, Int) End of the source port range. Valid value range: 0-65535.
+* `sport_start` - (Optional, Int) Start of the source port range. Valid value range: 0-65535.
+
+The `allow_block_ips` object supports the following:
+
+* `type` - (Required, String) Valid values: `block`, `allow`.
+* `ip` - (Optional, String) Valid value format:- ip, for example 1.1.1.1- ip range, for example 1.1.1.2-1.1.1.3- network segment, for example 1.2.1.0/24- network segment range, for example 1.2.1.0/24-1.2.2.0/24.
+
+The `allow_block` object supports the following:
+
+* `allow_block_ips` - (Optional, List) DDoS black-white list detail.
+* `switch` - (Optional, String) - `on`: Enable. `AllowBlockIps` parameter is required.- `off`: Disable.
+
+The `anti_ply` object supports the following:
+
+* `abnormal_connect_num` - (Required, Int) Abnormal connections threshold. Valid value range: 0-4294967295.
+* `abnormal_syn_num` - (Required, Int) Abnormal syn packet number threshold. Valid value range: 0-65535.
+* `abnormal_syn_ratio` - (Required, Int) Abnormal syn packet ratio threshold. Valid value range: 0-100.
+* `connect_timeout` - (Required, Int) Connection timeout detection per second. Valid value range: 0-65535.
+* `destination_connect_limit` - (Required, Int) Limitation of connections to dest port. Valid value range: 0-4294967295.
+* `destination_create_limit` - (Required, Int) Limitation of new connection to dest port per second. Valid value range: 0-4294967295.
+* `drop_icmp` - (Required, String) Block ICMP protocol. Valid values: `on`, `off`.
+* `drop_other` - (Required, String) Block other protocols. Valid values: `on`, `off`.
+* `drop_tcp` - (Required, String) Block TCP protocol. Valid values: `on`, `off`.
+* `drop_udp` - (Required, String) Block UDP protocol. Valid values: `on`, `off`.
+* `empty_connect_protect` - (Required, String) Empty connection protection switch. Valid values: `on`, `off`.
+* `source_connect_limit` - (Required, Int) Limitation of connections to origin site. Valid value range: 0-4294967295.
+* `source_create_limit` - (Required, Int) Limitation of new connection to origin site per second. Valid value range: 0-4294967295.
+* `udp_shard` - (Optional, String) UDP shard protection switch. Valid values: `on`, `off`.
+
+The `ddos_rule` object supports the following:
+
+* `acl` - (Optional, List) DDoS ACL rule configuration.
+* `allow_block` - (Optional, List) DDoS black-white list.
+* `anti_ply` - (Optional, List) DDoS protocol and connection protection.
+* `geo_ip` - (Optional, List) DDoS Protection by Geo Info.
+* `packet_filter` - (Optional, List) DDoS feature filtering configuration.
+* `speed_limit` - (Optional, List) DDoS access origin site speed limit configuration.
+* `status_info` - (Optional, List) DDoS protection level.
+* `switch` - (Optional, String) DDoS protection switch. Valid values:- `on`: Enable.- `off`: Disable.
+
+The `geo_ip` object supports the following:
+
+* `region_ids` - (Optional, Set) Region ID. See details in data source `security_policy_regions`.
+* `switch` - (Optional, String) - `on`: Enable.- `off`: Disable.
+
+The `packet_filter` object supports the following:
+
+* `packet_filters` - (Optional, List) DDoS feature filtering configuration detail.
+* `switch` - (Optional, String) - `on`: Enable. `PacketFilters` parameter is required.- `off`: Disable.
+
+The `packet_filters` object supports the following:
+
+* `action` - (Optional, String) Action to take. Valid values: `drop`, `transmit`, `drop_block`, `forward`.
+* `depth2` - (Optional, Int) Packet character depth to check of feature 2. Valid value range: 1-1500.
+* `depth` - (Optional, Int) Packet character depth to check of feature 1. Valid value range: 1-1500.
+* `dport_end` - (Optional, Int) End of the dest port range. Valid value range: 0-65535.
+* `dport_start` - (Optional, Int) Start of the dest port range. Valid value range: 0-65535.
+* `is_not2` - (Optional, Int) Negate the match condition of feature 2. Valid values:- `0`: match.- `1`: not match.
+* `is_not` - (Optional, Int) Negate the match condition of feature 1. Valid values:- `0`: match.- `1`: not match.
+* `match_begin2` - (Optional, String) Packet layer for matching begin of feature 2. Valid values:- `begin_l5`: matching from packet payload.- `begin_l4`: matching from TCP/UDP header.- `begin_l3`: matching from IP header.
+* `match_begin` - (Optional, String) Packet layer for matching begin of feature 1. Valid values:- `begin_l5`: matching from packet payload.- `begin_l4`: matching from TCP/UDP header.- `begin_l3`: matching from IP header.
+* `match_logic` - (Optional, String) Relation between multi features. Valid values: `and`, `or`, `none` (only feature 1 is used).
+* `match_type2` - (Optional, String) Match type of feature 2. Valid values:- `pcre`: regex expression.- `sunday`: string match.
+* `match_type` - (Optional, String) Match type of feature 1. Valid values:- `pcre`: regex expression.- `sunday`: string match.
+* `offset2` - (Optional, Int) Offset of feature 2. Valid value range: 1-1500.
+* `offset` - (Optional, Int) Offset of feature 1. Valid value range: 1-1500.
+* `packet_max` - (Optional, Int) Max packet size. Valid value range: 0-1500.
+* `packet_min` - (Optional, Int) Min packet size. Valid value range: 0-1500.
+* `protocol` - (Optional, String) Valid value: `tcp`, `udp`, `icmp`, `all`.
+* `sport_end` - (Optional, Int) End of the source port range. Valid value range: 0-65535.
+* `sport_start` - (Optional, Int) Start of the source port range. Valid value range: 0-65535.
+* `str2` - (Optional, String) Regex expression or string to match.
+* `str` - (Optional, String) Regex expression or string to match.
+
+The `speed_limit` object supports the following:
+
+* `flux_limit` - (Optional, String) Limit the number of fluxes. Valid range: 1 bps-10000 Gbps, 0 means no limitation, supported units: `pps`,`Kpps`,`Mpps`,`Gpps`.
+* `package_limit` - (Optional, String) Limit the number of packages. Valid range: 1 pps-10000 Gpps, 0 means no limitation, supported units: `pps`,`Kpps`,`Mpps`,`Gpps`.
+
+The `status_info` object supports the following:
+
+* `ply_level` - (Required, String) Policy level. Valid values:- `low`: loose.- `middle`: moderate.- `high`: strict.
+
+## Attributes Reference
+
+In addition to all arguments above, the following attributes are exported:
+
+* `id` - ID of the resource.
+
+
+
+## Import
+
+teo ddos_policy can be imported using the id, e.g.
+```
+$ terraform import tencentcloud_teo_ddos_policy.ddos_policy ddosPolicy_id
+```
+
diff --git a/website/docs/r/teo_default_certificate.html.markdown b/website/docs/r/teo_default_certificate.html.markdown
deleted file mode 100644
index a336f5e4be..0000000000
--- a/website/docs/r/teo_default_certificate.html.markdown
+++ /dev/null
@@ -1,53 +0,0 @@
----
-subcategory: "TencentCloud EdgeOne(TEO)"
-layout: "tencentcloud"
-page_title: "TencentCloud: tencentcloud_teo_default_certificate"
-sidebar_current: "docs-tencentcloud-resource-teo_default_certificate"
-description: |-
- Provides a resource to create a teo defaultCertificate
----
-
-# tencentcloud_teo_default_certificate
-
-Provides a resource to create a teo defaultCertificate
-
-## Example Usage
-
-```hcl
-resource "tencentcloud_teo_default_certificate" "default_certificate" {
- zone_id = tencentcloud_teo_zone.zone.id
-
- cert_info {
- cert_id = "teo-28i46c1gtmkl"
- status = "deployed"
- }
-}
-```
-
-## Argument Reference
-
-The following arguments are supported:
-
-* `zone_id` - (Required, String) Site ID.
-* `cert_info` - (Optional, List) List of default certificates. Note: This field may return null, indicating that no valid value can be obtained.
-
-The `cert_info` object supports the following:
-
-* `cert_id` - (Required, String) Server certificate ID, which is the ID of the default certificate. If you choose to upload an external certificate for SSL certificate management, a certificate ID will be generated.
-* `status` - (Optional, String) Certificate status.- applying: Application in progress.- failed: Application failed.- processing: Deploying certificate.- deployed: Certificate deployed.- disabled: Certificate disabled.Note: This field may return null, indicating that no valid value can be obtained.
-
-## Attributes Reference
-
-In addition to all arguments above, the following attributes are exported:
-
-* `id` - ID of the resource.
-
-
-
-## Import
-
-teo default_certificate can be imported using the id, e.g.
-```
-$ terraform import tencentcloud_teo_default_certificate.default_certificate zoneId
-```
-
diff --git a/website/docs/r/teo_dns_record.html.markdown b/website/docs/r/teo_dns_record.html.markdown
index 0371e1b0f1..f22e322be9 100644
--- a/website/docs/r/teo_dns_record.html.markdown
+++ b/website/docs/r/teo_dns_record.html.markdown
@@ -4,23 +4,24 @@ layout: "tencentcloud"
page_title: "TencentCloud: tencentcloud_teo_dns_record"
sidebar_current: "docs-tencentcloud-resource-teo_dns_record"
description: |-
- Provides a resource to create a teo dnsRecord
+ Provides a resource to create a teo dns_record
---
# tencentcloud_teo_dns_record
-Provides a resource to create a teo dnsRecord
+Provides a resource to create a teo dns_record
## Example Usage
```hcl
resource "tencentcloud_teo_dns_record" "dns_record" {
- zone_id = tencentcloud_teo_zone.zone.id
- record_type = "A"
- name = "sfurnace.work"
- mode = "proxied"
- content = "2.2.2.2"
- ttl = 80
+ zone_id = "zone-297z8rf93cfw"
+ type = "A"
+ name = "www.toutiao2.com"
+ content = "150.109.8.2"
+ mode = "proxied"
+ ttl = "1"
+ priority = 1
}
```
@@ -28,33 +29,32 @@ resource "tencentcloud_teo_dns_record" "dns_record" {
The following arguments are supported:
-* `content` - (Required, String) DNS Record Content.
-* `mode` - (Required, String) Proxy mode. Valid values: dns_only, cdn_only, and secure_cdn.
-* `name` - (Required, String) DNS Record Name.
-* `record_type` - (Required, String) DNS Record Type.
+* `content` - (Required, String) DNS record Content.
+* `mode` - (Required, String) Proxy mode. Valid values:- `dns_only`: only DNS resolution of the subdomain is enabled.- `proxied`: subdomain is proxied and accelerated.
+* `name` - (Required, String) DNS record Name.
+* `type` - (Required, String) DNS record Type. Valid values: `A`, `AAAA`, `CNAME`, `MX`, `TXT`, `NS`, `CAA`, `SRV`.
* `zone_id` - (Required, String) Site ID.
-* `priority` - (Optional, Int) Priority.
-* `tags` - (Optional, Map) Tag description list.
-* `ttl` - (Optional, Int) TTL, the range is 1-604800, and the minimum value of different levels of domain names is different.
+* `priority` - (Optional, Int) Priority of the record. Valid value range: 1-50, the smaller value, the higher priority.
+* `status` - (Optional, String) Resolution status. Valid values: `active`, `pending`.
+* `ttl` - (Optional, Int) Time to live of the DNS record cache in seconds.
## Attributes Reference
In addition to all arguments above, the following attributes are exported:
* `id` - ID of the resource.
-* `cname` - CNAME address.
-* `created_on` - Creation time.
-* `domain_status` - .
+* `cname` - CNAME address. Note: This field may return null, indicating that no valid value can be obtained.
+* `created_on` - Creation date.
+* `dns_record_id` - DNS record ID.
+* `domain_status` - Whether this domain enable load balancing, security, or l4 proxy capability. Valid values: `lb`, `security`, `l4`.
* `locked` - Whether the DNS record is locked.
-* `modified_on` - Modification time.
-* `status` - Resolution status.
-* `zone_name` - Site Name.
+* `modified_on` - Last modification date.
## Import
-teo dns_record can be imported using the id, e.g.
+teo dns_record can be imported using the zone_id#dns_record_id, e.g.
```
-$ terraform import tencentcloud_teo_dns_record.dnsRecord zoneId#dnsRecordId#name
+$ terraform import tencentcloud_teo_dns_record.dns_record zone-297z8rf93cfw#record-297z9ei9b9oc
```
diff --git a/website/docs/r/teo_dns_sec.html.markdown b/website/docs/r/teo_dns_sec.html.markdown
index e91c52b76d..c9039b7074 100644
--- a/website/docs/r/teo_dns_sec.html.markdown
+++ b/website/docs/r/teo_dns_sec.html.markdown
@@ -4,19 +4,19 @@ layout: "tencentcloud"
page_title: "TencentCloud: tencentcloud_teo_dns_sec"
sidebar_current: "docs-tencentcloud-resource-teo_dns_sec"
description: |-
- Provides a resource to create a teo dnsSec
+ Provides a resource to create a teo dns_sec
---
# tencentcloud_teo_dns_sec
-Provides a resource to create a teo dnsSec
+Provides a resource to create a teo dns_sec
## Example Usage
```hcl
resource "tencentcloud_teo_dns_sec" "dns_sec" {
- zone_id = tencentcloud_teo_zone.zone.id
- status = "disabled"
+ zone_id = "zone-297z8rf93cfw"
+ status = "enabled"
}
```
@@ -25,7 +25,7 @@ resource "tencentcloud_teo_dns_sec" "dns_sec" {
The following arguments are supported:
* `status` - (Required, String) DNSSEC status. Valid values: `enabled`, `disabled`.
-* `zone_id` - (Required, String) Site ID.
+* `zone_id` - (Required, String, ForceNew) Site ID.
## Attributes Reference
@@ -43,13 +43,12 @@ In addition to all arguments above, the following attributes are exported:
* `key_type` - Encryption type.
* `public_key` - Public key.
* `modified_on` - Last modification date.
-* `zone_name` - Site Name.
## Import
-teo dns_sec can be imported using the id, e.g.
+teo dns_sec can be imported using the zone_id, e.g.
```
-$ terraform import tencentcloud_teo_dns_sec.dns_sec zoneId
+$ terraform import tencentcloud_teo_dns_sec.dns_sec zone-297z8rf93cfw
```
diff --git a/website/docs/r/teo_host_certificate.html.markdown b/website/docs/r/teo_host_certificate.html.markdown
deleted file mode 100644
index 916dcd6641..0000000000
--- a/website/docs/r/teo_host_certificate.html.markdown
+++ /dev/null
@@ -1,55 +0,0 @@
----
-subcategory: "TencentCloud EdgeOne(TEO)"
-layout: "tencentcloud"
-page_title: "TencentCloud: tencentcloud_teo_host_certificate"
-sidebar_current: "docs-tencentcloud-resource-teo_host_certificate"
-description: |-
- Provides a resource to create a teo hostCertificate
----
-
-# tencentcloud_teo_host_certificate
-
-Provides a resource to create a teo hostCertificate
-
-## Example Usage
-
-```hcl
-resource "tencentcloud_teo_host_certificate" "host_certificate" {
- zone_id = tencentcloud_teo_zone.zone.id
- host = tencentcloud_teo_dns_record.dns_record.name
-
- cert_info {
- cert_id = "yqWPPbs7"
- status = "deployed"
- }
-}
-```
-
-## Argument Reference
-
-The following arguments are supported:
-
-* `host` - (Required, String) Domain name.
-* `zone_id` - (Required, String) Site ID.
-* `cert_info` - (Optional, List) Server certificate configuration.Note: This field may return null, indicating that no valid value can be obtained.
-
-The `cert_info` object supports the following:
-
-* `cert_id` - (Required, String) Server certificate ID, which is the ID of the default certificate. If you choose to upload an external certificate for SSL certificate management, a certificate ID will be generated.
-* `status` - (Optional, String) Certificate deployment status.- processing: Deploying- deployed: DeployedNote: This field may return null, indicating that no valid value can be obtained.
-
-## Attributes Reference
-
-In addition to all arguments above, the following attributes are exported:
-
-* `id` - ID of the resource.
-
-
-
-## Import
-
-teo hostCertificate can be imported using the id, e.g.
-```
-$ terraform import tencentcloud_teo_host_certificate.host_certificate zoneId#host
-```
-
diff --git a/website/docs/r/teo_load_balancing.html.markdown b/website/docs/r/teo_load_balancing.html.markdown
index 22ed14ae09..16c3d5d933 100644
--- a/website/docs/r/teo_load_balancing.html.markdown
+++ b/website/docs/r/teo_load_balancing.html.markdown
@@ -4,25 +4,25 @@ layout: "tencentcloud"
page_title: "TencentCloud: tencentcloud_teo_load_balancing"
sidebar_current: "docs-tencentcloud-resource-teo_load_balancing"
description: |-
- Provides a resource to create a teo loadBalancing
+ Provides a resource to create a teo load_balancing
---
# tencentcloud_teo_load_balancing
-Provides a resource to create a teo loadBalancing
+Provides a resource to create a teo load_balancing
## Example Usage
```hcl
resource "tencentcloud_teo_load_balancing" "load_balancing" {
- zone_id = tencentcloud_teo_zone.zone.id
-
- host = "sfurnace.work"
- origin_id = [
- split("#", tencentcloud_teo_origin_group.group0.id)[1]
- ]
- ttl = 600
- type = "proxied"
+ # backup_origin_group_id = "origin-a499ca4b-3721-11ed-b9c1-5254005a52aa"
+ host = "www.toutiao2.com"
+ origin_group_id = "origin-4f8a30b2-3720-11ed-b66b-525400dceb86"
+ status = "online"
+ tags = {}
+ ttl = 600
+ type = "proxied"
+ zone_id = "zone-297z8rf93cfw"
}
```
@@ -31,25 +31,27 @@ resource "tencentcloud_teo_load_balancing" "load_balancing" {
The following arguments are supported:
* `host` - (Required, String) Subdomain name. You can use @ to represent the root domain.
-* `origin_id` - (Required, Set: [`String`]) ID of the origin group used.
-* `type` - (Required, String) Proxy mode. Valid values: dns_only: Only DNS, proxied: Enable proxy.
-* `zone_id` - (Required, String, ForceNew) Site ID.
-* `ttl` - (Optional, Int) Indicates DNS TTL time when Type=dns_only.
+* `origin_group_id` - (Required, String) ID of the origin group to use.
+* `type` - (Required, String) Proxy mode.- `dns_only`: Only DNS.- `proxied`: Enable proxy.
+* `zone_id` - (Required, String) Site ID.
+* `backup_origin_group_id` - (Optional, String) ID of the backup origin group to use.
+* `status` - (Optional, String) Status of the task. Valid values to set: `online`, `offline`. During status change, the status is `process`.
+* `ttl` - (Optional, Int) Indicates DNS TTL time when `Type` is dns_only.
## Attributes Reference
In addition to all arguments above, the following attributes are exported:
* `id` - ID of the resource.
-* `cname` - Schedules domain names, Note: This field may return null, indicating that no valid value can be obtained.
-* `load_balancing_id` - CLB instance ID.
-* `update_time` - Update time.
+* `cname` - Schedules domain names. Note: This field may return null, indicating that no valid value can be obtained.
+* `load_balancing_id` - Load balancer instance ID.
+* `update_time` - Last modification date.
## Import
-teo loadBalancing can be imported using the id, e.g.
+teo load_balancing can be imported using the zone_id#loadBalancing_id, e.g.
```
-$ terraform import tencentcloud_teo_load_balancing.loadBalancing loadBalancing_id
+$ terraform import tencentcloud_teo_load_balancing.load_balancing zone-297z8rf93cfw#lb-2a93c649-3719-11ed-b9c1-5254005a52aa
```
diff --git a/website/docs/r/teo_origin_group.html.markdown b/website/docs/r/teo_origin_group.html.markdown
index f0aa4549d5..6da7f649d9 100644
--- a/website/docs/r/teo_origin_group.html.markdown
+++ b/website/docs/r/teo_origin_group.html.markdown
@@ -4,44 +4,29 @@ layout: "tencentcloud"
page_title: "TencentCloud: tencentcloud_teo_origin_group"
sidebar_current: "docs-tencentcloud-resource-teo_origin_group"
description: |-
- Provides a resource to create a teo originGroup
+ Provides a resource to create a teo origin_group
---
# tencentcloud_teo_origin_group
-Provides a resource to create a teo originGroup
+Provides a resource to create a teo origin_group
## Example Usage
```hcl
-locals {
- group0 = [
- {
- "record" = "1.1.1.1"
- "port" = 80
- "weight" = 30
- }, {
- "record" = "2.2.2.2"
- "port" = 443
- "weight" = 70
- }
- ]
-}
-
resource "tencentcloud_teo_origin_group" "origin_group" {
- zone_id = tencentcloud_teo_zone.zone.id
- origin_name = "group0"
- origin_type = "self"
- type = "weight"
-
- dynamic "record" {
- for_each = local.group0
- content {
- record = record.value["record"]
- port = record.value["port"]
- weight = record.value["weight"]
- area = []
- }
+ configuration_type = "weight"
+ origin_group_name = "test-group"
+ origin_type = "self"
+ tags = {}
+ zone_id = "zone-297z8rf93cfw"
+
+ origin_records {
+ area = []
+ port = 8080
+ private = false
+ record = "150.109.8.1"
+ weight = 100
}
}
```
@@ -50,39 +35,39 @@ resource "tencentcloud_teo_origin_group" "origin_group" {
The following arguments are supported:
-* `origin_name` - (Required, String) OriginGroup Name.
-* `record` - (Required, List) Origin website records.
-* `type` - (Required, String) Type of the origin group, this field is required only when `OriginType` is `self`. Valid values:- area: select an origin by using Geo info of the client IP and `Area` field in Records.- weight: weighted select an origin by using `Weight` field in Records.
+* `configuration_type` - (Required, String) Type of the origin group, this field should be set when `OriginType` is self, otherwise leave it empty. Valid values:- `area`: select an origin by using Geo info of the client IP and `Area` field in Records.- `weight`: weighted select an origin by using `Weight` field in Records.- `proto`: config by HTTP protocol.
+* `origin_group_name` - (Required, String) OriginGroup Name.
+* `origin_records` - (Required, List) Origin site records.
+* `origin_type` - (Required, String) Type of the origin site. Valid values:- `self`: self-build website.- `cos`: tencent cos.- `third_party`: third party cos.
* `zone_id` - (Required, String) Site ID.
-* `origin_type` - (Optional, String) Type of the origin website. Valid values:- self: self-build website.- cos: tencent cos.- third_party: third party cos.
-The `private_parameter` object supports the following:
+The `origin_records` object supports the following:
-* `name` - (Required, String) Parameter Name. Valid values:- AccessKeyId: Access Key ID.- SecretAccessKey: Secret Access Key.
-* `value` - (Required, String) Parameter value.
+* `port` - (Required, Int) Port of the origin site. Valid value range: 1-65535.
+* `record` - (Required, String) Record value, which could be an IPv4/IPv6 address or a domain.
+* `area` - (Optional, Set) Indicating origin site's area when `Type` field is `area`. An empty List indicate the default area. Valid value:- Asia, Americas, Europe, Africa or Oceania.- 2 characters ISO 3166 area code.
+* `private_parameter` - (Optional, List) Parameters for private authentication. Only valid when `Private` is `true`.
+* `private` - (Optional, Bool) Whether origin site is using private authentication. Only valid when `OriginType` is `third_party`.
+* `weight` - (Optional, Int) Indicating origin site's weight when `Type` field is `weight`. Valid value range: 1-100. Sum of all weights should be 100.
-The `record` object supports the following:
+The `private_parameter` object supports the following:
-* `area` - (Required, Set) Indicating origin website's area when `Type` field is `area`. An empty List indicate the default area.
-* `port` - (Required, Int) Port of the origin website.
-* `record` - (Required, String) Record Value.
-* `weight` - (Required, Int) Indicating origin website's weight when `Type` field is `weight`. Valid value range: 1-100. Sum of all weights should be 100.
-* `private_parameter` - (Optional, List) Parameters for private authentication. Only valid when `Private` is `true`.
-* `private` - (Optional, Bool) Whether origin website is using private authentication. Only valid when `OriginType` is `third_party`.
+* `name` - (Required, String) Parameter Name. Valid values:- AccessKeyId:Access Key ID.- SecretAccessKey:Secret Access Key.
+* `value` - (Required, String) Parameter value.
## Attributes Reference
In addition to all arguments above, the following attributes are exported:
* `id` - ID of the resource.
+* `origin_group_id` - OriginGroup ID.
* `update_time` - Last modification date.
-* `zone_name` - Site Name.
## Import
-teo origin_group can be imported using the id, e.g.
-```
-$ terraform import tencentcloud_teo_origin_group.origin_group zoneId#originId
-```
+teo origin_group can be imported using the zone_id#originGroup_id, e.g.
+````
+$ terraform import tencentcloud_teo_origin_group.origin_group zone-297z8rf93cfw#origin-4f8a30b2-3720-11ed-b66b-525400dceb86
+````
diff --git a/website/docs/r/teo_rule_engine.html.markdown b/website/docs/r/teo_rule_engine.html.markdown
index ced31eb536..e530ba5aa9 100644
--- a/website/docs/r/teo_rule_engine.html.markdown
+++ b/website/docs/r/teo_rule_engine.html.markdown
@@ -4,46 +4,78 @@ layout: "tencentcloud"
page_title: "TencentCloud: tencentcloud_teo_rule_engine"
sidebar_current: "docs-tencentcloud-resource-teo_rule_engine"
description: |-
- Provides a resource to create a teo ruleEngine
+ Provides a resource to create a teo rule_engine
---
# tencentcloud_teo_rule_engine
-Provides a resource to create a teo ruleEngine
+Provides a resource to create a teo rule_engine
## Example Usage
```hcl
-resource "tencentcloud_teo_rule_engine" "rule_engine" {
- zone_id = tencentcloud_teo_zone.zone.id
- rule_name = "rule0"
- status = "enable"
+resource "tencentcloud_teo_rule_engine" "rule1" {
+ zone_id = tencentcloud_teo_zone.example.id
+ rule_name = "test-rule"
+ status = "disable"
rules {
- conditions {
- conditions {
+ or {
+ and {
operator = "equal"
target = "host"
values = [
- "www.sfurnace.work",
+ tencentcloud_teo_dns_record.example.name,
+ ]
+ }
+ and {
+ operator = "equal"
+ target = "extension"
+ values = [
+ "mp4",
]
}
}
actions {
normal_action {
- action = "MaxAge"
+ action = "CachePrefresh"
parameters {
- name = "FollowOrigin"
+ name = "Switch"
values = [
"on",
]
}
parameters {
- name = "MaxAgeTime"
+ name = "Percent"
values = [
- "0",
+ "80",
+ ]
+ }
+ }
+ }
+
+ actions {
+ normal_action {
+ action = "CacheKey"
+
+ parameters {
+ name = "Type"
+ values = [
+ "Header",
+ ]
+ }
+ parameters {
+ name = "Switch"
+ values = [
+ "on",
+ ]
+ }
+ parameters {
+ name = "Value"
+ values = [
+ "Duck",
]
}
}
@@ -56,10 +88,10 @@ resource "tencentcloud_teo_rule_engine" "rule_engine" {
The following arguments are supported:
+* `rule_name` - (Required, String) Rule name.
* `rules` - (Required, List) Rule items list.
* `status` - (Required, String) Status of the rule, valid value can be `enable` or `disable`.
* `zone_id` - (Required, String) Site ID.
-* `rule_name` - (Optional, String) Rule name.
The `actions` object supports the following:
@@ -67,29 +99,29 @@ The `actions` object supports the following:
* `normal_action` - (Optional, List) Define a normal action.
* `rewrite_action` - (Optional, List) Define a rewrite action.
+The `and` object supports the following:
+
+* `operator` - (Required, String) Condition operator. Valid values are `equal`, `notequal`.
+* `target` - (Required, String) Condition target. Valid values:- `host`: Host of the URL.- `filename`: filename of the URL.- `extension`: file extension of the URL.- `full_url`: full url.- `url`: path of the URL.
+* `values` - (Required, Set) Condition Value.
+
The `code_action` object supports the following:
* `action` - (Required, String) Action name.
* `parameters` - (Required, List) Action parameters.
-The `conditions` object supports the following:
-
-* `conditions` - (Required, List) AND Conditions list of the rule. Rule would be triggered if all conditions are true.
-
-The `conditions` object supports the following:
-
-* `operator` - (Required, String) Condition operator. Valid values are `equal`, `notequal`.
-* `target` - (Required, String) Condition target. Valid values:- host: Host of the URL.- filename: filename of the URL.- extension: file extension of the URL.- full_url: full url.- url: path of the URL.
-* `values` - (Required, Set) Condition Value.
-
The `normal_action` object supports the following:
* `action` - (Required, String) Action name.
* `parameters` - (Required, List) Action parameters.
+The `or` object supports the following:
+
+* `and` - (Required, List) AND Conditions list of the rule. Rule would be triggered if all conditions are true.
+
The `parameters` object supports the following:
-* `action` - (Required, String) Action to take on the HEADER.
+* `action` - (Required, String) Action to take on the HEADER. Valid values: `add`, `del`, `set`.
* `name` - (Required, String) Target HEADER name.
* `values` - (Required, Set) Parameter Value.
@@ -112,7 +144,7 @@ The `rewrite_action` object supports the following:
The `rules` object supports the following:
* `actions` - (Required, List) Actions list of the rule. See details in data source `rule_engine_setting`.
-* `conditions` - (Required, List) OR Conditions list of the rule. Rule would be triggered if any of the condition is true.
+* `or` - (Required, List) OR Conditions list of the rule. Rule would be triggered if any of the condition is true.
## Attributes Reference
@@ -124,8 +156,8 @@ In addition to all arguments above, the following attributes are exported:
## Import
-teo ruleEngine can be imported using the id, e.g.
+teo rule_engine can be imported using the id#rule_id, e.g.
```
-$ terraform import tencentcloud_teo_rule_engine.rule_engine zoneId#ruleId
+$ terraform import tencentcloud_teo_rule_engine.rule_engine zone-297z8rf93cfw#rule-ajol584a
```
diff --git a/website/docs/r/teo_rule_engine_priority.html.markdown b/website/docs/r/teo_rule_engine_priority.html.markdown
new file mode 100644
index 0000000000..d1baa5e729
--- /dev/null
+++ b/website/docs/r/teo_rule_engine_priority.html.markdown
@@ -0,0 +1,57 @@
+---
+subcategory: "TencentCloud EdgeOne(TEO)"
+layout: "tencentcloud"
+page_title: "TencentCloud: tencentcloud_teo_rule_engine_priority"
+sidebar_current: "docs-tencentcloud-resource-teo_rule_engine_priority"
+description: |-
+ Provides a resource to create a teo rule_engine_priority
+---
+
+# tencentcloud_teo_rule_engine_priority
+
+Provides a resource to create a teo rule_engine_priority
+
+## Example Usage
+
+```hcl
+resource "tencentcloud_teo_rule_engine_priority" "rule_engine_priority" {
+ zone_id = "zone-294v965lwmn6"
+
+ rules_priority {
+ index = 0
+ value = "rule-m9jlttua"
+ }
+ rules_priority {
+ index = 1
+ value = "rule-m5l9t4k1"
+ }
+}
+```
+
+## Argument Reference
+
+The following arguments are supported:
+
+* `zone_id` - (Required, String) Site ID.
+* `rules_priority` - (Optional, List) Priority of rules.
+
+The `rules_priority` object supports the following:
+
+* `index` - (Optional, Int) Priority order of rules.
+* `value` - (Optional, String) Priority of rules id.
+
+## Attributes Reference
+
+In addition to all arguments above, the following attributes are exported:
+
+* `id` - ID of the resource.
+
+
+
+## Import
+
+teo rule_engine_priority can be imported using the zone_id, e.g.
+```
+$ terraform import tencentcloud_teo_rule_engine_priority.rule_engine_priority zone-294v965lwmn6
+```
+
diff --git a/website/docs/r/teo_security_policy.html.markdown b/website/docs/r/teo_security_policy.html.markdown
new file mode 100644
index 0000000000..d5ef02921f
--- /dev/null
+++ b/website/docs/r/teo_security_policy.html.markdown
@@ -0,0 +1,385 @@
+---
+subcategory: "TencentCloud EdgeOne(TEO)"
+layout: "tencentcloud"
+page_title: "TencentCloud: tencentcloud_teo_security_policy"
+sidebar_current: "docs-tencentcloud-resource-teo_security_policy"
+description: |-
+ Provides a resource to create a teo security_policy
+---
+
+# tencentcloud_teo_security_policy
+
+Provides a resource to create a teo security_policy
+
+## Example Usage
+
+```hcl
+resource "tencentcloud_teo_security_policy" "security_policy" {
+ entity = "aaa.sfurnace.work"
+ zone_id = "zone-2983wizgxqvm"
+
+ config {
+ acl_config {
+ switch = "off"
+ }
+
+ bot_config {
+ switch = "off"
+
+ intelligence_rule {
+ switch = "off"
+
+ items {
+ action = "drop"
+ label = "evil_bot"
+ }
+ items {
+ action = "alg"
+ label = "suspect_bot"
+ }
+ items {
+ action = "monitor"
+ label = "good_bot"
+ }
+ items {
+ action = "trans"
+ label = "normal"
+ }
+ }
+
+ managed_rule {
+ action = "monitor"
+ alg_managed_ids = []
+ cap_managed_ids = []
+ drop_managed_ids = []
+ mon_managed_ids = []
+ page_id = 0
+ punish_time = 0
+ response_code = 0
+ rule_id = 0
+ trans_managed_ids = []
+ }
+
+ portrait_rule {
+ alg_managed_ids = []
+ cap_managed_ids = []
+ drop_managed_ids = []
+ mon_managed_ids = []
+ rule_id = -1
+ switch = "off"
+ }
+ }
+
+ drop_page_config {
+ switch = "on"
+
+ acl_drop_page_detail {
+ name = "-"
+ page_id = 0
+ status_code = 569
+ type = "default"
+ }
+
+ waf_drop_page_detail {
+ name = "-"
+ page_id = 0
+ status_code = 566
+ type = "default"
+ }
+ }
+
+ except_config {
+ switch = "on"
+ }
+
+ ip_table_config {
+ switch = "off"
+ }
+
+ rate_limit_config {
+ switch = "on"
+
+ intelligence {
+ action = "monitor"
+ switch = "off"
+ }
+
+ template {
+ mode = "sup_loose"
+
+ detail {
+ action = "alg"
+ id = 831807989
+ mode = "sup_loose"
+ period = 1
+ punish_time = 0
+ threshold = 2000
+ }
+ }
+ }
+
+ switch_config {
+ web_switch = "on"
+ }
+
+ waf_config {
+ level = "strict"
+ mode = "block"
+ switch = "on"
+
+ ai_rule {
+ mode = "smart_status_close"
+ }
+
+ waf_rules {
+ block_rule_ids = [
+ 22,
+ 84214562,
+ 106246133,
+ 106246507,
+ 106246508,
+ 106246523,
+ 106246524,
+ 106246679,
+ 106247029,
+ 106247048,
+ 106247140,
+ 106247356,
+ 106247357,
+ 106247358,
+ 106247378,
+ 106247389,
+ 106247392,
+ 106247394,
+ 106247405,
+ 106247409,
+ 106247413,
+ 106247558,
+ 106247795,
+ 106247819,
+ 106248021,
+ ]
+ observe_rule_ids = []
+ switch = "off"
+ }
+ }
+ }
+}
+```
+
+## Argument Reference
+
+The following arguments are supported:
+
+* `entity` - (Required, String) Subdomain.
+* `zone_id` - (Required, String) Site ID.
+* `config` - (Optional, List) Security policy configuration.
+
+The `acl_config` object supports the following:
+
+* `switch` - (Required, String) - `on`: Enable.- `off`: Disable.
+* `user_rules` - (Optional, List) Custom configuration.
+
+The `acl_drop_page_detail` object supports the following:
+
+* `name` - (Optional, String) File name or URL.
+* `page_id` - (Optional, Int) ID of the custom error page. when set to 0, use system default error page.
+* `status_code` - (Optional, Int) HTTP status code to use. Valid range: 100-600.
+* `type` - (Optional, String) Type of the custom error page. Valid values: `file`, `url`.
+
+The `ai_rule` object supports the following:
+
+* `mode` - (Optional, String) Valid values:- `smart_status_close`: disabled.- `smart_status_open`: blocked.- `smart_status_observe`: observed.
+
+The `bot_config` object supports the following:
+
+* `intelligence_rule` - (Optional, List) Bot intelligent rule configuration.
+* `managed_rule` - (Optional, List) Preset rules.
+* `portrait_rule` - (Optional, List) Portrait rule.
+* `switch` - (Optional, String) - `on`: Enable.- `off`: Disable.
+
+The `conditions` object supports the following:
+
+* `match_content` - (Required, String) Content to match.
+* `match_from` - (Required, String) Items to match. Valid values:- `host`: Host of the request.- `sip`: Client IP.- `ua`: User-Agent.- `cookie`: Session cookie.- `cgi`: CGI script.- `xff`: XFF extension header.- `url`: URL of the request.- `accept`: Accept encoding of the request.- `method`: HTTP method of the request.- `header`: HTTP header of the request.- `sip_proto`: Network protocol of the request.
+* `match_param` - (Required, String) Parameter for match item. For example, when match from header, match parameter can be set to a header key.
+* `operator` - (Required, String) Valid values:- `equal`: string equal.- `not_equal`: string not equal.- `include`: string include.- `not_include`: string not include.- `match`: ip match.- `not_match`: ip not match.- `include_area`: area include.- `is_empty`: field existed but empty.- `not_exists`: field is not existed.- `regexp`: regex match.- `len_gt`: value greater than.- `len_lt`: value less than.- `len_eq`: value equal.- `match_prefix`: string prefix match.- `match_suffix`: string suffix match.- `wildcard`: wildcard match.
+
+The `config` object supports the following:
+
+* `acl_config` - (Optional, List) ACL configuration.
+* `bot_config` - (Optional, List) Bot Configuration.
+* `drop_page_config` - (Optional, List) Custom drop page configuration.
+* `except_config` - (Optional, List) Exception rule configuration.
+* `ip_table_config` - (Optional, List) Basic access control.
+* `rate_limit_config` - (Optional, List) RateLimit Configuration.
+* `switch_config` - (Optional, List) Main switch of 7-layer security.
+* `waf_config` - (Optional, List) WAF (Web Application Firewall) Configuration.
+
+The `detail` object supports the following:
+
+* `action` - (Optional, String) Action to take.
+* `id` - (Optional, Int) Template ID. Note: This field may return null, indicating that no valid value can be obtained.
+* `mode` - (Optional, String) Template Name. Note: This field may return null, indicating that no valid value can be obtained.
+* `period` - (Optional, Int) Period.
+* `punish_time` - (Optional, Int) Punish time.
+* `threshold` - (Optional, Int) Threshold.
+
+The `drop_page_config` object supports the following:
+
+* `acl_drop_page_detail` - (Optional, List) Custom error page of ACL rules.
+* `switch` - (Optional, String) - `on`: Enable.- `off`: Disable.
+* `waf_drop_page_detail` - (Optional, List) Custom error page of WAF rules.
+
+The `except_config` object supports the following:
+
+* `except_user_rules` - (Optional, List) Exception rules.
+* `switch` - (Optional, String) - `on`: Enable.- `off`: Disable.
+
+The `except_user_rule_conditions` object supports the following:
+
+* `match_content` - (Optional, String) Content to match.
+* `match_from` - (Optional, String) Items to match. Valid values:- `host`: Host of the request.- `sip`: Client IP.- `ua`: User-Agent.- `cookie`: Session cookie.- `cgi`: CGI script.- `xff`: XFF extension header.- `url`: URL of the request.- `accept`: Accept encoding of the request.- `method`: HTTP method of the request.- `header`: HTTP header of the request.- `sip_proto`: Network protocol of the request.
+* `match_param` - (Optional, String) Parameter for match item. For example, when match from header, match parameter can be set to a header key.
+* `operator` - (Optional, String) Valid values:- `equal`: string equal.- `not_equal`: string not equal.- `include`: string include.- `not_include`: string not include.- `match`: ip match.- `not_match`: ip not match.- `include_area`: area include.- `is_empty`: field existed but empty.- `not_exists`: field is not existed.- `regexp`: regex match.- `len_gt`: value greater than.- `len_lt`: value less than.- `len_eq`: value equal.- `match_prefix`: string prefix match.- `match_suffix`: string suffix match.- `wildcard`: wildcard match.
+
+The `except_user_rule_scope` object supports the following:
+
+* `modules` - (Optional, Set) Modules in which the rule take effect. Valid values: `waf`.
+
+The `except_user_rules` object supports the following:
+
+* `action` - (Optional, String) Action to take. Valid values: `skip`.
+* `except_user_rule_conditions` - (Optional, List) Conditions of the rule.
+* `except_user_rule_scope` - (Optional, List) Scope of the rule in effect.
+* `rule_priority` - (Optional, Int) Priority of the rule. Valid value range: 0-100.
+* `rule_status` - (Optional, String) Status of the rule. Valid values:- `on`: Enabled.- `off`: Disabled.
+
+The `intelligence_rule` object supports the following:
+
+* `items` - (Optional, List) Configuration detail.
+* `switch` - (Optional, String) - `on`: Enable.- `off`: Disable.
+
+The `intelligence` object supports the following:
+
+* `action` - (Optional, String) Action to take. Valid values: `monitor`, `alg`.
+* `switch` - (Optional, String) - `on`: Enable.- `off`: Disable.
+
+The `ip_table_config` object supports the following:
+
+* `rules` - (Optional, List) Rules list.
+* `switch` - (Optional, String) - `on`: Enable.- `off`: Disable.
+
+The `items` object supports the following:
+
+* `action` - (Optional, String) Action to take. Valid values: `trans`, `monitor`, `alg`, `captcha`, `drop`.
+* `label` - (Optional, String) Bot label, valid values: `evil_bot`, `suspect_bot`, `good_bot`, `normal`.
+
+The `managed_rule` object supports the following:
+
+* `action` - (Optional, String) Action to take. Valid values: `drop`, `trans`, `monitor`, `alg`.
+* `alg_managed_ids` - (Optional, Set) Rules to enable when action is `alg`. See details in data source `bot_managed_rules`.
+* `cap_managed_ids` - (Optional, Set) Rules to enable when action is `captcha`. See details in data source `bot_managed_rules`.
+* `drop_managed_ids` - (Optional, Set) Rules to enable when action is `drop`. See details in data source `bot_managed_rules`.
+* `mon_managed_ids` - (Optional, Set) Rules to enable when action is `monitor`. See details in data source `bot_managed_rules`.
+* `name` - (Optional, String) Name of the custom response page.
+* `page_id` - (Optional, Int) ID of the custom response page.
+* `punish_time_unit` - (Optional, String) Time unit of the punish time.
+* `punish_time` - (Optional, Int) Punish time.
+* `redirect_url` - (Optional, String) Redirect target URL, must be an sub-domain from one of the account's site.
+* `response_code` - (Optional, Int) Response code to use when redirecting.
+* `trans_managed_ids` - (Optional, Set) Rules to enable when action is `trans`. See details in data source `bot_managed_rules`.
+
+The `portrait_rule` object supports the following:
+
+* `alg_managed_ids` - (Optional, Set) Rules to enable when action is `alg`. See details in data source `bot_portrait_rules`.
+* `cap_managed_ids` - (Optional, Set) Rules to enable when action is `captcha`. See details in data source `bot_portrait_rules`.
+* `drop_managed_ids` - (Optional, Set) Rules to enable when action is `drop`. See details in data source `bot_portrait_rules`.
+* `mon_managed_ids` - (Optional, Set) Rules to enable when action is `monitor`. See details in data source `bot_portrait_rules`.
+* `switch` - (Optional, String) - `on`: Enable.- `off`: Disable.
+
+The `rate_limit_config` object supports the following:
+
+* `intelligence` - (Optional, List) Intelligent client filter.
+* `switch` - (Optional, String) - `on`: Enable.- `off`: Disable.
+* `template` - (Optional, List) Default Template. Note: This field may return null, indicating that no valid value can be obtained.
+* `user_rules` - (Optional, List) Custom configuration.
+
+The `rules` object supports the following:
+
+* `action` - (Optional, String) Actions to take. Valid values: `drop`, `trans`, `monitor`.
+* `match_content` - (Optional, String) Matching content.
+* `match_from` - (Optional, String) Matching type. Valid values: `ip`, `area`.
+
+The `switch_config` object supports the following:
+
+* `web_switch` - (Optional, String) - `on`: Enable.- `off`: Disable.
+
+The `template` object supports the following:
+
+* `detail` - (Optional, List) Detail of the template.
+* `mode` - (Optional, String) Template Name. Note: This field may return null, indicating that no valid value can be obtained.
+
+The `user_rules` object supports the following:
+
+* `action` - (Required, String) Action to take. Valid values: `trans`, `drop`, `monitor`, `ban`, `redirect`, `page`, `alg`.
+* `conditions` - (Required, List) Conditions of the rule.
+* `rule_name` - (Required, String) Rule name.
+* `rule_priority` - (Required, Int) Priority of the rule. Valid value range: 0-100.
+* `rule_status` - (Required, String) Status of the rule. Valid values: `on`, `off`.
+* `name` - (Optional, String) Name of the custom response page.
+* `page_id` - (Optional, Int) ID of the custom response page.
+* `punish_time_unit` - (Optional, String) Time unit of the punish time. Valid values: `second`, `minutes`, `hour`.
+* `punish_time` - (Optional, Int) Punish time, Valid value range: 0-2 days.
+* `redirect_url` - (Optional, String) Redirect target URL, must be an sub-domain from one of the account's site.
+* `response_code` - (Optional, Int) Response code to use when redirecting.
+
+The `user_rules` object supports the following:
+
+* `action` - (Required, String) Valid values: `monitor`, `drop`.
+* `conditions` - (Required, List) Conditions of the rule.
+* `period` - (Required, Int) Period of the rate limit. Valid values: 10, 20, 30, 40, 50, 60 (in seconds).
+* `punish_time_unit` - (Required, String) Time unit of the punish time. Valid values: `second`, `minutes`, `hour`.
+* `punish_time` - (Required, Int) Punish time, Valid value range: 0-2 days.
+* `rule_name` - (Required, String) Rule Name.
+* `rule_priority` - (Required, Int) Priority of the rule. Valid value range: 1-100.
+* `threshold` - (Required, Int) Threshold of the rate limit. Valid value range: 0-4294967294.
+* `freq_fields` - (Optional, Set) Filter words.
+* `rule_status` - (Optional, String) Status of the rule. Valid values: `on`, `off`, `hour`.
+
+The `waf_config` object supports the following:
+
+* `level` - (Required, String) Protection level. Valid values: `loose`, `normal`, `strict`, `stricter`, `custom`.
+* `mode` - (Required, String) Protection mode. Valid values:- `block`: use block mode globally, you still can set a group of rules to use observe mode.- `observe`: use observe mode globally.
+* `switch` - (Required, String) Whether to enable WAF rules. Valid values:- `on`: Enable.- `off`: Disable.
+* `waf_rules` - (Required, List) WAF Rules Configuration.
+* `ai_rule` - (Optional, List) AI based rules configuration.
+
+The `waf_drop_page_detail` object supports the following:
+
+* `name` - (Optional, String) File name or URL.
+* `page_id` - (Optional, Int) ID of the custom error page. when set to 0, use system default error page.
+* `status_code` - (Optional, Int) HTTP status code to use. Valid range: 100-600.
+* `type` - (Optional, String) Type of the custom error page. Valid values: `file`, `url`.
+
+The `waf_rules` object supports the following:
+
+* `block_rule_ids` - (Required, Set) Block mode rules list. See details in data source `waf_managed_rules`.
+* `switch` - (Required, String) Whether to host the rules' configuration.- `on`: Enable.- `off`: Disable.
+* `observe_rule_ids` - (Optional, Set) Observe rules list. See details in data source `waf_managed_rules`.
+
+## Attributes Reference
+
+In addition to all arguments above, the following attributes are exported:
+
+* `id` - ID of the resource.
+
+
+
+## Import
+
+teo security_policy can be imported using the zoneId#entity, e.g.
+```
+$ terraform import tencentcloud_teo_security_policy.security_policy zone-2983wizgxqvm#aaa.sfurnace.work
+```
+
diff --git a/website/docs/r/teo_zone.html.markdown b/website/docs/r/teo_zone.html.markdown
index b9a2d20d5a..b46143b4f0 100644
--- a/website/docs/r/teo_zone.html.markdown
+++ b/website/docs/r/teo_zone.html.markdown
@@ -15,16 +15,24 @@ Provides a resource to create a teo zone
```hcl
resource "tencentcloud_teo_zone" "zone" {
- name = "sfurnace.work"
- plan_type = "ent_cm_with_bot"
- type = "full"
- paused = false
- cname_speed_up = "enabled"
-
+ zone_name = "toutiao2.com"
+ plan_type = "sta"
+ type = "full"
+ paused = false
# vanity_name_servers {
- # switch = "on"
- # servers = ["2.2.2.2"]
+ # switch = ""
+ # servers = ""
+ #
+ # }
+ cname_speed_up = "enabled"
+ # tags {
+ # tag_key = ""
+ # tag_value = ""
+ #
# }
+ tags = {
+ "createdBy" = "terraform"
+ }
}
```
@@ -32,17 +40,17 @@ resource "tencentcloud_teo_zone" "zone" {
The following arguments are supported:
-* `name` - (Required, String) Site name.
* `plan_type` - (Required, String) Plan type of the zone. See details in data source `zone_available_plans`.
-* `cname_speed_up` - (Optional, String) Specifies whether to enable CNAME acceleration, enabled: Enable; disabled: Disable.
+* `zone_name` - (Required, String) Site name.
+* `cname_speed_up` - (Optional, String) Specifies whether CNAME acceleration is enabled. Valid values: `enabled`, `disabled`.
* `paused` - (Optional, Bool) Indicates whether the site is disabled.
* `tags` - (Optional, Map) Tag description list.
-* `type` - (Optional, String) Specifies how the site is connected to EdgeOne.
-* `vanity_name_servers` - (Optional, List) User-defined name server information.
+* `type` - (Optional, String) Specifies how the site is connected to EdgeOne.- `full`: The site is connected via NS.- `partial`: The site is connected via CNAME.
+* `vanity_name_servers` - (Optional, List) User-defined name server information. Note: This field may return null, indicating that no valid value can be obtained.
The `vanity_name_servers` object supports the following:
-* `switch` - (Required, String) Whether to enable the custom name server.
+* `switch` - (Required, String) Whether to enable the custom name server.- `on`: Enable.- `off`: Disable.
* `servers` - (Optional, Set) List of custom name servers.
## Attributes Reference
@@ -51,15 +59,29 @@ In addition to all arguments above, the following attributes are exported:
* `id` - ID of the resource.
* `area` - Acceleration area of the zone. Valid values: `mainland`, `overseas`.
-* `cname_status` - Ownership verification status of the site when it accesses via CNAME.
+* `cname_status` - Ownership verification status of the site when it accesses via CNAME.- `finished`: The site is verified.- `pending`: The site is waiting for verification.
* `created_on` - Site creation date.
* `modified_on` - Site modification date.
-* `name_servers` - List of name servers assigned to users by Tencent Cloud.
-* `original_name_servers` - List of name servers used.
-* `status` - Site status.
-* `vanity_name_servers_ips` - User-defined name server IP information.
+* `name_servers` - List of name servers assigned by Tencent Cloud.
+* `original_name_servers` - Name server used by the site.
+* `resources` - Billing resources of the zone.
+ * `area` - Valid values: `mainland`, `overseas`.
+ * `auto_renew_flag` - Whether to automatically renew. Valid values:- `0`: Default.- `1`: Enable automatic renewal.- `2`: Disable automatic renewal.
+ * `create_time` - Resource creation date.
+ * `enable_time` - Enable time of the resource.
+ * `expire_time` - Expire time of the resource.
+ * `id` - Resource ID.
+ * `pay_mode` - Resource pay mode. Valid values:- `0`: post pay mode.
+ * `plan_id` - Associated plan ID.
+ * `status` - Status of the resource. Valid values: `normal`, `isolated`, `destroyed`.
+ * `sv` - Price inquiry parameters.
+ * `key` - Parameter Key.
+ * `value` - Parameter Value.
+* `status` - Site status. Valid values:- `active`: NS is switched.- `pending`: NS is not switched.- `moved`: NS is moved.- `deactivated`: this site is blocked.
+* `vanity_name_servers_ips` - User-defined name server IP information. Note: This field may return null, indicating that no valid value can be obtained.
* `ipv4` - IPv4 address of the custom name server.
* `name` - Name of the custom name server.
+* `zone_id` - Site ID.
## Import
diff --git a/website/docs/r/teo_zone_setting.html.markdown b/website/docs/r/teo_zone_setting.html.markdown
index 349a38abf8..aea4b234db 100644
--- a/website/docs/r/teo_zone_setting.html.markdown
+++ b/website/docs/r/teo_zone_setting.html.markdown
@@ -15,11 +15,12 @@ Provides a resource to create a teo zone_setting
```hcl
resource "tencentcloud_teo_zone_setting" "zone_setting" {
- zone_id = tencentcloud_teo_zone.zone.id
+ zone_id = "zone-297z8rf93cfw"
cache {
+
follow_origin {
- switch = "off"
+ switch = "on"
}
no_cache {
@@ -28,13 +29,13 @@ resource "tencentcloud_teo_zone_setting" "zone_setting" {
}
cache_key {
- full_url_cache = "off"
- ignore_case = "on"
+ full_url_cache = "on"
+ ignore_case = "off"
query_string {
- action = "excludeCustom"
- switch = "on"
- value = ["test", "apple"]
+ action = "includeCustom"
+ switch = "off"
+ value = []
}
}
@@ -48,18 +49,24 @@ resource "tencentcloud_teo_zone_setting" "zone_setting" {
}
compression {
- switch = "off"
+ algorithms = [
+ "brotli",
+ "gzip",
+ ]
+ switch = "on"
}
force_redirect {
redirect_status_code = 302
- switch = "on"
+ switch = "off"
}
https {
http2 = "on"
ocsp_stapling = "off"
tls_version = [
+ "TLSv1",
+ "TLSv1.1",
"TLSv1.2",
"TLSv1.3",
]
@@ -72,17 +79,23 @@ resource "tencentcloud_teo_zone_setting" "zone_setting" {
}
}
+ ipv6 {
+ switch = "off"
+ }
+
max_age {
- follow_origin = "off"
- max_age_time = 600
+ follow_origin = "on"
+ max_age_time = 0
}
offline_cache {
- switch = "off"
+ switch = "on"
}
origin {
+ backup_origins = []
origin_pull_protocol = "follow"
+ origins = []
}
post_max_size {
@@ -91,11 +104,11 @@ resource "tencentcloud_teo_zone_setting" "zone_setting" {
}
quic {
- switch = "on"
+ switch = "off"
}
smart_routing {
- switch = "on"
+ switch = "off"
}
upstream_http2 {
@@ -113,7 +126,7 @@ resource "tencentcloud_teo_zone_setting" "zone_setting" {
The following arguments are supported:
-* `zone_id` - (Required, String) Site ID.
+* `zone_id` - (Required, String, ForceNew) Site ID.
* `cache_key` - (Optional, List) Node cache key configuration.
* `cache_prefresh` - (Optional, List) Cache pre-refresh configuration.
* `cache` - (Optional, List) Cache expiration time configuration.
@@ -121,6 +134,7 @@ The following arguments are supported:
* `compression` - (Optional, List) Smart compression configuration.
* `force_redirect` - (Optional, List) Force HTTPS redirect configuration.
* `https` - (Optional, List) HTTPS acceleration configuration.
+* `ipv6` - (Optional, List) IPv6 access configuration.
* `max_age` - (Optional, List) Browser cache configuration.
* `offline_cache` - (Optional, List) Offline cache configuration.
* `origin` - (Optional, List) Origin server configuration.
@@ -132,98 +146,106 @@ The following arguments are supported:
The `cache_key` object supports the following:
-* `full_url_cache` - (Optional, String) Specifies whether to enable full-path cache.- on: Enable full-path cache (i.e., disable Ignore Query String).- off: Disable full-path cache (i.e., enable Ignore Query String).Note: This field may return null, indicating that no valid value can be obtained.
-* `ignore_case` - (Optional, String) Specifies whether the cache key is case-sensitive.Note: This field may return null, indicating that no valid value can be obtained.
-* `query_string` - (Optional, List) Request parameter contained in CacheKey.Note: This field may return null, indicating that no valid value can be obtained.
+* `full_url_cache` - (Optional, String) Specifies whether to enable full-path cache.- `on`: Enable full-path cache (i.e., disable Ignore Query String).- `off`: Disable full-path cache (i.e., enable Ignore Query String). Note: This field may return null, indicating that no valid value can be obtained.
+* `ignore_case` - (Optional, String) Specifies whether the cache key is case-sensitive. Note: This field may return null, indicating that no valid value can be obtained.
+* `query_string` - (Optional, List) Request parameter contained in CacheKey. Note: This field may return null, indicating that no valid value can be obtained.
The `cache_prefresh` object supports the following:
-* `switch` - (Required, String) Specifies whether to enable cache prefresh.- on: Enable.- off: Disable.
-* `percent` - (Optional, Int) Percentage of cache time before try to prefresh. Value range: 1-99.
+* `switch` - (Required, String) Specifies whether to enable cache prefresh.- `on`: Enable.- `off`: Disable.
+* `percent` - (Optional, Int) Percentage of cache time before try to prefresh. Valid value range: 1-99.
The `cache` object supports the following:
-* `cache_time` - (Optional, Int) Cache expiration time settings.Unit: second. The maximum value is 365 days.Note: This field may return null, indicating that no valid value can be obtained.
-* `ignore_cache_control` - (Optional, String) Specifies whether to enable force cache.- on: Enable.- off: Disable.Note: This field may return null, indicating that no valid value can be obtained.
-* `switch` - (Optional, String) Cache configuration switch.- on: Enable.- off: Disable.Note: This field may return null, indicating that no valid value can be obtained.
+* `cache_time` - (Optional, Int) Cache expiration time settings.Unit: second. The maximum value is 365 days. Note: This field may return null, indicating that no valid value can be obtained.
+* `ignore_cache_control` - (Optional, String) Specifies whether to enable force cache.- `on`: Enable.- `off`: Disable. Note: This field may return null, indicating that no valid value can be obtained.
+* `switch` - (Optional, String) Cache configuration switch.- `on`: Enable.- `off`: Disable. Note: This field may return null, indicating that no valid value can be obtained.
The `cache` object supports the following:
-* `cache` - (Optional, List) Cache configuration.Note: This field may return null, indicating that no valid value can be obtained.
-* `follow_origin` - (Optional, List) Follows the origin server configuration.Note: This field may return null, indicating that no valid value can be obtained.
-* `no_cache` - (Optional, List) No-cache configuration.Note: This field may return null, indicating that no valid value can be obtained.
+* `cache` - (Optional, List) Cache configuration. Note: This field may return null, indicating that no valid value can be obtained.
+* `follow_origin` - (Optional, List) Follows the origin server configuration. Note: This field may return null, indicating that no valid value can be obtained.
+* `no_cache` - (Optional, List) No-cache configuration. Note: This field may return null, indicating that no valid value can be obtained.
The `client_ip_header` object supports the following:
-* `switch` - (Required, String) Specifies whether to enable client IP header.- on: Enable.- off: Disable.Note: This field may return null, indicating that no valid value can be obtained.
-* `header_name` - (Optional, String) Name of the origin-pull client IP request header.Note: This field may return null, indicating that no valid value can be obtained.
+* `switch` - (Required, String) Specifies whether to enable client IP header.- `on`: Enable.- `off`: Disable. Note: This field may return null, indicating that no valid value can be obtained.
+* `header_name` - (Optional, String) Name of the origin-pull client IP request header. Note: This field may return null, indicating that no valid value can be obtained.
The `compression` object supports the following:
-* `switch` - (Required, String) Whether to enable Smart compression.- on: Enable.- off: Disable.
+* `switch` - (Required, String) Whether to enable Smart compression.- `on`: Enable.- `off`: Disable.
+* `algorithms` - (Optional, Set) Compression algorithms to select. Valid values: `brotli`, `gzip`.
The `follow_origin` object supports the following:
-* `switch` - (Required, String) According to the configuration switch of the origin site, the values are: on: open; off: off.
+* `switch` - (Optional, String) Specifies whether to follow the origin server configuration.- `on`: Enable.- `off`: Disable. Note: This field may return null, indicating that no valid value can be obtained.
The `force_redirect` object supports the following:
-* `switch` - (Required, String) Whether to enable force redirect.- on: Enable.- off: Disable.
-* `redirect_status_code` - (Optional, Int) Redirection status code.- 301- 302Note: This field may return null, indicating that no valid value can be obtained.
+* `switch` - (Required, String) Whether to enable force redirect.- `on`: Enable.- `off`: Disable.
+* `redirect_status_code` - (Optional, Int) Redirection status code.- 301- 302 Note: This field may return null, indicating that no valid value can be obtained.
The `hsts` object supports the following:
-* `switch` - (Required, String) - on: Enable.- off: Disable.
-* `include_sub_domains` - (Optional, String) Specifies whether to include subdomain names. Valid values: `on` and `off`.Note: This field may return null, indicating that no valid value can be obtained.
-* `max_age` - (Optional, Int) MaxAge value.Note: This field may return null, indicating that no valid value can be obtained.
-* `preload` - (Optional, String) Specifies whether to preload. Valid values: `on` and `off`.Note: This field may return null, indicating that no valid value can be obtained.
+* `switch` - (Required, String) - `on`: Enable.- `off`: Disable.
+* `include_sub_domains` - (Optional, String) Specifies whether to include subdomain names. Valid values: `on` and `off`. Note: This field may return null, indicating that no valid value can be obtained.
+* `max_age` - (Optional, Int) MaxAge value in seconds, should be no more than 1 day. Note: This field may return null, indicating that no valid value can be obtained.
+* `preload` - (Optional, String) Specifies whether to preload. Valid values: `on` and `off`. Note: This field may return null, indicating that no valid value can be obtained.
The `https` object supports the following:
-* `hsts` - (Optional, List) HSTS Configuration.Note: This field may return null, indicating that no valid value can be obtained.
-* `http2` - (Optional, String) HTTP2 configuration switch.- on: Enable.- off: Disable.Note: This field may return null, indicating that no valid value can be obtained.
-* `ocsp_stapling` - (Optional, String) OCSP configuration switch.- on: Enable.- off: Disable.It is disabled by default. Note: This field may return null, indicating that no valid value can be obtained.
-* `tls_version` - (Optional, Set) TLS version settings. Valid values: `TLSv1`, `TLSV1.1`, `TLSV1.2`, and `TLSv1.3`.Only consecutive versions can be enabled at the same time.Note: This field may return null, indicating that no valid value can be obtained.
+* `hsts` - (Optional, List) HSTS Configuration. Note: This field may return null, indicating that no valid value can be obtained.
+* `http2` - (Optional, String) HTTP2 configuration switch.- `on`: Enable.- `off`: Disable. Note: This field may return null, indicating that no valid value can be obtained.
+* `ocsp_stapling` - (Optional, String) OCSP configuration switch.- `on`: Enable.- `off`: Disable.It is disabled by default. Note: This field may return null, indicating that no valid value can be obtained.
+* `tls_version` - (Optional, Set) TLS version settings. Valid values: `TLSv1`, `TLSV1.1`, `TLSV1.2`, and `TLSv1.3`.Only consecutive versions can be enabled at the same time. Note: This field may return null, indicating that no valid value can be obtained.
+
+The `ipv6` object supports the following:
+
+* `switch` - (Required, String) - `on`: Enable.- `off`: Disable.
The `max_age` object supports the following:
-* `follow_origin` - (Optional, String) Specifies whether to follow the max cache age of the origin server.- on: Enable.- off: Disable.If it's on, MaxAgeTime is ignored.Note: This field may return null, indicating that no valid value can be obtained.
-* `max_age_time` - (Optional, Int) Specifies the max age of the cache (in seconds). The maximum value is 365 days.Note: the value 0 means not to cache.Note: This field may return null, indicating that no valid value can be obtained.
+* `follow_origin` - (Optional, String) Specifies whether to follow the max cache age of the origin server.- `on`: Enable.- `off`: Disable.If it's on, MaxAgeTime is ignored. Note: This field may return null, indicating that no valid value can be obtained.
+* `max_age_time` - (Optional, Int) Specifies the max age of the cache (in seconds). The maximum value is 365 days. Note: the value 0 means not to cache. Note: This field may return null, indicating that no valid value can be obtained.
The `no_cache` object supports the following:
-* `switch` - (Optional, String) Whether to cache the configuration.- on: Do not cache.- off: Cache.Note: This field may return null, indicating that no valid value can be obtained.
+* `switch` - (Optional, String) Whether to cache the configuration.- `on`: Do not cache.- `off`: Cache. Note: This field may return null, indicating that no valid value can be obtained.
The `offline_cache` object supports the following:
-* `switch` - (Required, String) Whether to enable offline cache.- on: Enable.- off: Disable.Note: This field may return null, indicating that no valid value can be obtained.
+* `switch` - (Required, String) Whether to enable offline cache.- `on`: Enable.- `off`: Disable. Note: This field may return null, indicating that no valid value can be obtained.
The `origin` object supports the following:
-* `origin_pull_protocol` - (Optional, String) Origin-pull protocol.- http: Switch HTTPS requests to HTTP.- follow: Follow the protocol of the request.- https: Switch HTTP requests to HTTPS. This only supports port 443 on the origin server.Note: This field may return null, indicating that no valid value can be obtained.
+* `backup_origins` - (Optional, Set) Backup origin sites list. Note: This field may return null, indicating that no valid value can be obtained.
+* `cos_private_access` - (Optional, String) Whether access private cos bucket is allowed when `OriginType` is cos. Note: This field may return null, indicating that no valid value can be obtained.
+* `origin_pull_protocol` - (Optional, String) Origin-pull protocol.- `http`: Switch HTTPS requests to HTTP.- `follow`: Follow the protocol of the request.- `https`: Switch HTTP requests to HTTPS. This only supports port 443 on the origin server. Note: This field may return null, indicating that no valid value can be obtained.
+* `origins` - (Optional, Set) Origin sites list. Note: This field may return null, indicating that no valid value can be obtained.
The `post_max_size` object supports the following:
-* `switch` - (Required, String) Specifies whether to enable custom setting of the maximum file size.- on: Enable. You can set a custom max size.- off: Disable. In this case, the max size defaults to 32 MB.
-* `max_size` - (Optional, Int) Maximum size. Value range: 1-500 MB.Note: This field may return null, indicating that no valid value can be obtained.
+* `switch` - (Required, String) Specifies whether to enable custom setting of the maximum file size.- `on`: Enable. You can set a custom max size.- `off`: Disable. In this case, the max size defaults to 32 MB.
+* `max_size` - (Optional, Int) Maximum size. Value range: 1-500 MB. Note: This field may return null, indicating that no valid value can be obtained.
The `query_string` object supports the following:
-* `switch` - (Required, String) Whether to use QueryString as part of CacheKey.- on: Enable.- off: Disable.Note: This field may return null, indicating that no valid value can be obtained.
-* `action` - (Optional, String) - includeCustom: Include the specified query strings.- excludeCustom: Exclude the specified query strings.Note: This field may return null, indicating that no valid value can be obtained.
-* `value` - (Optional, Set) Array of query strings used/excluded.Note: This field may return null, indicating that no valid value can be obtained.
+* `switch` - (Required, String) Whether to use QueryString as part of CacheKey.- `on`: Enable.- `off`: Disable. Note: This field may return null, indicating that no valid value can be obtained.
+* `action` - (Optional, String) - `includeCustom`: Include the specified query strings.- `excludeCustom`: Exclude the specified query strings. Note: This field may return null, indicating that no valid value can be obtained.
+* `value` - (Optional, Set) Array of query strings used/excluded. Note: This field may return null, indicating that no valid value can be obtained.
The `quic` object supports the following:
-* `switch` - (Required, String) Whether to enable QUIC.- on: Enable.- off: Disable.
+* `switch` - (Required, String) Whether to enable QUIC.- `on`: Enable.- `off`: Disable.
The `smart_routing` object supports the following:
-* `switch` - (Required, String) Whether to enable smart acceleration.- on: Enable.- off: Disable.
+* `switch` - (Required, String) Whether to enable smart acceleration.- `on`: Enable.- `off`: Disable.
The `upstream_http2` object supports the following:
-* `switch` - (Required, String) Whether to enable HTTP2 origin-pull.- on: Enable.- off: Disable.
+* `switch` - (Required, String) Whether to enable HTTP2 origin-pull.- `on`: Enable.- `off`: Disable.
The `web_socket` object supports the following:
@@ -235,13 +257,13 @@ The `web_socket` object supports the following:
In addition to all arguments above, the following attributes are exported:
* `id` - ID of the resource.
-
+* `area` - Acceleration area of the zone. Valid values: `mainland`, `overseas`.
## Import
-teo zone_setting can be imported using the id, e.g.
+teo zone_setting can be imported using the zone_id, e.g.
```
-$ terraform import tencentcloud_teo_zone_setting.zone_setting zone_id
+$ terraform import tencentcloud_teo_zone_setting.zone_setting zone-297z8rf93cfw#
```
diff --git a/website/tencentcloud.erb b/website/tencentcloud.erb
index 45a13d092d..5cfd7276c9 100644
--- a/website/tencentcloud.erb
+++ b/website/tencentcloud.erb
@@ -1657,6 +1657,24 @@
tencentcloud_teo_zone_available_plans
+
+ tencentcloud_teo_bot_managed_rules
+
+
+ tencentcloud_teo_bot_portrait_rules
+
+
+ tencentcloud_teo_rule_engine_settings
+
+
+ tencentcloud_teo_security_policy_regions
+
+
+ tencentcloud_teo_waf_rule_groups
+
+
+ tencentcloud_teo_zone_ddos_policy
+
@@ -1683,6 +1701,9 @@
tencentcloud_teo_rule_engine
+
+ tencentcloud_teo_rule_engine_priority
+
tencentcloud_teo_application_proxy
@@ -1690,10 +1711,13 @@
tencentcloud_teo_application_proxy_rule
- tencentcloud_teo_host_certificate
+ tencentcloud_teo_ddos_policy
+
+
+ tencentcloud_teo_security_policy
- tencentcloud_teo_default_certificate
+ tencentcloud_teo_custom_error_page