diff --git a/.changelog/3607.txt b/.changelog/3607.txt new file mode 100644 index 0000000000..6e3f194167 --- /dev/null +++ b/.changelog/3607.txt @@ -0,0 +1,7 @@ +```release-note:new-datasource +tencentcloud_igtm_address_pool_list +``` + +```release-note:new-resource +tencentcloud_igtm_address_pool +``` \ No newline at end of file diff --git a/go.mod b/go.mod index 8bd5872d28..17ea5cef4c 100644 --- a/go.mod +++ b/go.mod @@ -313,6 +313,7 @@ require ( github.com/subosito/gotenv v1.4.1 // indirect github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect github.com/tdakkota/asciicheck v0.2.0 // indirect + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/igtm v1.1.27 // indirect github.com/tetafro/godot v1.4.11 // indirect github.com/tidwall/gjson v1.17.0 // indirect github.com/tidwall/match v1.1.1 // indirect diff --git a/go.sum b/go.sum index 291344ede0..fc92f572da 100644 --- a/go.sum +++ b/go.sum @@ -1027,6 +1027,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/gaap v1.0.970 h1:Z82Lbc github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/gaap v1.0.970/go.mod h1:qnOT3rycGxlNy4/gmprV58Uqd9CKLUr2CL235R1AvuQ= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/gwlb v1.0.1127 h1:1ZhrN7aFPBVb4ihclkbCNOF1Mtoql6duT/cI3Q0p074= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/gwlb v1.0.1127/go.mod h1:HSfd/mm8VyXn7VTe3tOvPgsumbsfeYcG5QgaCI1vsRk= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/igtm v1.1.27 h1:XuNVpfyHcmyAavX06p8w7FLjY4eT70ndPZbazxRpbCY= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/igtm v1.1.27/go.mod h1:26rOgYylbB4qROMOuYaOzUDF8CSKQi022SbX/FB+NHQ= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.563/go.mod h1:uom4Nvi9W+Qkom0exYiJ9VWJjXwyxtPYTkKkaLMlfE0= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.1145 h1:/wV6YoCqDU1XXci7kxt/k+RTwx2xLzcxH4NYbC1UT6k= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.1145/go.mod h1:tUblC9MYww0ZRScBkLYINJ7F1fxAv/Ymmpbjn05RTPY= diff --git a/tencentcloud/connectivity/client.go b/tencentcloud/connectivity/client.go index 71aeb2fde3..7d3f1d21e0 100644 --- a/tencentcloud/connectivity/client.go +++ b/tencentcloud/connectivity/client.go @@ -63,6 +63,7 @@ import ( es "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/es/v20180416" gaap "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/gaap/v20180529" gwlb "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/gwlb/v20240906" + igtmv20231024 "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/igtm/v20231024" kms "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms/v20190118" lighthouse "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/lighthouse/v20200324" css "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/live/v20180801" @@ -241,6 +242,7 @@ type TencentCloudClient struct { cdwpgv20201230Conn *cdwpg.Client gwlbv20240906Conn *gwlb.Client billingv20180709Conn *billing.Client + igtmv20231024Conn *igtmv20231024.Client } // NewClientProfile returns a new ClientProfile @@ -2116,3 +2118,16 @@ func (me *TencentCloudClient) UseBillingV20180709Client() *billing.Client { return me.billingv20180709Conn } + +// UseIgtmV20231024Client return IGTM client for service +func (me *TencentCloudClient) UseIgtmV20231024Client() *igtmv20231024.Client { + if me.igtmv20231024Conn != nil { + return me.igtmv20231024Conn + } + cpf := me.NewClientProfile(300) + cpf.Language = "zh-CN" + me.igtmv20231024Conn, _ = igtmv20231024.NewClient(me.Credential, me.Region, cpf) + me.igtmv20231024Conn.WithHttpTransport(&LogRoundTripper{}) + + return me.igtmv20231024Conn +} diff --git a/tencentcloud/provider.go b/tencentcloud/provider.go index 3cac2cbf41..baf4ed922a 100644 --- a/tencentcloud/provider.go +++ b/tencentcloud/provider.go @@ -73,6 +73,7 @@ import ( "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/fl" "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/gaap" "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/gwlb" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/igtm" "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/kms" "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/lighthouse" "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/mariadb" @@ -1299,6 +1300,7 @@ func Provider() *schema.Provider { "tencentcloud_mqtt_instance_detail": mqtt.DataSourceTencentCloudMqttInstanceDetail(), "tencentcloud_mqtt_topics": mqtt.DataSourceTencentCloudMqttTopics(), "tencentcloud_billing_budget_operation_log": billing.DataSourceTencentCloudBillingBudgetOperationLog(), + "tencentcloud_igtm_address_pool_list": igtm.DataSourceTencentCloudIgtmAddressPoolList(), }, ResourcesMap: map[string]*schema.Resource{ @@ -2470,6 +2472,7 @@ func Provider() *schema.Provider { "tencentcloud_mqtt_http_authenticator": mqtt.ResourceTencentCloudMqttHttpAuthenticator(), "tencentcloud_billing_allocation_tag": billing.ResourceTencentCloudBillingAllocationTag(), "tencentcloud_billing_budget": billing.ResourceTencentCloudBillingBudget(), + "tencentcloud_igtm_address_pool": igtm.ResourceTencentCloudIgtmAddressPool(), }, ConfigureFunc: providerConfigure, diff --git a/tencentcloud/provider.md b/tencentcloud/provider.md index 859c8c47dc..02838bbe5e 100644 --- a/tencentcloud/provider.md +++ b/tencentcloud/provider.md @@ -2444,3 +2444,9 @@ Tencent Container Security Service(TCSS) Resource tencentcloud_tcss_cluster_access tencentcloud_tcss_refresh_task_operation + +Intelligent Global Traffic Manager(IGTM) +Data Source +tencentcloud_igtm_address_pool_list +Resource +tencentcloud_igtm_address_pool diff --git a/tencentcloud/services/igtm/data_source_tc_igtm_address_pool_list.go b/tencentcloud/services/igtm/data_source_tc_igtm_address_pool_list.go new file mode 100644 index 0000000000..55af7c0e4c --- /dev/null +++ b/tencentcloud/services/igtm/data_source_tc_igtm_address_pool_list.go @@ -0,0 +1,365 @@ +package igtm + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + igtmv20231024 "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/igtm/v20231024" + + tccommon "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/common" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func DataSourceTencentCloudIgtmAddressPoolList() *schema.Resource { + return &schema.Resource{ + Read: dataSourceTencentCloudIgtmAddressPoolListRead, + Schema: map[string]*schema.Schema{ + "filters": { + Type: schema.TypeList, + Optional: true, + Description: "Alert filter conditions: PoolName: Address pool name; MonitorId: Monitor ID.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + Description: "Filter field name, supported list as follows:\n- type: Main resource type, CDN.\n- instanceId: IGTM instance ID. This is a required parameter, failure to provide will cause interface query failure.", + }, + "value": { + Type: schema.TypeSet, + Required: true, + Description: "Filter field value.", + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "fuzzy": { + Type: schema.TypeBool, + Optional: true, + Description: "Whether to enable fuzzy query, only supports filter field name as domain.\nWhen fuzzy query is enabled, maximum Value length is 1, otherwise maximum Value length is 5. (Reserved field, currently not used).", + }, + }, + }, + }, + + "address_pool_set": { + Type: schema.TypeList, + Computed: true, + Description: "Resource group list.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "pool_id": { + Type: schema.TypeInt, + Computed: true, + Description: "Address pool ID.", + }, + "pool_name": { + Type: schema.TypeString, + Computed: true, + Description: "Address pool name.", + }, + "addr_type": { + Type: schema.TypeString, + Computed: true, + Description: "Address pool address type: IPV4, IPV6, DOMAIN.", + }, + "traffic_strategy": { + Type: schema.TypeString, + Computed: true, + Description: "Traffic strategy: WEIGHT load balancing, ALL resolve all.", + }, + "monitor_id": { + Type: schema.TypeInt, + Computed: true, + Description: "Monitor ID.", + }, + "status": { + Type: schema.TypeString, + Computed: true, + Description: "OK normal, DOWN failure, WARN risk, UNKNOWN unknown.", + }, + "address_num": { + Type: schema.TypeInt, + Computed: true, + Description: "Address count.", + }, + "monitor_group_num": { + Type: schema.TypeInt, + Computed: true, + Description: "Probe point count.", + }, + "monitor_task_num": { + Type: schema.TypeInt, + Computed: true, + Description: "Detection task count.", + }, + "instance_info": { + Type: schema.TypeList, + Computed: true, + Description: "Instance related information.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "instance_id": { + Type: schema.TypeString, + Computed: true, + Description: "Instance ID.", + }, + "instance_name": { + Type: schema.TypeString, + Computed: true, + Description: "Instance name.", + }, + }, + }, + }, + "address_set": { + Type: schema.TypeList, + Computed: true, + Description: "Address pool address information.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "addr": { + Type: schema.TypeString, + Computed: true, + Description: "Address value: only supports IPv4, IPv6 and domain name formats;\nLoopback addresses, reserved addresses, internal network addresses and Tencent reserved network segments are not supported.", + }, + "is_enable": { + Type: schema.TypeString, + Computed: true, + Description: "Whether to enable: DISABLED disabled; ENABLED enabled.", + }, + "address_id": { + Type: schema.TypeInt, + Computed: true, + Description: "Address ID.", + }, + "location": { + Type: schema.TypeString, + Computed: true, + Description: "Address name.", + }, + "status": { + Type: schema.TypeString, + Computed: true, + Description: "OK normal, DOWN failure, WARN risk, UNKNOWN detecting, UNMONITORED unknown.", + }, + "weight": { + Type: schema.TypeInt, + Computed: true, + Description: "Weight, required when traffic strategy is WEIGHT; range 1-100.", + }, + "created_on": { + Type: schema.TypeString, + Computed: true, + Description: "Creation time.", + }, + "updated_on": { + Type: schema.TypeString, + Computed: true, + Description: "Modification time.", + }, + }, + }, + }, + "created_on": { + Type: schema.TypeString, + Computed: true, + Description: "Creation time.", + }, + "updated_on": { + Type: schema.TypeString, + Computed: true, + Description: "Update time.", + }, + }, + }, + }, + + "result_output_file": { + Type: schema.TypeString, + Optional: true, + Description: "Used to save results.", + }, + }, + } +} + +func dataSourceTencentCloudIgtmAddressPoolListRead(d *schema.ResourceData, meta interface{}) error { + defer tccommon.LogElapsed("data_source.tencentcloud_igtm_address_pool_list.read")() + defer tccommon.InconsistentCheck(d, meta)() + + var ( + logId = tccommon.GetLogId(nil) + ctx = tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta) + service = IgtmService{client: meta.(tccommon.ProviderMeta).GetAPIV3Conn()} + ) + + paramMap := make(map[string]interface{}) + if v, ok := d.GetOk("filters"); ok { + filtersSet := v.([]interface{}) + tmpSet := make([]*igtmv20231024.ResourceFilter, 0, len(filtersSet)) + for _, item := range filtersSet { + filtersMap := item.(map[string]interface{}) + resourceFilter := igtmv20231024.ResourceFilter{} + if v, ok := filtersMap["name"].(string); ok && v != "" { + resourceFilter.Name = helper.String(v) + } + + if v, ok := filtersMap["value"]; ok { + valueSet := v.(*schema.Set).List() + for i := range valueSet { + value := valueSet[i].(string) + resourceFilter.Value = append(resourceFilter.Value, helper.String(value)) + } + } + + if v, ok := filtersMap["fuzzy"].(bool); ok { + resourceFilter.Fuzzy = helper.Bool(v) + } + + tmpSet = append(tmpSet, &resourceFilter) + } + + paramMap["Filters"] = tmpSet + } + + var respData []*igtmv20231024.AddressPool + reqErr := resource.Retry(tccommon.ReadRetryTimeout, func() *resource.RetryError { + result, e := service.DescribeIgtmAddressPoolListByFilter(ctx, paramMap) + if e != nil { + return tccommon.RetryError(e) + } + + respData = result + return nil + }) + + if reqErr != nil { + return reqErr + } + + addressPoolSetList := make([]map[string]interface{}, 0, len(respData)) + if respData != nil { + for _, addressPoolSet := range respData { + addressPoolSetMap := map[string]interface{}{} + if addressPoolSet.PoolId != nil { + addressPoolSetMap["pool_id"] = addressPoolSet.PoolId + } + + if addressPoolSet.PoolName != nil { + addressPoolSetMap["pool_name"] = addressPoolSet.PoolName + } + + if addressPoolSet.AddrType != nil { + addressPoolSetMap["addr_type"] = addressPoolSet.AddrType + } + + if addressPoolSet.TrafficStrategy != nil { + addressPoolSetMap["traffic_strategy"] = addressPoolSet.TrafficStrategy + } + + if addressPoolSet.MonitorId != nil { + addressPoolSetMap["monitor_id"] = addressPoolSet.MonitorId + } + + if addressPoolSet.Status != nil { + addressPoolSetMap["status"] = addressPoolSet.Status + } + + if addressPoolSet.AddressNum != nil { + addressPoolSetMap["address_num"] = addressPoolSet.AddressNum + } + + if addressPoolSet.MonitorGroupNum != nil { + addressPoolSetMap["monitor_group_num"] = addressPoolSet.MonitorGroupNum + } + + if addressPoolSet.MonitorTaskNum != nil { + addressPoolSetMap["monitor_task_num"] = addressPoolSet.MonitorTaskNum + } + + instanceInfoList := make([]map[string]interface{}, 0, len(addressPoolSet.InstanceInfo)) + if addressPoolSet.InstanceInfo != nil { + for _, instanceInfo := range addressPoolSet.InstanceInfo { + instanceInfoMap := map[string]interface{}{} + if instanceInfo.InstanceId != nil { + instanceInfoMap["instance_id"] = instanceInfo.InstanceId + } + + if instanceInfo.InstanceName != nil { + instanceInfoMap["instance_name"] = instanceInfo.InstanceName + } + + instanceInfoList = append(instanceInfoList, instanceInfoMap) + } + + addressPoolSetMap["instance_info"] = instanceInfoList + } + + addressSetList := make([]map[string]interface{}, 0, len(addressPoolSet.AddressSet)) + if addressPoolSet.AddressSet != nil { + for _, addressSet := range addressPoolSet.AddressSet { + addressSetMap := map[string]interface{}{} + if addressSet.Addr != nil { + addressSetMap["addr"] = addressSet.Addr + } + + if addressSet.IsEnable != nil { + addressSetMap["is_enable"] = addressSet.IsEnable + } + + if addressSet.AddressId != nil { + addressSetMap["address_id"] = addressSet.AddressId + } + + if addressSet.Location != nil { + addressSetMap["location"] = addressSet.Location + } + + if addressSet.Status != nil { + addressSetMap["status"] = addressSet.Status + } + + if addressSet.Weight != nil { + addressSetMap["weight"] = addressSet.Weight + } + + if addressSet.CreatedOn != nil { + addressSetMap["created_on"] = addressSet.CreatedOn + } + + if addressSet.UpdatedOn != nil { + addressSetMap["updated_on"] = addressSet.UpdatedOn + } + + addressSetList = append(addressSetList, addressSetMap) + } + + addressPoolSetMap["address_set"] = addressSetList + } + + if addressPoolSet.CreatedOn != nil { + addressPoolSetMap["created_on"] = addressPoolSet.CreatedOn + } + + if addressPoolSet.UpdatedOn != nil { + addressPoolSetMap["updated_on"] = addressPoolSet.UpdatedOn + } + + addressPoolSetList = append(addressPoolSetList, addressPoolSetMap) + } + + _ = d.Set("address_pool_set", addressPoolSetList) + } + + d.SetId(helper.BuildToken()) + output, ok := d.GetOk("result_output_file") + if ok && output.(string) != "" { + if e := tccommon.WriteToFile(output.(string), addressPoolSetList); e != nil { + return e + } + } + + return nil +} diff --git a/tencentcloud/services/igtm/data_source_tc_igtm_address_pool_list.md b/tencentcloud/services/igtm/data_source_tc_igtm_address_pool_list.md new file mode 100644 index 0000000000..b246912482 --- /dev/null +++ b/tencentcloud/services/igtm/data_source_tc_igtm_address_pool_list.md @@ -0,0 +1,21 @@ +Use this data source to query detailed information of IGTM address pool list + +Example Usage + +Query all address pool list + +```hcl +data "tencentcloud_igtm_address_pool_list" "example" {} +``` + +Query address pool list by filter + +```hcl +data "tencentcloud_igtm_address_pool_list" "example" { + filters { + name = "PoolName" + value = ["tf-example"] + fuzzy = true + } +} +``` diff --git a/tencentcloud/services/igtm/data_source_tc_igtm_address_pool_list_test.go b/tencentcloud/services/igtm/data_source_tc_igtm_address_pool_list_test.go new file mode 100644 index 0000000000..924a021689 --- /dev/null +++ b/tencentcloud/services/igtm/data_source_tc_igtm_address_pool_list_test.go @@ -0,0 +1,29 @@ +package igtm_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + + tcacctest "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/acctest" +) + +func TestAccTencentCloudIgtmAddressPoolListDataSource_basic(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + tcacctest.AccPreCheck(t) + }, + Providers: tcacctest.AccProviders, + Steps: []resource.TestStep{{ + Config: testAccIgtmAddressPoolListDataSource, + Check: resource.ComposeTestCheckFunc( + tcacctest.AccCheckTencentCloudDataSourceID("data.tencentcloud_igtm_address_pool_list.example"), + ), + }}, + }) +} + +const testAccIgtmAddressPoolListDataSource = ` +data "tencentcloud_igtm_address_pool_list" "example" {} +` diff --git a/tencentcloud/services/igtm/resource_tc_igtm_address_pool.go b/tencentcloud/services/igtm/resource_tc_igtm_address_pool.go new file mode 100644 index 0000000000..2a4bd253df --- /dev/null +++ b/tencentcloud/services/igtm/resource_tc_igtm_address_pool.go @@ -0,0 +1,398 @@ +package igtm + +import ( + "context" + "fmt" + "log" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + igtmv20231024 "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/igtm/v20231024" + + tccommon "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/common" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func ResourceTencentCloudIgtmAddressPool() *schema.Resource { + return &schema.Resource{ + Create: resourceTencentCloudIgtmAddressPoolCreate, + Read: resourceTencentCloudIgtmAddressPoolRead, + Update: resourceTencentCloudIgtmAddressPoolUpdate, + Delete: resourceTencentCloudIgtmAddressPoolDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Schema: map[string]*schema.Schema{ + "pool_name": { + Type: schema.TypeString, + Required: true, + Description: "Address pool name, duplicates are not allowed.", + }, + + "traffic_strategy": { + Type: schema.TypeString, + Required: true, + Description: "Traffic strategy: WEIGHT for load balancing, ALL for resolving all healthy addresses.", + }, + + "address_set": { + Type: schema.TypeSet, + Required: true, + Description: "Address list.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "addr": { + Type: schema.TypeString, + Required: true, + Description: "Address value: only supports IPv4, IPv6, and domain name formats.\nLoopback addresses, reserved addresses, internal addresses, and Tencent reserved network segments are not supported.", + }, + "is_enable": { + Type: schema.TypeString, + Required: true, + Description: "Whether to enable: DISABLED for disabled, ENABLED for enabled.", + }, + "address_id": { + Type: schema.TypeInt, + Computed: true, + Description: "Address ID.", + }, + "location": { + Type: schema.TypeString, + Optional: true, + Description: "Address name.", + }, + "status": { + Type: schema.TypeString, + Computed: true, + Description: "OK for normal, DOWN for failure, WARN for risk, UNKNOWN for probing, UNMONITORED for unknown.", + }, + "weight": { + Type: schema.TypeInt, + Optional: true, + Description: "Weight, required when traffic strategy is WEIGHT; range 1-100.", + }, + "created_on": { + Type: schema.TypeString, + Computed: true, + Description: "Creation time.", + }, + "updated_on": { + Type: schema.TypeString, + Computed: true, + Description: "Modification time.", + }, + }, + }, + }, + + "monitor_id": { + Type: schema.TypeInt, + Optional: true, + Description: "Monitor ID.", + }, + + // computed + "pool_id": { + Type: schema.TypeInt, + Computed: true, + Description: "Address pool ID.", + }, + }, + } +} + +func resourceTencentCloudIgtmAddressPoolCreate(d *schema.ResourceData, meta interface{}) error { + defer tccommon.LogElapsed("resource.tencentcloud_igtm_address_pool.create")() + defer tccommon.InconsistentCheck(d, meta)() + + var ( + logId = tccommon.GetLogId(tccommon.ContextNil) + ctx = tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta) + request = igtmv20231024.NewCreateAddressPoolRequest() + response = igtmv20231024.NewCreateAddressPoolResponse() + poolId string + ) + + if v, ok := d.GetOk("pool_name"); ok { + request.PoolName = helper.String(v.(string)) + } + + if v, ok := d.GetOk("traffic_strategy"); ok { + request.TrafficStrategy = helper.String(v.(string)) + } + + if v, ok := d.GetOk("address_set"); ok { + for _, item := range v.(*schema.Set).List() { + addressSetMap := item.(map[string]interface{}) + address := igtmv20231024.Address{} + if v, ok := addressSetMap["addr"].(string); ok && v != "" { + address.Addr = helper.String(v) + } + + if v, ok := addressSetMap["is_enable"].(string); ok && v != "" { + address.IsEnable = helper.String(v) + } + + if v, ok := addressSetMap["address_id"].(int); ok { + address.AddressId = helper.IntUint64(v) + } + + if v, ok := addressSetMap["location"].(string); ok && v != "" { + address.Location = helper.String(v) + } + + if v, ok := addressSetMap["status"].(string); ok && v != "" { + address.Status = helper.String(v) + } + + if v, ok := addressSetMap["weight"].(int); ok { + address.Weight = helper.IntUint64(v) + } + + request.AddressSet = append(request.AddressSet, &address) + } + } + + if v, ok := d.GetOkExists("monitor_id"); ok { + request.MonitorId = helper.IntUint64(v.(int)) + } + + reqErr := resource.Retry(tccommon.WriteRetryTimeout, func() *resource.RetryError { + result, e := meta.(tccommon.ProviderMeta).GetAPIV3Conn().UseIgtmV20231024Client().CreateAddressPoolWithContext(ctx, request) + if e != nil { + return tccommon.RetryError(e) + } else { + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), result.ToJsonString()) + } + + if result == nil || result.Response == nil { + return resource.NonRetryableError(fmt.Errorf("Create igtm address pool failed, Response is nil.")) + } + + response = result + return nil + }) + + if reqErr != nil { + log.Printf("[CRITAL]%s create igtm address pool failed, reason:%+v", logId, reqErr) + return reqErr + } + + if response.Response.AddressPoolId == nil { + return fmt.Errorf("AddressPoolId is nil.") + } + + poolId = helper.UInt64ToStr(*response.Response.AddressPoolId) + d.SetId(poolId) + return resourceTencentCloudIgtmAddressPoolRead(d, meta) +} + +func resourceTencentCloudIgtmAddressPoolRead(d *schema.ResourceData, meta interface{}) error { + defer tccommon.LogElapsed("resource.tencentcloud_igtm_address_pool.read")() + defer tccommon.InconsistentCheck(d, meta)() + + var ( + logId = tccommon.GetLogId(tccommon.ContextNil) + ctx = tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta) + service = IgtmService{client: meta.(tccommon.ProviderMeta).GetAPIV3Conn()} + poolId = d.Id() + ) + + respData, err := service.DescribeIgtmAddressPoolById(ctx, poolId) + if err != nil { + return err + } + + if respData == nil { + log.Printf("[WARN]%s resource `tencentcloud_igtm_address_pool` [%s] not found, please check if it has been deleted.\n", logId, d.Id()) + d.SetId("") + return nil + } + + if respData.AddressPool != nil { + if respData.AddressPool.PoolName != nil { + _ = d.Set("pool_name", respData.AddressPool.PoolName) + } + + if respData.AddressPool.TrafficStrategy != nil { + _ = d.Set("traffic_strategy", respData.AddressPool.TrafficStrategy) + } + + if respData.AddressPool.MonitorId != nil { + _ = d.Set("monitor_id", respData.AddressPool.MonitorId) + } + + if respData.AddressPool.PoolId != nil { + _ = d.Set("pool_id", respData.AddressPool.PoolId) + } + } + + if respData.AddressSet != nil && len(respData.AddressSet) > 0 { + addressSetList := make([]map[string]interface{}, 0, len(respData.AddressSet)) + for _, addressSet := range respData.AddressSet { + addressSetMap := map[string]interface{}{} + if addressSet.Addr != nil { + addressSetMap["addr"] = addressSet.Addr + } + + if addressSet.IsEnable != nil { + addressSetMap["is_enable"] = addressSet.IsEnable + } + + if addressSet.AddressId != nil { + addressSetMap["address_id"] = addressSet.AddressId + } + + if addressSet.Location != nil { + addressSetMap["location"] = addressSet.Location + } + + if addressSet.Status != nil { + addressSetMap["status"] = addressSet.Status + } + + if addressSet.Weight != nil { + addressSetMap["weight"] = addressSet.Weight + } + + if addressSet.CreatedOn != nil { + addressSetMap["created_on"] = addressSet.CreatedOn + } + + if addressSet.UpdatedOn != nil { + addressSetMap["updated_on"] = addressSet.UpdatedOn + } + + addressSetList = append(addressSetList, addressSetMap) + } + + _ = d.Set("address_set", addressSetList) + } + + return nil +} + +func resourceTencentCloudIgtmAddressPoolUpdate(d *schema.ResourceData, meta interface{}) error { + defer tccommon.LogElapsed("resource.tencentcloud_igtm_address_pool.update")() + defer tccommon.InconsistentCheck(d, meta)() + + var ( + logId = tccommon.GetLogId(tccommon.ContextNil) + ctx = tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta) + poolId = d.Id() + ) + + needChange := false + mutableArgs := []string{"pool_name", "traffic_strategy", "monitor_id", "address_set"} + for _, v := range mutableArgs { + if d.HasChange(v) { + needChange = true + break + } + } + + if needChange { + request := igtmv20231024.NewModifyAddressPoolRequest() + if v, ok := d.GetOk("pool_name"); ok { + request.PoolName = helper.String(v.(string)) + } + + if v, ok := d.GetOk("traffic_strategy"); ok { + request.TrafficStrategy = helper.String(v.(string)) + } + + if v, ok := d.GetOkExists("monitor_id"); ok { + request.MonitorId = helper.IntUint64(v.(int)) + } + + if v, ok := d.GetOk("address_set"); ok { + for _, item := range v.(*schema.Set).List() { + addressSetMap := item.(map[string]interface{}) + address := igtmv20231024.Address{} + if v, ok := addressSetMap["addr"].(string); ok && v != "" { + address.Addr = helper.String(v) + } + + if v, ok := addressSetMap["is_enable"].(string); ok && v != "" { + address.IsEnable = helper.String(v) + } + + if v, ok := addressSetMap["address_id"].(int); ok && v != 0 { + address.AddressId = helper.IntUint64(v) + } + + if v, ok := addressSetMap["location"].(string); ok && v != "" { + address.Location = helper.String(v) + } + + if v, ok := addressSetMap["status"].(string); ok && v != "" { + address.Status = helper.String(v) + } + + if v, ok := addressSetMap["weight"].(int); ok { + address.Weight = helper.IntUint64(v) + } + + request.AddressSet = append(request.AddressSet, &address) + } + } + + request.PoolId = helper.StrToUint64Point(poolId) + reqErr := resource.Retry(tccommon.WriteRetryTimeout, func() *resource.RetryError { + result, e := meta.(tccommon.ProviderMeta).GetAPIV3Conn().UseIgtmV20231024Client().ModifyAddressPoolWithContext(ctx, request) + if e != nil { + return tccommon.RetryError(e) + } else { + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), result.ToJsonString()) + } + + return nil + }) + + if reqErr != nil { + log.Printf("[CRITAL]%s update igtm address pool failed, reason:%+v", logId, reqErr) + return reqErr + } + } + + return resourceTencentCloudIgtmAddressPoolRead(d, meta) +} + +func resourceTencentCloudIgtmAddressPoolDelete(d *schema.ResourceData, meta interface{}) error { + defer tccommon.LogElapsed("resource.tencentcloud_igtm_address_pool.delete")() + defer tccommon.InconsistentCheck(d, meta)() + + var ( + logId = tccommon.GetLogId(tccommon.ContextNil) + ctx = tccommon.NewResourceLifeCycleHandleFuncContext(context.Background(), logId, d, meta) + request = igtmv20231024.NewDeleteAddressPoolRequest() + poolId = d.Id() + ) + + request.PoolId = helper.StrToUint64Point(poolId) + reqErr := resource.Retry(tccommon.WriteRetryTimeout, func() *resource.RetryError { + result, e := meta.(tccommon.ProviderMeta).GetAPIV3Conn().UseIgtmV20231024Client().DeleteAddressPoolWithContext(ctx, request) + if e != nil { + return tccommon.RetryError(e) + } else { + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), result.ToJsonString()) + } + + if result == nil || result.Response == nil || result.Response.Msg == nil { + return resource.NonRetryableError(fmt.Errorf("Delete igtm address pool failed, Response is nil.")) + } + + if *result.Response.Msg == "success" { + return nil + } else { + return resource.NonRetryableError(fmt.Errorf("Delete igtm address pool failed, Msg is %s.", *result.Response.Msg)) + } + }) + + if reqErr != nil { + log.Printf("[CRITAL]%s delete igtm address pool failed, reason:%+v", logId, reqErr) + return reqErr + } + + return nil +} diff --git a/tencentcloud/services/igtm/resource_tc_igtm_address_pool.md b/tencentcloud/services/igtm/resource_tc_igtm_address_pool.md new file mode 100644 index 0000000000..24b22419c0 --- /dev/null +++ b/tencentcloud/services/igtm/resource_tc_igtm_address_pool.md @@ -0,0 +1,29 @@ +Provides a resource to create a IGTM address pool + +Example Usage + +```hcl +resource "tencentcloud_igtm_address_pool" "example" { + pool_name = "tf-example" + traffic_strategy = "WEIGHT" + address_set { + addr = "1.1.1.1" + is_enable = "ENABLED" + weight = 90 + } + + address_set { + addr = "2.2.2.2" + is_enable = "DISABLED" + weight = 50 + } +} +``` + +Import + +IGTM address pool can be imported using the id, e.g. + +``` +terraform import tencentcloud_igtm_address_pool.example 1012132 +``` diff --git a/tencentcloud/services/igtm/resource_tc_igtm_address_pool_test.go b/tencentcloud/services/igtm/resource_tc_igtm_address_pool_test.go new file mode 100644 index 0000000000..e3f9c8a5f6 --- /dev/null +++ b/tencentcloud/services/igtm/resource_tc_igtm_address_pool_test.go @@ -0,0 +1,35 @@ +package igtm_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + + tcacctest "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/acctest" +) + +func TestAccTencentCloudIgtmAddressPoolResource_basic(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + tcacctest.AccPreCheck(t) + }, + Providers: tcacctest.AccProviders, + Steps: []resource.TestStep{{ + Config: testAccIgtmAddressPool, + Check: resource.ComposeTestCheckFunc(resource.TestCheckResourceAttrSet("tencentcloud_igtm_address_pool.igtm_address_pool", "id")), + }, { + ResourceName: "tencentcloud_igtm_address_pool.igtm_address_pool", + ImportState: true, + ImportStateVerify: true, + }}, + }) +} + +const testAccIgtmAddressPool = ` + +resource "tencentcloud_igtm_address_pool" "igtm_address_pool" { + address_set = { + } +} +` diff --git a/tencentcloud/services/igtm/resource_test.go b/tencentcloud/services/igtm/resource_test.go new file mode 100644 index 0000000000..8ad54d7693 --- /dev/null +++ b/tencentcloud/services/igtm/resource_test.go @@ -0,0 +1,11 @@ +package igtm_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" +) + +func TestMain(m *testing.M) { + resource.TestMain(m) +} diff --git a/tencentcloud/services/igtm/service_tencentcloud_igtm.go b/tencentcloud/services/igtm/service_tencentcloud_igtm.go new file mode 100644 index 0000000000..aa8abddb9b --- /dev/null +++ b/tencentcloud/services/igtm/service_tencentcloud_igtm.go @@ -0,0 +1,119 @@ +package igtm + +import ( + "context" + "fmt" + "log" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + igtmv20231024 "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/igtm/v20231024" + + tccommon "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/common" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/connectivity" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/ratelimit" +) + +func NewIgtmService(client *connectivity.TencentCloudClient) IgtmService { + return IgtmService{client: client} +} + +type IgtmService struct { + client *connectivity.TencentCloudClient +} + +func (me *IgtmService) DescribeIgtmAddressPoolById(ctx context.Context, poolId string) (ret *igtmv20231024.DescribeAddressPoolDetailResponseParams, errRet error) { + logId := tccommon.GetLogId(ctx) + + request := igtmv20231024.NewDescribeAddressPoolDetailRequest() + response := igtmv20231024.NewDescribeAddressPoolDetailResponse() + request.PoolId = helper.StrToInt64Point(poolId) + + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", logId, request.GetAction(), request.ToJsonString(), errRet.Error()) + } + }() + + err := resource.Retry(tccommon.ReadRetryTimeout, func() *resource.RetryError { + ratelimit.Check(request.GetAction()) + result, e := me.client.UseIgtmV20231024Client().DescribeAddressPoolDetail(request) + if e != nil { + return tccommon.RetryError(e) + } + + if result == nil || result.Response == nil { + return resource.NonRetryableError(fmt.Errorf("Describe address pool detail failed, Response is nil.")) + } + + response = result + return nil + }) + + if err != nil { + errRet = err + return + } + + ret = response.Response + return +} + +func (me *IgtmService) DescribeIgtmAddressPoolListByFilter(ctx context.Context, param map[string]interface{}) (ret []*igtmv20231024.AddressPool, errRet error) { + var ( + logId = tccommon.GetLogId(ctx) + request = igtmv20231024.NewDescribeAddressPoolListRequest() + response = igtmv20231024.NewDescribeAddressPoolListResponse() + ) + + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", logId, request.GetAction(), request.ToJsonString(), errRet.Error()) + } + }() + + for k, v := range param { + if k == "Filters" { + request.Filters = v.([]*igtmv20231024.ResourceFilter) + } + } + + var ( + offset uint64 = 0 + limit uint64 = 100 + ) + for { + request.Offset = &offset + request.Limit = &limit + err := resource.Retry(tccommon.ReadRetryTimeout, func() *resource.RetryError { + ratelimit.Check(request.GetAction()) + result, e := me.client.UseIgtmV20231024Client().DescribeAddressPoolList(request) + if e != nil { + return tccommon.RetryError(e) + } else { + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), result.ToJsonString()) + } + + if result == nil || result.Response == nil || result.Response.AddressPoolSet == nil { + return resource.NonRetryableError(fmt.Errorf("Describe address pool list failed, Response is nil.")) + } + + response = result + return nil + }) + + if err != nil { + errRet = err + return + } + + ret = append(ret, response.Response.AddressPoolSet...) + if len(response.Response.AddressPoolSet) < int(limit) { + break + } + + offset += limit + } + + return +} diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/igtm/LICENSE b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/igtm/LICENSE new file mode 100644 index 0000000000..efc75a2253 --- /dev/null +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/igtm/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright (c) 2017-2018 Tencent Ltd. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/igtm/v20231024/client.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/igtm/v20231024/client.go new file mode 100644 index 0000000000..4c56fc4549 --- /dev/null +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/igtm/v20231024/client.go @@ -0,0 +1,2044 @@ +// Copyright (c) 2017-2025 Tencent. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v20231024 + +import ( + "context" + "errors" + "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" + tchttp "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" + "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile" +) + +const APIVersion = "2023-10-24" + +type Client struct { + common.Client +} + +// Deprecated +func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error) { + cpf := profile.NewClientProfile() + client = &Client{} + client.Init(region).WithSecretId(secretId, secretKey).WithProfile(cpf) + return +} + +func NewClient(credential common.CredentialIface, region string, clientProfile *profile.ClientProfile) (client *Client, err error) { + client = &Client{} + client.Init(region). + WithCredential(credential). + WithProfile(clientProfile) + return +} + + +func NewCreateAddressPoolRequest() (request *CreateAddressPoolRequest) { + request = &CreateAddressPoolRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("igtm", APIVersion, "CreateAddressPool") + + + return +} + +func NewCreateAddressPoolResponse() (response *CreateAddressPoolResponse) { + response = &CreateAddressPoolResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// CreateAddressPool +// 创建地址池 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_ADDREXCEEDEDLIMIT = "FailedOperation.AddrExceededLimit" +// FAILEDOPERATION_CREATEERROR = "FailedOperation.CreateError" +// FAILEDOPERATION_CREATEPOOLFAILED = "FailedOperation.CreatePoolFailed" +// FAILEDOPERATION_EXCEEDEDLIMIT = "FailedOperation.ExceededLimit" +// FAILEDOPERATION_MODIFYERROR = "FailedOperation.ModifyError" +// FAILEDOPERATION_POOLEXCEEDEDLIMIT = "FailedOperation.PoolExceededLimit" +// FAILEDOPERATION_TASKEXCEEDEDLIMIT = "FailedOperation.TaskExceededLimit" +// INTERNALERROR = "InternalError" +// INTERNALERROR_DBERR = "InternalError.DbErr" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_POOLADDRDUPLICATED = "InvalidParameterValue.PoolAddrDuplicated" +// INVALIDPARAMETERVALUE_POOLADDREMPTY = "InvalidParameterValue.PoolAddrEmpty" +// INVALIDPARAMETERVALUE_POOLADDRINVALID = "InvalidParameterValue.PoolAddrInvalid" +// INVALIDPARAMETERVALUE_POOLADDRMIXED = "InvalidParameterValue.PoolAddrMixed" +// INVALIDPARAMETERVALUE_POOLADDRWEIGHTEMPTY = "InvalidParameterValue.PoolAddrWeightEmpty" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_POOLNAMEDUPLICATE = "UnsupportedOperation.PoolNameDuplicate" +// UNSUPPORTEDOPERATION_RESOURCENAMEDUPLICATED = "UnsupportedOperation.ResourceNameDuplicated" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) CreateAddressPool(request *CreateAddressPoolRequest) (response *CreateAddressPoolResponse, err error) { + return c.CreateAddressPoolWithContext(context.Background(), request) +} + +// CreateAddressPool +// 创建地址池 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_ADDREXCEEDEDLIMIT = "FailedOperation.AddrExceededLimit" +// FAILEDOPERATION_CREATEERROR = "FailedOperation.CreateError" +// FAILEDOPERATION_CREATEPOOLFAILED = "FailedOperation.CreatePoolFailed" +// FAILEDOPERATION_EXCEEDEDLIMIT = "FailedOperation.ExceededLimit" +// FAILEDOPERATION_MODIFYERROR = "FailedOperation.ModifyError" +// FAILEDOPERATION_POOLEXCEEDEDLIMIT = "FailedOperation.PoolExceededLimit" +// FAILEDOPERATION_TASKEXCEEDEDLIMIT = "FailedOperation.TaskExceededLimit" +// INTERNALERROR = "InternalError" +// INTERNALERROR_DBERR = "InternalError.DbErr" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_POOLADDRDUPLICATED = "InvalidParameterValue.PoolAddrDuplicated" +// INVALIDPARAMETERVALUE_POOLADDREMPTY = "InvalidParameterValue.PoolAddrEmpty" +// INVALIDPARAMETERVALUE_POOLADDRINVALID = "InvalidParameterValue.PoolAddrInvalid" +// INVALIDPARAMETERVALUE_POOLADDRMIXED = "InvalidParameterValue.PoolAddrMixed" +// INVALIDPARAMETERVALUE_POOLADDRWEIGHTEMPTY = "InvalidParameterValue.PoolAddrWeightEmpty" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_POOLNAMEDUPLICATE = "UnsupportedOperation.PoolNameDuplicate" +// UNSUPPORTEDOPERATION_RESOURCENAMEDUPLICATED = "UnsupportedOperation.ResourceNameDuplicated" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) CreateAddressPoolWithContext(ctx context.Context, request *CreateAddressPoolRequest) (response *CreateAddressPoolResponse, err error) { + if request == nil { + request = NewCreateAddressPoolRequest() + } + c.InitBaseRequest(&request.BaseRequest, "igtm", APIVersion, "CreateAddressPool") + + if c.GetCredential() == nil { + return nil, errors.New("CreateAddressPool require credential") + } + + request.SetContext(ctx) + + response = NewCreateAddressPoolResponse() + err = c.Send(request, response) + return +} + +func NewCreateInstanceRequest() (request *CreateInstanceRequest) { + request = &CreateInstanceRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("igtm", APIVersion, "CreateInstance") + + + return +} + +func NewCreateInstanceResponse() (response *CreateInstanceResponse) { + response = &CreateInstanceResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// CreateInstance +// 创建实例接口,仅供免费实例使用 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_CREATEERROR = "FailedOperation.CreateError" +// FAILEDOPERATION_CREATEINSTANCEFAILED = "FailedOperation.CreateInstanceFailed" +// FAILEDOPERATION_QUERYERR = "FailedOperation.QueryErr" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ACCESSTYPEINVALID = "InvalidParameter.AccessTypeInvalid" +// INVALIDPARAMETER_GLOBALACCESSDOMAINCONFLICT = "InvalidParameter.GlobalAccessDomainConflict" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_ACCESSDOMAINUNAUTHORIZED = "UnsupportedOperation.AccessDomainUnauthorized" +// UNSUPPORTEDOPERATION_DOMAINTTLINVALID = "UnsupportedOperation.DomainTtlInvalid" +// UNSUPPORTEDOPERATION_INSTANCENAMEDUPLICATE = "UnsupportedOperation.InstanceNameDuplicate" +// UNSUPPORTEDOPERATION_PACKAGEUNAUTHORIZED = "UnsupportedOperation.PackageUnauthorized" +// UNSUPPORTEDOPERATION_TTLINVALID = "UnsupportedOperation.TTLInvalid" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) CreateInstance(request *CreateInstanceRequest) (response *CreateInstanceResponse, err error) { + return c.CreateInstanceWithContext(context.Background(), request) +} + +// CreateInstance +// 创建实例接口,仅供免费实例使用 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_CREATEERROR = "FailedOperation.CreateError" +// FAILEDOPERATION_CREATEINSTANCEFAILED = "FailedOperation.CreateInstanceFailed" +// FAILEDOPERATION_QUERYERR = "FailedOperation.QueryErr" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ACCESSTYPEINVALID = "InvalidParameter.AccessTypeInvalid" +// INVALIDPARAMETER_GLOBALACCESSDOMAINCONFLICT = "InvalidParameter.GlobalAccessDomainConflict" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_ACCESSDOMAINUNAUTHORIZED = "UnsupportedOperation.AccessDomainUnauthorized" +// UNSUPPORTEDOPERATION_DOMAINTTLINVALID = "UnsupportedOperation.DomainTtlInvalid" +// UNSUPPORTEDOPERATION_INSTANCENAMEDUPLICATE = "UnsupportedOperation.InstanceNameDuplicate" +// UNSUPPORTEDOPERATION_PACKAGEUNAUTHORIZED = "UnsupportedOperation.PackageUnauthorized" +// UNSUPPORTEDOPERATION_TTLINVALID = "UnsupportedOperation.TTLInvalid" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) CreateInstanceWithContext(ctx context.Context, request *CreateInstanceRequest) (response *CreateInstanceResponse, err error) { + if request == nil { + request = NewCreateInstanceRequest() + } + c.InitBaseRequest(&request.BaseRequest, "igtm", APIVersion, "CreateInstance") + + if c.GetCredential() == nil { + return nil, errors.New("CreateInstance require credential") + } + + request.SetContext(ctx) + + response = NewCreateInstanceResponse() + err = c.Send(request, response) + return +} + +func NewCreateMonitorRequest() (request *CreateMonitorRequest) { + request = &CreateMonitorRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("igtm", APIVersion, "CreateMonitor") + + + return +} + +func NewCreateMonitorResponse() (response *CreateMonitorResponse) { + response = &CreateMonitorResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// CreateMonitor +// 新增监控器 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_CREATEERROR = "FailedOperation.CreateError" +// FAILEDOPERATION_CREATEMONITORFAILED = "FailedOperation.CreateMonitorFailed" +// FAILEDOPERATION_EXCEEDEDLIMIT = "FailedOperation.ExceededLimit" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) CreateMonitor(request *CreateMonitorRequest) (response *CreateMonitorResponse, err error) { + return c.CreateMonitorWithContext(context.Background(), request) +} + +// CreateMonitor +// 新增监控器 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_CREATEERROR = "FailedOperation.CreateError" +// FAILEDOPERATION_CREATEMONITORFAILED = "FailedOperation.CreateMonitorFailed" +// FAILEDOPERATION_EXCEEDEDLIMIT = "FailedOperation.ExceededLimit" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) CreateMonitorWithContext(ctx context.Context, request *CreateMonitorRequest) (response *CreateMonitorResponse, err error) { + if request == nil { + request = NewCreateMonitorRequest() + } + c.InitBaseRequest(&request.BaseRequest, "igtm", APIVersion, "CreateMonitor") + + if c.GetCredential() == nil { + return nil, errors.New("CreateMonitor require credential") + } + + request.SetContext(ctx) + + response = NewCreateMonitorResponse() + err = c.Send(request, response) + return +} + +func NewCreateStrategyRequest() (request *CreateStrategyRequest) { + request = &CreateStrategyRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("igtm", APIVersion, "CreateStrategy") + + + return +} + +func NewCreateStrategyResponse() (response *CreateStrategyResponse) { + response = &CreateStrategyResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// CreateStrategy +// 新建策略接口 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_CREATEERROR = "FailedOperation.CreateError" +// FAILEDOPERATION_CREATESTRATEGYFAILED = "FailedOperation.CreateStrategyFailed" +// FAILEDOPERATION_EXCEEDEDLIMIT = "FailedOperation.ExceededLimit" +// FAILEDOPERATION_MODIFYERROR = "FailedOperation.ModifyError" +// INTERNALERROR = "InternalError" +// INTERNALERROR_DBERR = "InternalError.DbErr" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_INSTANCEDISABLED = "InvalidParameter.InstanceDisabled" +// INVALIDPARAMETER_TRAFFICSTRATEGYINVALID = "InvalidParameter.TrafficStrategyInvalid" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_TRAFFICSTRATEGYINVALID = "InvalidParameterValue.TrafficStrategyInvalid" +// INVALIDPARAMETERVALUE_TRAFFICSTRATEGYWEIGHTEMPTY = "InvalidParameterValue.TrafficStrategyWeightEmpty" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINSUFFICIENT_NOINSTANCE = "ResourceInsufficient.NoInstance" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_INSTANCEUNAUTHORIZED = "UnauthorizedOperation.InstanceUnauthorized" +// UNAUTHORIZEDOPERATION_MAINBINDPOOLUNAUTHORIZED = "UnauthorizedOperation.MainBindPoolUnauthorized" +// UNAUTHORIZEDOPERATION_MAINPOOLUNAUTHORIZED = "UnauthorizedOperation.MainPoolUnauthorized" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION_FALLBACKPOOLINVALID = "UnsupportedOperation.FallBackPoolInvalid" +// UNSUPPORTEDOPERATION_MAINBINDPOOLDUPLICATE = "UnsupportedOperation.MainBindPoolDuplicate" +// UNSUPPORTEDOPERATION_MAINBINDPOOLEMPTY = "UnsupportedOperation.MainBindPoolEmpty" +// UNSUPPORTEDOPERATION_MAINBINDPOOLLEVELEXCEED = "UnsupportedOperation.MainBindPoolLevelExceed" +// UNSUPPORTEDOPERATION_MAINBINDPOOLMIXED = "UnsupportedOperation.MainBindPoolMixed" +// UNSUPPORTEDOPERATION_MAINBINDPOOLNUMINVALID = "UnsupportedOperation.MainBindPoolNumInvalid" +// UNSUPPORTEDOPERATION_MAINPOOLDUPLICATE = "UnsupportedOperation.MainPoolDuplicate" +// UNSUPPORTEDOPERATION_MAINPOOLEMPTY = "UnsupportedOperation.MainPoolEmpty" +// UNSUPPORTEDOPERATION_MAINPOOLSURVIVENUMINVALID = "UnsupportedOperation.MainPoolSurviveNumInvalid" +// UNSUPPORTEDOPERATION_RESOURCENAMEDUPLICATED = "UnsupportedOperation.ResourceNameDuplicated" +// UNSUPPORTEDOPERATION_RESOURCEPOOLSOURCENOTEXIST = "UnsupportedOperation.ResourcePoolSourceNotExist" +// UNSUPPORTEDOPERATION_RESOURCESOURCEDUPLICATED = "UnsupportedOperation.ResourceSourceDuplicated" +// UNSUPPORTEDOPERATION_STRATEGYNAMEDUPLICATE = "UnsupportedOperation.StrategyNameDuplicate" +// UNSUPPORTEDOPERATION_STRATEGYSOURCEDUPLICATE = "UnsupportedOperation.StrategySourceDuplicate" +// UNSUPPORTEDOPERATION_STRATEGYSOURCEINUSED = "UnsupportedOperation.StrategySourceInUsed" +// UNSUPPORTEDOPERATION_STRATEGYSOURCEUNAUTHORIZED = "UnsupportedOperation.StrategySourceUnauthorized" +// UNSUPPORTEDOPERATION_STRATEGYSWITCHTYPEINVALID = "UnsupportedOperation.StrategySwitchTypeInvalid" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) CreateStrategy(request *CreateStrategyRequest) (response *CreateStrategyResponse, err error) { + return c.CreateStrategyWithContext(context.Background(), request) +} + +// CreateStrategy +// 新建策略接口 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_CREATEERROR = "FailedOperation.CreateError" +// FAILEDOPERATION_CREATESTRATEGYFAILED = "FailedOperation.CreateStrategyFailed" +// FAILEDOPERATION_EXCEEDEDLIMIT = "FailedOperation.ExceededLimit" +// FAILEDOPERATION_MODIFYERROR = "FailedOperation.ModifyError" +// INTERNALERROR = "InternalError" +// INTERNALERROR_DBERR = "InternalError.DbErr" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_INSTANCEDISABLED = "InvalidParameter.InstanceDisabled" +// INVALIDPARAMETER_TRAFFICSTRATEGYINVALID = "InvalidParameter.TrafficStrategyInvalid" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_TRAFFICSTRATEGYINVALID = "InvalidParameterValue.TrafficStrategyInvalid" +// INVALIDPARAMETERVALUE_TRAFFICSTRATEGYWEIGHTEMPTY = "InvalidParameterValue.TrafficStrategyWeightEmpty" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINSUFFICIENT_NOINSTANCE = "ResourceInsufficient.NoInstance" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_INSTANCEUNAUTHORIZED = "UnauthorizedOperation.InstanceUnauthorized" +// UNAUTHORIZEDOPERATION_MAINBINDPOOLUNAUTHORIZED = "UnauthorizedOperation.MainBindPoolUnauthorized" +// UNAUTHORIZEDOPERATION_MAINPOOLUNAUTHORIZED = "UnauthorizedOperation.MainPoolUnauthorized" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION_FALLBACKPOOLINVALID = "UnsupportedOperation.FallBackPoolInvalid" +// UNSUPPORTEDOPERATION_MAINBINDPOOLDUPLICATE = "UnsupportedOperation.MainBindPoolDuplicate" +// UNSUPPORTEDOPERATION_MAINBINDPOOLEMPTY = "UnsupportedOperation.MainBindPoolEmpty" +// UNSUPPORTEDOPERATION_MAINBINDPOOLLEVELEXCEED = "UnsupportedOperation.MainBindPoolLevelExceed" +// UNSUPPORTEDOPERATION_MAINBINDPOOLMIXED = "UnsupportedOperation.MainBindPoolMixed" +// UNSUPPORTEDOPERATION_MAINBINDPOOLNUMINVALID = "UnsupportedOperation.MainBindPoolNumInvalid" +// UNSUPPORTEDOPERATION_MAINPOOLDUPLICATE = "UnsupportedOperation.MainPoolDuplicate" +// UNSUPPORTEDOPERATION_MAINPOOLEMPTY = "UnsupportedOperation.MainPoolEmpty" +// UNSUPPORTEDOPERATION_MAINPOOLSURVIVENUMINVALID = "UnsupportedOperation.MainPoolSurviveNumInvalid" +// UNSUPPORTEDOPERATION_RESOURCENAMEDUPLICATED = "UnsupportedOperation.ResourceNameDuplicated" +// UNSUPPORTEDOPERATION_RESOURCEPOOLSOURCENOTEXIST = "UnsupportedOperation.ResourcePoolSourceNotExist" +// UNSUPPORTEDOPERATION_RESOURCESOURCEDUPLICATED = "UnsupportedOperation.ResourceSourceDuplicated" +// UNSUPPORTEDOPERATION_STRATEGYNAMEDUPLICATE = "UnsupportedOperation.StrategyNameDuplicate" +// UNSUPPORTEDOPERATION_STRATEGYSOURCEDUPLICATE = "UnsupportedOperation.StrategySourceDuplicate" +// UNSUPPORTEDOPERATION_STRATEGYSOURCEINUSED = "UnsupportedOperation.StrategySourceInUsed" +// UNSUPPORTEDOPERATION_STRATEGYSOURCEUNAUTHORIZED = "UnsupportedOperation.StrategySourceUnauthorized" +// UNSUPPORTEDOPERATION_STRATEGYSWITCHTYPEINVALID = "UnsupportedOperation.StrategySwitchTypeInvalid" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) CreateStrategyWithContext(ctx context.Context, request *CreateStrategyRequest) (response *CreateStrategyResponse, err error) { + if request == nil { + request = NewCreateStrategyRequest() + } + c.InitBaseRequest(&request.BaseRequest, "igtm", APIVersion, "CreateStrategy") + + if c.GetCredential() == nil { + return nil, errors.New("CreateStrategy require credential") + } + + request.SetContext(ctx) + + response = NewCreateStrategyResponse() + err = c.Send(request, response) + return +} + +func NewDeleteAddressPoolRequest() (request *DeleteAddressPoolRequest) { + request = &DeleteAddressPoolRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("igtm", APIVersion, "DeleteAddressPool") + + + return +} + +func NewDeleteAddressPoolResponse() (response *DeleteAddressPoolResponse) { + response = &DeleteAddressPoolResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DeleteAddressPool +// 删除地址池 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_DELETEERROR = "FailedOperation.DeleteError" +// FAILEDOPERATION_DELETEPOOLFAILED = "FailedOperation.DeletePoolFailed" +// FAILEDOPERATION_EXCEEDEDLIMIT = "FailedOperation.ExceededLimit" +// FAILEDOPERATION_POOLWASUSINGERROR = "FailedOperation.PoolWasUsingError" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_POOLUNAUTHORIZED = "UnauthorizedOperation.PoolUnauthorized" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DeleteAddressPool(request *DeleteAddressPoolRequest) (response *DeleteAddressPoolResponse, err error) { + return c.DeleteAddressPoolWithContext(context.Background(), request) +} + +// DeleteAddressPool +// 删除地址池 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_DELETEERROR = "FailedOperation.DeleteError" +// FAILEDOPERATION_DELETEPOOLFAILED = "FailedOperation.DeletePoolFailed" +// FAILEDOPERATION_EXCEEDEDLIMIT = "FailedOperation.ExceededLimit" +// FAILEDOPERATION_POOLWASUSINGERROR = "FailedOperation.PoolWasUsingError" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_POOLUNAUTHORIZED = "UnauthorizedOperation.PoolUnauthorized" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DeleteAddressPoolWithContext(ctx context.Context, request *DeleteAddressPoolRequest) (response *DeleteAddressPoolResponse, err error) { + if request == nil { + request = NewDeleteAddressPoolRequest() + } + c.InitBaseRequest(&request.BaseRequest, "igtm", APIVersion, "DeleteAddressPool") + + if c.GetCredential() == nil { + return nil, errors.New("DeleteAddressPool require credential") + } + + request.SetContext(ctx) + + response = NewDeleteAddressPoolResponse() + err = c.Send(request, response) + return +} + +func NewDeleteMonitorRequest() (request *DeleteMonitorRequest) { + request = &DeleteMonitorRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("igtm", APIVersion, "DeleteMonitor") + + + return +} + +func NewDeleteMonitorResponse() (response *DeleteMonitorResponse) { + response = &DeleteMonitorResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DeleteMonitor +// 删除监控器 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_DELETEERROR = "FailedOperation.DeleteError" +// FAILEDOPERATION_DELETEMONITORFAILED = "FailedOperation.DeleteMonitorFailed" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DeleteMonitor(request *DeleteMonitorRequest) (response *DeleteMonitorResponse, err error) { + return c.DeleteMonitorWithContext(context.Background(), request) +} + +// DeleteMonitor +// 删除监控器 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_DELETEERROR = "FailedOperation.DeleteError" +// FAILEDOPERATION_DELETEMONITORFAILED = "FailedOperation.DeleteMonitorFailed" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DeleteMonitorWithContext(ctx context.Context, request *DeleteMonitorRequest) (response *DeleteMonitorResponse, err error) { + if request == nil { + request = NewDeleteMonitorRequest() + } + c.InitBaseRequest(&request.BaseRequest, "igtm", APIVersion, "DeleteMonitor") + + if c.GetCredential() == nil { + return nil, errors.New("DeleteMonitor require credential") + } + + request.SetContext(ctx) + + response = NewDeleteMonitorResponse() + err = c.Send(request, response) + return +} + +func NewDeleteStrategyRequest() (request *DeleteStrategyRequest) { + request = &DeleteStrategyRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("igtm", APIVersion, "DeleteStrategy") + + + return +} + +func NewDeleteStrategyResponse() (response *DeleteStrategyResponse) { + response = &DeleteStrategyResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DeleteStrategy +// 删除策略接口 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_CREATEERROR = "FailedOperation.CreateError" +// FAILEDOPERATION_DELETEERROR = "FailedOperation.DeleteError" +// FAILEDOPERATION_DELETESTRATEGYFAILED = "FailedOperation.DeleteStrategyFailed" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_INSTANCEDISABLED = "InvalidParameter.InstanceDisabled" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINSUFFICIENT_NOINSTANCE = "ResourceInsufficient.NoInstance" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_INSTANCEUNAUTHORIZED = "UnauthorizedOperation.InstanceUnauthorized" +// UNAUTHORIZEDOPERATION_STRATEGYUNAUTHORIZED = "UnauthorizedOperation.StrategyUnauthorized" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DeleteStrategy(request *DeleteStrategyRequest) (response *DeleteStrategyResponse, err error) { + return c.DeleteStrategyWithContext(context.Background(), request) +} + +// DeleteStrategy +// 删除策略接口 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_CREATEERROR = "FailedOperation.CreateError" +// FAILEDOPERATION_DELETEERROR = "FailedOperation.DeleteError" +// FAILEDOPERATION_DELETESTRATEGYFAILED = "FailedOperation.DeleteStrategyFailed" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_INSTANCEDISABLED = "InvalidParameter.InstanceDisabled" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINSUFFICIENT_NOINSTANCE = "ResourceInsufficient.NoInstance" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_INSTANCEUNAUTHORIZED = "UnauthorizedOperation.InstanceUnauthorized" +// UNAUTHORIZEDOPERATION_STRATEGYUNAUTHORIZED = "UnauthorizedOperation.StrategyUnauthorized" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DeleteStrategyWithContext(ctx context.Context, request *DeleteStrategyRequest) (response *DeleteStrategyResponse, err error) { + if request == nil { + request = NewDeleteStrategyRequest() + } + c.InitBaseRequest(&request.BaseRequest, "igtm", APIVersion, "DeleteStrategy") + + if c.GetCredential() == nil { + return nil, errors.New("DeleteStrategy require credential") + } + + request.SetContext(ctx) + + response = NewDeleteStrategyResponse() + err = c.Send(request, response) + return +} + +func NewDescribeAddressLocationRequest() (request *DescribeAddressLocationRequest) { + request = &DescribeAddressLocationRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("igtm", APIVersion, "DescribeAddressLocation") + + + return +} + +func NewDescribeAddressLocationResponse() (response *DescribeAddressLocationResponse) { + response = &DescribeAddressLocationResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeAddressLocation +// 获取地址所属地域 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// MISSINGPARAMETER = "MissingParameter" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DescribeAddressLocation(request *DescribeAddressLocationRequest) (response *DescribeAddressLocationResponse, err error) { + return c.DescribeAddressLocationWithContext(context.Background(), request) +} + +// DescribeAddressLocation +// 获取地址所属地域 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// MISSINGPARAMETER = "MissingParameter" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DescribeAddressLocationWithContext(ctx context.Context, request *DescribeAddressLocationRequest) (response *DescribeAddressLocationResponse, err error) { + if request == nil { + request = NewDescribeAddressLocationRequest() + } + c.InitBaseRequest(&request.BaseRequest, "igtm", APIVersion, "DescribeAddressLocation") + + if c.GetCredential() == nil { + return nil, errors.New("DescribeAddressLocation require credential") + } + + request.SetContext(ctx) + + response = NewDescribeAddressLocationResponse() + err = c.Send(request, response) + return +} + +func NewDescribeAddressPoolDetailRequest() (request *DescribeAddressPoolDetailRequest) { + request = &DescribeAddressPoolDetailRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("igtm", APIVersion, "DescribeAddressPoolDetail") + + + return +} + +func NewDescribeAddressPoolDetailResponse() (response *DescribeAddressPoolDetailResponse) { + response = &DescribeAddressPoolDetailResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeAddressPoolDetail +// 地址池详情 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_POOLUNAUTHORIZED = "UnauthorizedOperation.PoolUnauthorized" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DescribeAddressPoolDetail(request *DescribeAddressPoolDetailRequest) (response *DescribeAddressPoolDetailResponse, err error) { + return c.DescribeAddressPoolDetailWithContext(context.Background(), request) +} + +// DescribeAddressPoolDetail +// 地址池详情 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_POOLUNAUTHORIZED = "UnauthorizedOperation.PoolUnauthorized" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DescribeAddressPoolDetailWithContext(ctx context.Context, request *DescribeAddressPoolDetailRequest) (response *DescribeAddressPoolDetailResponse, err error) { + if request == nil { + request = NewDescribeAddressPoolDetailRequest() + } + c.InitBaseRequest(&request.BaseRequest, "igtm", APIVersion, "DescribeAddressPoolDetail") + + if c.GetCredential() == nil { + return nil, errors.New("DescribeAddressPoolDetail require credential") + } + + request.SetContext(ctx) + + response = NewDescribeAddressPoolDetailResponse() + err = c.Send(request, response) + return +} + +func NewDescribeAddressPoolListRequest() (request *DescribeAddressPoolListRequest) { + request = &DescribeAddressPoolListRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("igtm", APIVersion, "DescribeAddressPoolList") + + + return +} + +func NewDescribeAddressPoolListResponse() (response *DescribeAddressPoolListResponse) { + response = &DescribeAddressPoolListResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeAddressPoolList +// 地址池列表 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_QUERYNOTALLOW = "UnsupportedOperation.QueryNotAllow" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DescribeAddressPoolList(request *DescribeAddressPoolListRequest) (response *DescribeAddressPoolListResponse, err error) { + return c.DescribeAddressPoolListWithContext(context.Background(), request) +} + +// DescribeAddressPoolList +// 地址池列表 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_QUERYNOTALLOW = "UnsupportedOperation.QueryNotAllow" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DescribeAddressPoolListWithContext(ctx context.Context, request *DescribeAddressPoolListRequest) (response *DescribeAddressPoolListResponse, err error) { + if request == nil { + request = NewDescribeAddressPoolListRequest() + } + c.InitBaseRequest(&request.BaseRequest, "igtm", APIVersion, "DescribeAddressPoolList") + + if c.GetCredential() == nil { + return nil, errors.New("DescribeAddressPoolList require credential") + } + + request.SetContext(ctx) + + response = NewDescribeAddressPoolListResponse() + err = c.Send(request, response) + return +} + +func NewDescribeDetectPackageDetailRequest() (request *DescribeDetectPackageDetailRequest) { + request = &DescribeDetectPackageDetailRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("igtm", APIVersion, "DescribeDetectPackageDetail") + + + return +} + +func NewDescribeDetectPackageDetailResponse() (response *DescribeDetectPackageDetailResponse) { + response = &DescribeDetectPackageDetailResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeDetectPackageDetail +// 探测任务包详情 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DescribeDetectPackageDetail(request *DescribeDetectPackageDetailRequest) (response *DescribeDetectPackageDetailResponse, err error) { + return c.DescribeDetectPackageDetailWithContext(context.Background(), request) +} + +// DescribeDetectPackageDetail +// 探测任务包详情 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DescribeDetectPackageDetailWithContext(ctx context.Context, request *DescribeDetectPackageDetailRequest) (response *DescribeDetectPackageDetailResponse, err error) { + if request == nil { + request = NewDescribeDetectPackageDetailRequest() + } + c.InitBaseRequest(&request.BaseRequest, "igtm", APIVersion, "DescribeDetectPackageDetail") + + if c.GetCredential() == nil { + return nil, errors.New("DescribeDetectPackageDetail require credential") + } + + request.SetContext(ctx) + + response = NewDescribeDetectPackageDetailResponse() + err = c.Send(request, response) + return +} + +func NewDescribeDetectTaskPackageListRequest() (request *DescribeDetectTaskPackageListRequest) { + request = &DescribeDetectTaskPackageListRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("igtm", APIVersion, "DescribeDetectTaskPackageList") + + + return +} + +func NewDescribeDetectTaskPackageListResponse() (response *DescribeDetectTaskPackageListResponse) { + response = &DescribeDetectTaskPackageListResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeDetectTaskPackageList +// 探测任务套餐列表 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DescribeDetectTaskPackageList(request *DescribeDetectTaskPackageListRequest) (response *DescribeDetectTaskPackageListResponse, err error) { + return c.DescribeDetectTaskPackageListWithContext(context.Background(), request) +} + +// DescribeDetectTaskPackageList +// 探测任务套餐列表 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DescribeDetectTaskPackageListWithContext(ctx context.Context, request *DescribeDetectTaskPackageListRequest) (response *DescribeDetectTaskPackageListResponse, err error) { + if request == nil { + request = NewDescribeDetectTaskPackageListRequest() + } + c.InitBaseRequest(&request.BaseRequest, "igtm", APIVersion, "DescribeDetectTaskPackageList") + + if c.GetCredential() == nil { + return nil, errors.New("DescribeDetectTaskPackageList require credential") + } + + request.SetContext(ctx) + + response = NewDescribeDetectTaskPackageListResponse() + err = c.Send(request, response) + return +} + +func NewDescribeDetectorsRequest() (request *DescribeDetectorsRequest) { + request = &DescribeDetectorsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("igtm", APIVersion, "DescribeDetectors") + + + return +} + +func NewDescribeDetectorsResponse() (response *DescribeDetectorsResponse) { + response = &DescribeDetectorsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeDetectors +// 获取探测节点列表接口 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DescribeDetectors(request *DescribeDetectorsRequest) (response *DescribeDetectorsResponse, err error) { + return c.DescribeDetectorsWithContext(context.Background(), request) +} + +// DescribeDetectors +// 获取探测节点列表接口 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DescribeDetectorsWithContext(ctx context.Context, request *DescribeDetectorsRequest) (response *DescribeDetectorsResponse, err error) { + if request == nil { + request = NewDescribeDetectorsRequest() + } + c.InitBaseRequest(&request.BaseRequest, "igtm", APIVersion, "DescribeDetectors") + + if c.GetCredential() == nil { + return nil, errors.New("DescribeDetectors require credential") + } + + request.SetContext(ctx) + + response = NewDescribeDetectorsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeDnsLineListRequest() (request *DescribeDnsLineListRequest) { + request = &DescribeDnsLineListRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("igtm", APIVersion, "DescribeDnsLineList") + + + return +} + +func NewDescribeDnsLineListResponse() (response *DescribeDnsLineListResponse) { + response = &DescribeDnsLineListResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeDnsLineList +// 查询分组线路列表接口 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DescribeDnsLineList(request *DescribeDnsLineListRequest) (response *DescribeDnsLineListResponse, err error) { + return c.DescribeDnsLineListWithContext(context.Background(), request) +} + +// DescribeDnsLineList +// 查询分组线路列表接口 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DescribeDnsLineListWithContext(ctx context.Context, request *DescribeDnsLineListRequest) (response *DescribeDnsLineListResponse, err error) { + if request == nil { + request = NewDescribeDnsLineListRequest() + } + c.InitBaseRequest(&request.BaseRequest, "igtm", APIVersion, "DescribeDnsLineList") + + if c.GetCredential() == nil { + return nil, errors.New("DescribeDnsLineList require credential") + } + + request.SetContext(ctx) + + response = NewDescribeDnsLineListResponse() + err = c.Send(request, response) + return +} + +func NewDescribeInstanceDetailRequest() (request *DescribeInstanceDetailRequest) { + request = &DescribeInstanceDetailRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("igtm", APIVersion, "DescribeInstanceDetail") + + + return +} + +func NewDescribeInstanceDetailResponse() (response *DescribeInstanceDetailResponse) { + response = &DescribeInstanceDetailResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeInstanceDetail +// 实例详情 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// REQUESTLIMITEXCEEDED_INNERREQUESTLIMITEXCEEDED = "RequestLimitExceeded.InnerRequestLimitExceeded" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DescribeInstanceDetail(request *DescribeInstanceDetailRequest) (response *DescribeInstanceDetailResponse, err error) { + return c.DescribeInstanceDetailWithContext(context.Background(), request) +} + +// DescribeInstanceDetail +// 实例详情 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// REQUESTLIMITEXCEEDED_INNERREQUESTLIMITEXCEEDED = "RequestLimitExceeded.InnerRequestLimitExceeded" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DescribeInstanceDetailWithContext(ctx context.Context, request *DescribeInstanceDetailRequest) (response *DescribeInstanceDetailResponse, err error) { + if request == nil { + request = NewDescribeInstanceDetailRequest() + } + c.InitBaseRequest(&request.BaseRequest, "igtm", APIVersion, "DescribeInstanceDetail") + + if c.GetCredential() == nil { + return nil, errors.New("DescribeInstanceDetail require credential") + } + + request.SetContext(ctx) + + response = NewDescribeInstanceDetailResponse() + err = c.Send(request, response) + return +} + +func NewDescribeInstanceListRequest() (request *DescribeInstanceListRequest) { + request = &DescribeInstanceListRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("igtm", APIVersion, "DescribeInstanceList") + + + return +} + +func NewDescribeInstanceListResponse() (response *DescribeInstanceListResponse) { + response = &DescribeInstanceListResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeInstanceList +// 实例列表 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_CREATEERROR = "FailedOperation.CreateError" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// REQUESTLIMITEXCEEDED_INNERREQUESTLIMITEXCEEDED = "RequestLimitExceeded.InnerRequestLimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DescribeInstanceList(request *DescribeInstanceListRequest) (response *DescribeInstanceListResponse, err error) { + return c.DescribeInstanceListWithContext(context.Background(), request) +} + +// DescribeInstanceList +// 实例列表 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_CREATEERROR = "FailedOperation.CreateError" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// REQUESTLIMITEXCEEDED_INNERREQUESTLIMITEXCEEDED = "RequestLimitExceeded.InnerRequestLimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DescribeInstanceListWithContext(ctx context.Context, request *DescribeInstanceListRequest) (response *DescribeInstanceListResponse, err error) { + if request == nil { + request = NewDescribeInstanceListRequest() + } + c.InitBaseRequest(&request.BaseRequest, "igtm", APIVersion, "DescribeInstanceList") + + if c.GetCredential() == nil { + return nil, errors.New("DescribeInstanceList require credential") + } + + request.SetContext(ctx) + + response = NewDescribeInstanceListResponse() + err = c.Send(request, response) + return +} + +func NewDescribeInstancePackageListRequest() (request *DescribeInstancePackageListRequest) { + request = &DescribeInstancePackageListRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("igtm", APIVersion, "DescribeInstancePackageList") + + + return +} + +func NewDescribeInstancePackageListResponse() (response *DescribeInstancePackageListResponse) { + response = &DescribeInstancePackageListResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeInstancePackageList +// 实例套餐列表 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DescribeInstancePackageList(request *DescribeInstancePackageListRequest) (response *DescribeInstancePackageListResponse, err error) { + return c.DescribeInstancePackageListWithContext(context.Background(), request) +} + +// DescribeInstancePackageList +// 实例套餐列表 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DescribeInstancePackageListWithContext(ctx context.Context, request *DescribeInstancePackageListRequest) (response *DescribeInstancePackageListResponse, err error) { + if request == nil { + request = NewDescribeInstancePackageListRequest() + } + c.InitBaseRequest(&request.BaseRequest, "igtm", APIVersion, "DescribeInstancePackageList") + + if c.GetCredential() == nil { + return nil, errors.New("DescribeInstancePackageList require credential") + } + + request.SetContext(ctx) + + response = NewDescribeInstancePackageListResponse() + err = c.Send(request, response) + return +} + +func NewDescribeMonitorDetailRequest() (request *DescribeMonitorDetailRequest) { + request = &DescribeMonitorDetailRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("igtm", APIVersion, "DescribeMonitorDetail") + + + return +} + +func NewDescribeMonitorDetailResponse() (response *DescribeMonitorDetailResponse) { + response = &DescribeMonitorDetailResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeMonitorDetail +// 查询监控器详情接口 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DescribeMonitorDetail(request *DescribeMonitorDetailRequest) (response *DescribeMonitorDetailResponse, err error) { + return c.DescribeMonitorDetailWithContext(context.Background(), request) +} + +// DescribeMonitorDetail +// 查询监控器详情接口 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DescribeMonitorDetailWithContext(ctx context.Context, request *DescribeMonitorDetailRequest) (response *DescribeMonitorDetailResponse, err error) { + if request == nil { + request = NewDescribeMonitorDetailRequest() + } + c.InitBaseRequest(&request.BaseRequest, "igtm", APIVersion, "DescribeMonitorDetail") + + if c.GetCredential() == nil { + return nil, errors.New("DescribeMonitorDetail require credential") + } + + request.SetContext(ctx) + + response = NewDescribeMonitorDetailResponse() + err = c.Send(request, response) + return +} + +func NewDescribeMonitorsRequest() (request *DescribeMonitorsRequest) { + request = &DescribeMonitorsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("igtm", APIVersion, "DescribeMonitors") + + + return +} + +func NewDescribeMonitorsResponse() (response *DescribeMonitorsResponse) { + response = &DescribeMonitorsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeMonitors +// 获取所有监控器 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_QUERYNOTALLOW = "UnsupportedOperation.QueryNotAllow" +func (c *Client) DescribeMonitors(request *DescribeMonitorsRequest) (response *DescribeMonitorsResponse, err error) { + return c.DescribeMonitorsWithContext(context.Background(), request) +} + +// DescribeMonitors +// 获取所有监控器 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_QUERYNOTALLOW = "UnsupportedOperation.QueryNotAllow" +func (c *Client) DescribeMonitorsWithContext(ctx context.Context, request *DescribeMonitorsRequest) (response *DescribeMonitorsResponse, err error) { + if request == nil { + request = NewDescribeMonitorsRequest() + } + c.InitBaseRequest(&request.BaseRequest, "igtm", APIVersion, "DescribeMonitors") + + if c.GetCredential() == nil { + return nil, errors.New("DescribeMonitors require credential") + } + + request.SetContext(ctx) + + response = NewDescribeMonitorsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeQuotasRequest() (request *DescribeQuotasRequest) { + request = &DescribeQuotasRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("igtm", APIVersion, "DescribeQuotas") + + + return +} + +func NewDescribeQuotasResponse() (response *DescribeQuotasResponse) { + response = &DescribeQuotasResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeQuotas +// 配额查询 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DescribeQuotas(request *DescribeQuotasRequest) (response *DescribeQuotasResponse, err error) { + return c.DescribeQuotasWithContext(context.Background(), request) +} + +// DescribeQuotas +// 配额查询 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DescribeQuotasWithContext(ctx context.Context, request *DescribeQuotasRequest) (response *DescribeQuotasResponse, err error) { + if request == nil { + request = NewDescribeQuotasRequest() + } + c.InitBaseRequest(&request.BaseRequest, "igtm", APIVersion, "DescribeQuotas") + + if c.GetCredential() == nil { + return nil, errors.New("DescribeQuotas require credential") + } + + request.SetContext(ctx) + + response = NewDescribeQuotasResponse() + err = c.Send(request, response) + return +} + +func NewDescribeStrategyDetailRequest() (request *DescribeStrategyDetailRequest) { + request = &DescribeStrategyDetailRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("igtm", APIVersion, "DescribeStrategyDetail") + + + return +} + +func NewDescribeStrategyDetailResponse() (response *DescribeStrategyDetailResponse) { + response = &DescribeStrategyDetailResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeStrategyDetail +// 策略详情 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_STRATEGYUNAUTHORIZED = "UnauthorizedOperation.StrategyUnauthorized" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DescribeStrategyDetail(request *DescribeStrategyDetailRequest) (response *DescribeStrategyDetailResponse, err error) { + return c.DescribeStrategyDetailWithContext(context.Background(), request) +} + +// DescribeStrategyDetail +// 策略详情 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_STRATEGYUNAUTHORIZED = "UnauthorizedOperation.StrategyUnauthorized" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DescribeStrategyDetailWithContext(ctx context.Context, request *DescribeStrategyDetailRequest) (response *DescribeStrategyDetailResponse, err error) { + if request == nil { + request = NewDescribeStrategyDetailRequest() + } + c.InitBaseRequest(&request.BaseRequest, "igtm", APIVersion, "DescribeStrategyDetail") + + if c.GetCredential() == nil { + return nil, errors.New("DescribeStrategyDetail require credential") + } + + request.SetContext(ctx) + + response = NewDescribeStrategyDetailResponse() + err = c.Send(request, response) + return +} + +func NewDescribeStrategyListRequest() (request *DescribeStrategyListRequest) { + request = &DescribeStrategyListRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("igtm", APIVersion, "DescribeStrategyList") + + + return +} + +func NewDescribeStrategyListResponse() (response *DescribeStrategyListResponse) { + response = &DescribeStrategyListResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeStrategyList +// 策略列表接口 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_QUERYNOTALLOW = "UnsupportedOperation.QueryNotAllow" +// UNSUPPORTEDOPERATION_RESOURCENAMEDUPLICATED = "UnsupportedOperation.ResourceNameDuplicated" +// UNSUPPORTEDOPERATION_RESOURCESOURCEDUPLICATED = "UnsupportedOperation.ResourceSourceDuplicated" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DescribeStrategyList(request *DescribeStrategyListRequest) (response *DescribeStrategyListResponse, err error) { + return c.DescribeStrategyListWithContext(context.Background(), request) +} + +// DescribeStrategyList +// 策略列表接口 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_QUERYNOTALLOW = "UnsupportedOperation.QueryNotAllow" +// UNSUPPORTEDOPERATION_RESOURCENAMEDUPLICATED = "UnsupportedOperation.ResourceNameDuplicated" +// UNSUPPORTEDOPERATION_RESOURCESOURCEDUPLICATED = "UnsupportedOperation.ResourceSourceDuplicated" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) DescribeStrategyListWithContext(ctx context.Context, request *DescribeStrategyListRequest) (response *DescribeStrategyListResponse, err error) { + if request == nil { + request = NewDescribeStrategyListRequest() + } + c.InitBaseRequest(&request.BaseRequest, "igtm", APIVersion, "DescribeStrategyList") + + if c.GetCredential() == nil { + return nil, errors.New("DescribeStrategyList require credential") + } + + request.SetContext(ctx) + + response = NewDescribeStrategyListResponse() + err = c.Send(request, response) + return +} + +func NewModifyAddressPoolRequest() (request *ModifyAddressPoolRequest) { + request = &ModifyAddressPoolRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("igtm", APIVersion, "ModifyAddressPool") + + + return +} + +func NewModifyAddressPoolResponse() (response *ModifyAddressPoolResponse) { + response = &ModifyAddressPoolResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// ModifyAddressPool +// 修改地址池 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_ADDREXCEEDEDLIMIT = "FailedOperation.AddrExceededLimit" +// FAILEDOPERATION_EXCEEDEDLIMIT = "FailedOperation.ExceededLimit" +// FAILEDOPERATION_EXCEEDEDMONITORNUMLIMIT = "FailedOperation.ExceededMonitorNumLimit" +// FAILEDOPERATION_MODIFYERROR = "FailedOperation.ModifyError" +// FAILEDOPERATION_MODIFYPOOLFAILED = "FailedOperation.ModifyPoolFailed" +// FAILEDOPERATION_POOLEXCEEDEDLIMIT = "FailedOperation.PoolExceededLimit" +// FAILEDOPERATION_TASKEXCEEDEDLIMIT = "FailedOperation.TaskExceededLimit" +// INTERNALERROR = "InternalError" +// INTERNALERROR_UNDEFINEDERROR = "InternalError.UndefinedError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_POOLADDRDUPLICATED = "InvalidParameterValue.PoolAddrDuplicated" +// INVALIDPARAMETERVALUE_POOLADDREMPTY = "InvalidParameterValue.PoolAddrEmpty" +// INVALIDPARAMETERVALUE_POOLADDRINVALID = "InvalidParameterValue.PoolAddrInvalid" +// INVALIDPARAMETERVALUE_POOLADDRMIXED = "InvalidParameterValue.PoolAddrMixed" +// INVALIDPARAMETERVALUE_POOLADDRWEIGHTEMPTY = "InvalidParameterValue.PoolAddrWeightEmpty" +// MISSINGPARAMETER = "MissingParameter" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_POOLADDRESSUNAUTHORIZED = "UnauthorizedOperation.PoolAddressUnauthorized" +// UNAUTHORIZEDOPERATION_POOLUNAUTHORIZED = "UnauthorizedOperation.PoolUnauthorized" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_POOLNAMEDUPLICATE = "UnsupportedOperation.PoolNameDuplicate" +// UNSUPPORTEDOPERATION_RESOURCENAMEDUPLICATED = "UnsupportedOperation.ResourceNameDuplicated" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) ModifyAddressPool(request *ModifyAddressPoolRequest) (response *ModifyAddressPoolResponse, err error) { + return c.ModifyAddressPoolWithContext(context.Background(), request) +} + +// ModifyAddressPool +// 修改地址池 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_ADDREXCEEDEDLIMIT = "FailedOperation.AddrExceededLimit" +// FAILEDOPERATION_EXCEEDEDLIMIT = "FailedOperation.ExceededLimit" +// FAILEDOPERATION_EXCEEDEDMONITORNUMLIMIT = "FailedOperation.ExceededMonitorNumLimit" +// FAILEDOPERATION_MODIFYERROR = "FailedOperation.ModifyError" +// FAILEDOPERATION_MODIFYPOOLFAILED = "FailedOperation.ModifyPoolFailed" +// FAILEDOPERATION_POOLEXCEEDEDLIMIT = "FailedOperation.PoolExceededLimit" +// FAILEDOPERATION_TASKEXCEEDEDLIMIT = "FailedOperation.TaskExceededLimit" +// INTERNALERROR = "InternalError" +// INTERNALERROR_UNDEFINEDERROR = "InternalError.UndefinedError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_POOLADDRDUPLICATED = "InvalidParameterValue.PoolAddrDuplicated" +// INVALIDPARAMETERVALUE_POOLADDREMPTY = "InvalidParameterValue.PoolAddrEmpty" +// INVALIDPARAMETERVALUE_POOLADDRINVALID = "InvalidParameterValue.PoolAddrInvalid" +// INVALIDPARAMETERVALUE_POOLADDRMIXED = "InvalidParameterValue.PoolAddrMixed" +// INVALIDPARAMETERVALUE_POOLADDRWEIGHTEMPTY = "InvalidParameterValue.PoolAddrWeightEmpty" +// MISSINGPARAMETER = "MissingParameter" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_POOLADDRESSUNAUTHORIZED = "UnauthorizedOperation.PoolAddressUnauthorized" +// UNAUTHORIZEDOPERATION_POOLUNAUTHORIZED = "UnauthorizedOperation.PoolUnauthorized" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_POOLNAMEDUPLICATE = "UnsupportedOperation.PoolNameDuplicate" +// UNSUPPORTEDOPERATION_RESOURCENAMEDUPLICATED = "UnsupportedOperation.ResourceNameDuplicated" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) ModifyAddressPoolWithContext(ctx context.Context, request *ModifyAddressPoolRequest) (response *ModifyAddressPoolResponse, err error) { + if request == nil { + request = NewModifyAddressPoolRequest() + } + c.InitBaseRequest(&request.BaseRequest, "igtm", APIVersion, "ModifyAddressPool") + + if c.GetCredential() == nil { + return nil, errors.New("ModifyAddressPool require credential") + } + + request.SetContext(ctx) + + response = NewModifyAddressPoolResponse() + err = c.Send(request, response) + return +} + +func NewModifyInstanceConfigRequest() (request *ModifyInstanceConfigRequest) { + request = &ModifyInstanceConfigRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("igtm", APIVersion, "ModifyInstanceConfig") + + + return +} + +func NewModifyInstanceConfigResponse() (response *ModifyInstanceConfigResponse) { + response = &ModifyInstanceConfigResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// ModifyInstanceConfig +// 修改实例配置 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_MODIFYINSTANCEFAILED = "FailedOperation.ModifyInstanceFailed" +// FAILEDOPERATION_QUERYERR = "FailedOperation.QueryErr" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ACCESSTYPEINVALID = "InvalidParameter.AccessTypeInvalid" +// INVALIDPARAMETER_GLOBALACCESSDOMAINCONFLICT = "InvalidParameter.GlobalAccessDomainConflict" +// INVALIDPARAMETER_INSTANCEDISABLED = "InvalidParameter.InstanceDisabled" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_ACCESSDOMAINUNAUTHORIZED = "UnsupportedOperation.AccessDomainUnauthorized" +// UNSUPPORTEDOPERATION_DOMAINTTLINVALID = "UnsupportedOperation.DomainTtlInvalid" +// UNSUPPORTEDOPERATION_INSTANCENAMEDUPLICATE = "UnsupportedOperation.InstanceNameDuplicate" +func (c *Client) ModifyInstanceConfig(request *ModifyInstanceConfigRequest) (response *ModifyInstanceConfigResponse, err error) { + return c.ModifyInstanceConfigWithContext(context.Background(), request) +} + +// ModifyInstanceConfig +// 修改实例配置 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_MODIFYINSTANCEFAILED = "FailedOperation.ModifyInstanceFailed" +// FAILEDOPERATION_QUERYERR = "FailedOperation.QueryErr" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ACCESSTYPEINVALID = "InvalidParameter.AccessTypeInvalid" +// INVALIDPARAMETER_GLOBALACCESSDOMAINCONFLICT = "InvalidParameter.GlobalAccessDomainConflict" +// INVALIDPARAMETER_INSTANCEDISABLED = "InvalidParameter.InstanceDisabled" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_ACCESSDOMAINUNAUTHORIZED = "UnsupportedOperation.AccessDomainUnauthorized" +// UNSUPPORTEDOPERATION_DOMAINTTLINVALID = "UnsupportedOperation.DomainTtlInvalid" +// UNSUPPORTEDOPERATION_INSTANCENAMEDUPLICATE = "UnsupportedOperation.InstanceNameDuplicate" +func (c *Client) ModifyInstanceConfigWithContext(ctx context.Context, request *ModifyInstanceConfigRequest) (response *ModifyInstanceConfigResponse, err error) { + if request == nil { + request = NewModifyInstanceConfigRequest() + } + c.InitBaseRequest(&request.BaseRequest, "igtm", APIVersion, "ModifyInstanceConfig") + + if c.GetCredential() == nil { + return nil, errors.New("ModifyInstanceConfig require credential") + } + + request.SetContext(ctx) + + response = NewModifyInstanceConfigResponse() + err = c.Send(request, response) + return +} + +func NewModifyMonitorRequest() (request *ModifyMonitorRequest) { + request = &ModifyMonitorRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("igtm", APIVersion, "ModifyMonitor") + + + return +} + +func NewModifyMonitorResponse() (response *ModifyMonitorResponse) { + response = &ModifyMonitorResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// ModifyMonitor +// 修改监控器 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_EXCEEDEDLIMIT = "FailedOperation.ExceededLimit" +// FAILEDOPERATION_EXCEEDEDMONITORNUMLIMIT = "FailedOperation.ExceededMonitorNumLimit" +// FAILEDOPERATION_MODIFYERROR = "FailedOperation.ModifyError" +// FAILEDOPERATION_MODIFYMONITORFAILED = "FailedOperation.ModifyMonitorFailed" +// INTERNALERROR = "InternalError" +// INTERNALERROR_PARAMETERERROR = "InternalError.ParameterError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_MONITORNAMEEXIST = "UnsupportedOperation.MonitorNameExist" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) ModifyMonitor(request *ModifyMonitorRequest) (response *ModifyMonitorResponse, err error) { + return c.ModifyMonitorWithContext(context.Background(), request) +} + +// ModifyMonitor +// 修改监控器 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_EXCEEDEDLIMIT = "FailedOperation.ExceededLimit" +// FAILEDOPERATION_EXCEEDEDMONITORNUMLIMIT = "FailedOperation.ExceededMonitorNumLimit" +// FAILEDOPERATION_MODIFYERROR = "FailedOperation.ModifyError" +// FAILEDOPERATION_MODIFYMONITORFAILED = "FailedOperation.ModifyMonitorFailed" +// INTERNALERROR = "InternalError" +// INTERNALERROR_PARAMETERERROR = "InternalError.ParameterError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// MISSINGPARAMETER = "MissingParameter" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION_MONITORNAMEEXIST = "UnsupportedOperation.MonitorNameExist" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) ModifyMonitorWithContext(ctx context.Context, request *ModifyMonitorRequest) (response *ModifyMonitorResponse, err error) { + if request == nil { + request = NewModifyMonitorRequest() + } + c.InitBaseRequest(&request.BaseRequest, "igtm", APIVersion, "ModifyMonitor") + + if c.GetCredential() == nil { + return nil, errors.New("ModifyMonitor require credential") + } + + request.SetContext(ctx) + + response = NewModifyMonitorResponse() + err = c.Send(request, response) + return +} + +func NewModifyStrategyRequest() (request *ModifyStrategyRequest) { + request = &ModifyStrategyRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("igtm", APIVersion, "ModifyStrategy") + + + return +} + +func NewModifyStrategyResponse() (response *ModifyStrategyResponse) { + response = &ModifyStrategyResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// ModifyStrategy +// 修改策略接口 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_CANNOTDELETEDEFAULTLINEERROR = "FailedOperation.CanNotDeleteDefaultLineError" +// FAILEDOPERATION_EXCEEDEDLIMIT = "FailedOperation.ExceededLimit" +// FAILEDOPERATION_MODIFYERROR = "FailedOperation.ModifyError" +// FAILEDOPERATION_MODIFYSTRATEGYFAILED = "FailedOperation.ModifyStrategyFailed" +// FAILEDOPERATION_POOLWASUSINGERROR = "FailedOperation.PoolWasUsingError" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_INSTANCEDISABLED = "InvalidParameter.InstanceDisabled" +// INVALIDPARAMETER_TRAFFICSTRATEGYINVALID = "InvalidParameter.TrafficStrategyInvalid" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_TRAFFICSTRATEGYWEIGHTEMPTY = "InvalidParameterValue.TrafficStrategyWeightEmpty" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINSUFFICIENT_NOINSTANCE = "ResourceInsufficient.NoInstance" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_INSTANCEUNAUTHORIZED = "UnauthorizedOperation.InstanceUnauthorized" +// UNAUTHORIZEDOPERATION_MAINBINDPOOLUNAUTHORIZED = "UnauthorizedOperation.MainBindPoolUnauthorized" +// UNAUTHORIZEDOPERATION_MAINPOOLUNAUTHORIZED = "UnauthorizedOperation.MainPoolUnauthorized" +// UNAUTHORIZEDOPERATION_STRATEGYUNAUTHORIZED = "UnauthorizedOperation.StrategyUnauthorized" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_FALLBACKPOOLINVALID = "UnsupportedOperation.FallBackPoolInvalid" +// UNSUPPORTEDOPERATION_MAINBINDPOOLDUPLICATE = "UnsupportedOperation.MainBindPoolDuplicate" +// UNSUPPORTEDOPERATION_MAINBINDPOOLEMPTY = "UnsupportedOperation.MainBindPoolEmpty" +// UNSUPPORTEDOPERATION_MAINBINDPOOLLEVELEXCEED = "UnsupportedOperation.MainBindPoolLevelExceed" +// UNSUPPORTEDOPERATION_MAINBINDPOOLMIXED = "UnsupportedOperation.MainBindPoolMixed" +// UNSUPPORTEDOPERATION_MAINBINDPOOLNUMINVALID = "UnsupportedOperation.MainBindPoolNumInvalid" +// UNSUPPORTEDOPERATION_MAINPOOLDUPLICATE = "UnsupportedOperation.MainPoolDuplicate" +// UNSUPPORTEDOPERATION_MAINPOOLEMPTY = "UnsupportedOperation.MainPoolEmpty" +// UNSUPPORTEDOPERATION_MAINPOOLSURVIVENUMINVALID = "UnsupportedOperation.MainPoolSurviveNumInvalid" +// UNSUPPORTEDOPERATION_RESOURCENAMEDUPLICATED = "UnsupportedOperation.ResourceNameDuplicated" +// UNSUPPORTEDOPERATION_RESOURCEPOOLSOURCENOTEXIST = "UnsupportedOperation.ResourcePoolSourceNotExist" +// UNSUPPORTEDOPERATION_RESOURCESOURCEDUPLICATED = "UnsupportedOperation.ResourceSourceDuplicated" +// UNSUPPORTEDOPERATION_STRATEGYNAMEDUPLICATE = "UnsupportedOperation.StrategyNameDuplicate" +// UNSUPPORTEDOPERATION_STRATEGYSOURCEDUPLICATE = "UnsupportedOperation.StrategySourceDuplicate" +// UNSUPPORTEDOPERATION_STRATEGYSOURCEINUSED = "UnsupportedOperation.StrategySourceInUsed" +// UNSUPPORTEDOPERATION_STRATEGYSOURCEUNAUTHORIZED = "UnsupportedOperation.StrategySourceUnauthorized" +// UNSUPPORTEDOPERATION_STRATEGYSWITCHTYPEINVALID = "UnsupportedOperation.StrategySwitchTypeInvalid" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) ModifyStrategy(request *ModifyStrategyRequest) (response *ModifyStrategyResponse, err error) { + return c.ModifyStrategyWithContext(context.Background(), request) +} + +// ModifyStrategy +// 修改策略接口 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_CANNOTDELETEDEFAULTLINEERROR = "FailedOperation.CanNotDeleteDefaultLineError" +// FAILEDOPERATION_EXCEEDEDLIMIT = "FailedOperation.ExceededLimit" +// FAILEDOPERATION_MODIFYERROR = "FailedOperation.ModifyError" +// FAILEDOPERATION_MODIFYSTRATEGYFAILED = "FailedOperation.ModifyStrategyFailed" +// FAILEDOPERATION_POOLWASUSINGERROR = "FailedOperation.PoolWasUsingError" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_INSTANCEDISABLED = "InvalidParameter.InstanceDisabled" +// INVALIDPARAMETER_TRAFFICSTRATEGYINVALID = "InvalidParameter.TrafficStrategyInvalid" +// INVALIDPARAMETERVALUE = "InvalidParameterValue" +// INVALIDPARAMETERVALUE_TRAFFICSTRATEGYWEIGHTEMPTY = "InvalidParameterValue.TrafficStrategyWeightEmpty" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINSUFFICIENT_NOINSTANCE = "ResourceInsufficient.NoInstance" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_INSTANCEUNAUTHORIZED = "UnauthorizedOperation.InstanceUnauthorized" +// UNAUTHORIZEDOPERATION_MAINBINDPOOLUNAUTHORIZED = "UnauthorizedOperation.MainBindPoolUnauthorized" +// UNAUTHORIZEDOPERATION_MAINPOOLUNAUTHORIZED = "UnauthorizedOperation.MainPoolUnauthorized" +// UNAUTHORIZEDOPERATION_STRATEGYUNAUTHORIZED = "UnauthorizedOperation.StrategyUnauthorized" +// UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_FALLBACKPOOLINVALID = "UnsupportedOperation.FallBackPoolInvalid" +// UNSUPPORTEDOPERATION_MAINBINDPOOLDUPLICATE = "UnsupportedOperation.MainBindPoolDuplicate" +// UNSUPPORTEDOPERATION_MAINBINDPOOLEMPTY = "UnsupportedOperation.MainBindPoolEmpty" +// UNSUPPORTEDOPERATION_MAINBINDPOOLLEVELEXCEED = "UnsupportedOperation.MainBindPoolLevelExceed" +// UNSUPPORTEDOPERATION_MAINBINDPOOLMIXED = "UnsupportedOperation.MainBindPoolMixed" +// UNSUPPORTEDOPERATION_MAINBINDPOOLNUMINVALID = "UnsupportedOperation.MainBindPoolNumInvalid" +// UNSUPPORTEDOPERATION_MAINPOOLDUPLICATE = "UnsupportedOperation.MainPoolDuplicate" +// UNSUPPORTEDOPERATION_MAINPOOLEMPTY = "UnsupportedOperation.MainPoolEmpty" +// UNSUPPORTEDOPERATION_MAINPOOLSURVIVENUMINVALID = "UnsupportedOperation.MainPoolSurviveNumInvalid" +// UNSUPPORTEDOPERATION_RESOURCENAMEDUPLICATED = "UnsupportedOperation.ResourceNameDuplicated" +// UNSUPPORTEDOPERATION_RESOURCEPOOLSOURCENOTEXIST = "UnsupportedOperation.ResourcePoolSourceNotExist" +// UNSUPPORTEDOPERATION_RESOURCESOURCEDUPLICATED = "UnsupportedOperation.ResourceSourceDuplicated" +// UNSUPPORTEDOPERATION_STRATEGYNAMEDUPLICATE = "UnsupportedOperation.StrategyNameDuplicate" +// UNSUPPORTEDOPERATION_STRATEGYSOURCEDUPLICATE = "UnsupportedOperation.StrategySourceDuplicate" +// UNSUPPORTEDOPERATION_STRATEGYSOURCEINUSED = "UnsupportedOperation.StrategySourceInUsed" +// UNSUPPORTEDOPERATION_STRATEGYSOURCEUNAUTHORIZED = "UnsupportedOperation.StrategySourceUnauthorized" +// UNSUPPORTEDOPERATION_STRATEGYSWITCHTYPEINVALID = "UnsupportedOperation.StrategySwitchTypeInvalid" +// UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +func (c *Client) ModifyStrategyWithContext(ctx context.Context, request *ModifyStrategyRequest) (response *ModifyStrategyResponse, err error) { + if request == nil { + request = NewModifyStrategyRequest() + } + c.InitBaseRequest(&request.BaseRequest, "igtm", APIVersion, "ModifyStrategy") + + if c.GetCredential() == nil { + return nil, errors.New("ModifyStrategy require credential") + } + + request.SetContext(ctx) + + response = NewModifyStrategyResponse() + err = c.Send(request, response) + return +} diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/igtm/v20231024/errors.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/igtm/v20231024/errors.go new file mode 100644 index 0000000000..c1812128ef --- /dev/null +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/igtm/v20231024/errors.go @@ -0,0 +1,268 @@ +// Copyright (c) 2017-2025 Tencent. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v20231024 + +const ( + // 此产品的特有错误码 + + // 操作失败。 + FAILEDOPERATION = "FailedOperation" + + // 地址池中地址数量超出限额 + FAILEDOPERATION_ADDREXCEEDEDLIMIT = "FailedOperation.AddrExceededLimit" + + // 必须存在一条默认解析线路。 + FAILEDOPERATION_CANNOTDELETEDEFAULTLINEERROR = "FailedOperation.CanNotDeleteDefaultLineError" + + // 创建失败。 + FAILEDOPERATION_CREATEERROR = "FailedOperation.CreateError" + + // 创建实例失败 + FAILEDOPERATION_CREATEINSTANCEFAILED = "FailedOperation.CreateInstanceFailed" + + // 创建监控器失败 + FAILEDOPERATION_CREATEMONITORFAILED = "FailedOperation.CreateMonitorFailed" + + // 创建地址池失败 + FAILEDOPERATION_CREATEPOOLFAILED = "FailedOperation.CreatePoolFailed" + + // 创建策略失败 + FAILEDOPERATION_CREATESTRATEGYFAILED = "FailedOperation.CreateStrategyFailed" + + // 操作删除失败。 + FAILEDOPERATION_DELETEERROR = "FailedOperation.DeleteError" + + // 删除监控器失败 + FAILEDOPERATION_DELETEMONITORFAILED = "FailedOperation.DeleteMonitorFailed" + + // 删除地址池失败 + FAILEDOPERATION_DELETEPOOLFAILED = "FailedOperation.DeletePoolFailed" + + // 删除策略失败 + FAILEDOPERATION_DELETESTRATEGYFAILED = "FailedOperation.DeleteStrategyFailed" + + // 超出限额。 + FAILEDOPERATION_EXCEEDEDLIMIT = "FailedOperation.ExceededLimit" + + // 探点数配额不足。 + FAILEDOPERATION_EXCEEDEDMONITORNUMLIMIT = "FailedOperation.ExceededMonitorNumLimit" + + // 修改错误。 + FAILEDOPERATION_MODIFYERROR = "FailedOperation.ModifyError" + + // 修改实例失败 + FAILEDOPERATION_MODIFYINSTANCEFAILED = "FailedOperation.ModifyInstanceFailed" + + // 修改监控器失败 + FAILEDOPERATION_MODIFYMONITORFAILED = "FailedOperation.ModifyMonitorFailed" + + // 修改地址池失败 + FAILEDOPERATION_MODIFYPOOLFAILED = "FailedOperation.ModifyPoolFailed" + + // 修改策略失败 + FAILEDOPERATION_MODIFYSTRATEGYFAILED = "FailedOperation.ModifyStrategyFailed" + + // 地址池数量超出限额 + FAILEDOPERATION_POOLEXCEEDEDLIMIT = "FailedOperation.PoolExceededLimit" + + // 地址池正在使用。 + FAILEDOPERATION_POOLWASUSINGERROR = "FailedOperation.PoolWasUsingError" + + // 查询失败 + FAILEDOPERATION_QUERYERR = "FailedOperation.QueryErr" + + // 探测任务数量超出限额 + FAILEDOPERATION_TASKEXCEEDEDLIMIT = "FailedOperation.TaskExceededLimit" + + // 内部错误。 + INTERNALERROR = "InternalError" + + // 数据库读写错误。 + INTERNALERROR_DBERR = "InternalError.DbErr" + + // 参数格式错误 + INTERNALERROR_PARAMETERERROR = "InternalError.ParameterError" + + // 错误未定义 + INTERNALERROR_UNDEFINEDERROR = "InternalError.UndefinedError" + + // 参数错误。 + INVALIDPARAMETER = "InvalidParameter" + + // 实例接入类型不合法 + INVALIDPARAMETER_ACCESSTYPEINVALID = "InvalidParameter.AccessTypeInvalid" + + // 全局接入域名冲突,当前域名被其他实例使用,请解决占用后重试 + INVALIDPARAMETER_GLOBALACCESSDOMAINCONFLICT = "InvalidParameter.GlobalAccessDomainConflict" + + // 实例不可用,请检查实例状态 + INVALIDPARAMETER_INSTANCEDISABLED = "InvalidParameter.InstanceDisabled" + + // 流量策略不合法 + INVALIDPARAMETER_TRAFFICSTRATEGYINVALID = "InvalidParameter.TrafficStrategyInvalid" + + // 参数取值错误。 + INVALIDPARAMETERVALUE = "InvalidParameterValue" + + // 地址池地址重复 + INVALIDPARAMETERVALUE_POOLADDRDUPLICATED = "InvalidParameterValue.PoolAddrDuplicated" + + // 地址池地址不能为空 + INVALIDPARAMETERVALUE_POOLADDREMPTY = "InvalidParameterValue.PoolAddrEmpty" + + // 地址池地址非法 + INVALIDPARAMETERVALUE_POOLADDRINVALID = "InvalidParameterValue.PoolAddrInvalid" + + // 地址池地址不能混用 + INVALIDPARAMETERVALUE_POOLADDRMIXED = "InvalidParameterValue.PoolAddrMixed" + + // 地址池地址权重不能为空 + INVALIDPARAMETERVALUE_POOLADDRWEIGHTEMPTY = "InvalidParameterValue.PoolAddrWeightEmpty" + + // 流量策略不合法 + INVALIDPARAMETERVALUE_TRAFFICSTRATEGYINVALID = "InvalidParameterValue.TrafficStrategyInvalid" + + // 流量策略为负载均衡且主力集合内有多个地址池时,权重不能为空 + INVALIDPARAMETERVALUE_TRAFFICSTRATEGYWEIGHTEMPTY = "InvalidParameterValue.TrafficStrategyWeightEmpty" + + // 超过配额限制。 + LIMITEXCEEDED = "LimitExceeded" + + // 缺少参数错误。 + MISSINGPARAMETER = "MissingParameter" + + // 当前请求过于频繁,请稍后重试 + REQUESTLIMITEXCEEDED_INNERREQUESTLIMITEXCEEDED = "RequestLimitExceeded.InnerRequestLimitExceeded" + + // 没有实例,请先购买实例 + RESOURCEINSUFFICIENT_NOINSTANCE = "ResourceInsufficient.NoInstance" + + // 资源不存在。 + RESOURCENOTFOUND = "ResourceNotFound" + + // 查询错误,未查询到相关资源。 + RESOURCENOTFOUND_SEARCHINFO = "ResourceNotFound.SearchInfo" + + // 资源不可用。 + RESOURCEUNAVAILABLE = "ResourceUnavailable" + + // 未授权操作。 + UNAUTHORIZEDOPERATION = "UnauthorizedOperation" + + // 未授权,不可操作该实例 + UNAUTHORIZEDOPERATION_INSTANCEUNAUTHORIZED = "UnauthorizedOperation.InstanceUnauthorized" + + // 未授权,主力集合中包含未授权地址池 + UNAUTHORIZEDOPERATION_MAINBINDPOOLUNAUTHORIZED = "UnauthorizedOperation.MainBindPoolUnauthorized" + + // 未授权,不可操作该主力地址池 + UNAUTHORIZEDOPERATION_MAINPOOLUNAUTHORIZED = "UnauthorizedOperation.MainPoolUnauthorized" + + // 未授权,不可操作该地址池地址 + UNAUTHORIZEDOPERATION_POOLADDRESSUNAUTHORIZED = "UnauthorizedOperation.PoolAddressUnauthorized" + + // 未授权,不可操作该地址池 + UNAUTHORIZEDOPERATION_POOLUNAUTHORIZED = "UnauthorizedOperation.PoolUnauthorized" + + // 未授权,不可操作该策略 + UNAUTHORIZEDOPERATION_STRATEGYUNAUTHORIZED = "UnauthorizedOperation.StrategyUnauthorized" + + // 资源未授权。 + UNAUTHORIZEDOPERATION_UNAUTHORIZEDERROR = "UnauthorizedOperation.UnauthorizedError" + + // 未知参数错误。 + UNKNOWNPARAMETER = "UnknownParameter" + + // 操作不支持。 + UNSUPPORTEDOPERATION = "UnsupportedOperation" + + // 接入域名未使用腾讯云 DNSPod 解析,请重新输入 + UNSUPPORTEDOPERATION_ACCESSDOMAINUNAUTHORIZED = "UnsupportedOperation.AccessDomainUnauthorized" + + // 接入域名的套餐不允许此TTL值 + UNSUPPORTEDOPERATION_DOMAINTTLINVALID = "UnsupportedOperation.DomainTtlInvalid" + + // 兜底地址池格式不合法 + UNSUPPORTEDOPERATION_FALLBACKPOOLINVALID = "UnsupportedOperation.FallBackPoolInvalid" + + // 实例名称不能重复 + UNSUPPORTEDOPERATION_INSTANCENAMEDUPLICATE = "UnsupportedOperation.InstanceNameDuplicate" + + // 主力地址池重复 + UNSUPPORTEDOPERATION_MAINBINDPOOLDUPLICATE = "UnsupportedOperation.MainBindPoolDuplicate" + + // 主力地址池为空 + UNSUPPORTEDOPERATION_MAINBINDPOOLEMPTY = "UnsupportedOperation.MainBindPoolEmpty" + + // 主力地址集合数量超过限制 + UNSUPPORTEDOPERATION_MAINBINDPOOLLEVELEXCEED = "UnsupportedOperation.MainBindPoolLevelExceed" + + // 主力地址集合内地址类型不能混用 + UNSUPPORTEDOPERATION_MAINBINDPOOLMIXED = "UnsupportedOperation.MainBindPoolMixed" + + // 主力地址集合数量不合法 + UNSUPPORTEDOPERATION_MAINBINDPOOLNUMINVALID = "UnsupportedOperation.MainBindPoolNumInvalid" + + // 主力地址集合重复 + UNSUPPORTEDOPERATION_MAINPOOLDUPLICATE = "UnsupportedOperation.MainPoolDuplicate" + + // 主力集合不能为空 + UNSUPPORTEDOPERATION_MAINPOOLEMPTY = "UnsupportedOperation.MainPoolEmpty" + + // 主力地址池阀值不合法 + UNSUPPORTEDOPERATION_MAINPOOLSURVIVENUMINVALID = "UnsupportedOperation.MainPoolSurviveNumInvalid" + + // 监控器名已存在 + UNSUPPORTEDOPERATION_MONITORNAMEEXIST = "UnsupportedOperation.MonitorNameExist" + + // 套餐无效,请选择正确套餐 + UNSUPPORTEDOPERATION_PACKAGEUNAUTHORIZED = "UnsupportedOperation.PackageUnauthorized" + + // 地址池名称不能重复 + UNSUPPORTEDOPERATION_POOLNAMEDUPLICATE = "UnsupportedOperation.PoolNameDuplicate" + + // 不支持的查询 + UNSUPPORTEDOPERATION_QUERYNOTALLOW = "UnsupportedOperation.QueryNotAllow" + + // 资源名不能重复。 + UNSUPPORTEDOPERATION_RESOURCENAMEDUPLICATED = "UnsupportedOperation.ResourceNameDuplicated" + + // 主备资源组中资源不存在。 + UNSUPPORTEDOPERATION_RESOURCEPOOLSOURCENOTEXIST = "UnsupportedOperation.ResourcePoolSourceNotExist" + + // 存在重复的解析来源。 + UNSUPPORTEDOPERATION_RESOURCESOURCEDUPLICATED = "UnsupportedOperation.ResourceSourceDuplicated" + + // 策略名称不能重复 + UNSUPPORTEDOPERATION_STRATEGYNAMEDUPLICATE = "UnsupportedOperation.StrategyNameDuplicate" + + // 策略线路重复 + UNSUPPORTEDOPERATION_STRATEGYSOURCEDUPLICATE = "UnsupportedOperation.StrategySourceDuplicate" + + // 策略线路已使用 + UNSUPPORTEDOPERATION_STRATEGYSOURCEINUSED = "UnsupportedOperation.StrategySourceInUsed" + + // 策略线路不在实例套餐中 + UNSUPPORTEDOPERATION_STRATEGYSOURCEUNAUTHORIZED = "UnsupportedOperation.StrategySourceUnauthorized" + + // 策略切换类型不合法 + UNSUPPORTEDOPERATION_STRATEGYSWITCHTYPEINVALID = "UnsupportedOperation.StrategySwitchTypeInvalid" + + // TTL无效,请设置正确的TTL + UNSUPPORTEDOPERATION_TTLINVALID = "UnsupportedOperation.TTLInvalid" + + // 用户未登录,缺少Uin参数。 + UNSUPPORTEDOPERATION_USERNOTFOUND = "UnsupportedOperation.UserNotFound" +) diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/igtm/v20231024/models.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/igtm/v20231024/models.go new file mode 100644 index 0000000000..ba73b83c36 --- /dev/null +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/igtm/v20231024/models.go @@ -0,0 +1,2748 @@ +// Copyright (c) 2017-2025 Tencent. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v20231024 + +import ( + tcerr "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" + tchttp "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" + "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/json" +) + +type Address struct { + // 地址值:只支持ipv4、ipv6和域名格式; + // 不支持回环地址、保留地址、内网地址与腾讯保留网段 + Addr *string `json:"Addr,omitnil,omitempty" name:"Addr"` + + // 是否启用:DISABLED不启用;ENABLED启用 + IsEnable *string `json:"IsEnable,omitnil,omitempty" name:"IsEnable"` + + // 地址id + AddressId *uint64 `json:"AddressId,omitnil,omitempty" name:"AddressId"` + + // 地址名称 + Location *string `json:"Location,omitnil,omitempty" name:"Location"` + + // OK正常,DOWN故障,WARN风险,UNKNOWN探测中,UNMONITORED未知 + Status *string `json:"Status,omitnil,omitempty" name:"Status"` + + // 权重,流量策略为WEIGHT时,必填;范围1-100 + // 注意:此字段可能返回 null,表示取不到有效值。 + Weight *uint64 `json:"Weight,omitnil,omitempty" name:"Weight"` + + // 创建时间 + CreatedOn *string `json:"CreatedOn,omitnil,omitempty" name:"CreatedOn"` + + // 修改时间 + UpdatedOn *string `json:"UpdatedOn,omitnil,omitempty" name:"UpdatedOn"` +} + +type AddressLocation struct { + // ip地址 + Addr *string `json:"Addr,omitnil,omitempty" name:"Addr"` + + // 所属地域 + Location *string `json:"Location,omitnil,omitempty" name:"Location"` +} + +type AddressPool struct { + // 地址池 id + PoolId *uint64 `json:"PoolId,omitnil,omitempty" name:"PoolId"` + + // 地址池名 + PoolName *string `json:"PoolName,omitnil,omitempty" name:"PoolName"` + + // 地址池地址类型:IPV4、IPV6、DOMAIN + AddrType *string `json:"AddrType,omitnil,omitempty" name:"AddrType"` + + // 流量策略: WEIGHT负载均衡,ALL解析全部 + TrafficStrategy *string `json:"TrafficStrategy,omitnil,omitempty" name:"TrafficStrategy"` + + // 监控器id + // 注意:此字段可能返回 null,表示取不到有效值。 + MonitorId *uint64 `json:"MonitorId,omitnil,omitempty" name:"MonitorId"` + + // OK正常,DOWN故障,WARN风险,UNKNOWN未知 + Status *string `json:"Status,omitnil,omitempty" name:"Status"` + + // 地址数 + AddressNum *int64 `json:"AddressNum,omitnil,omitempty" name:"AddressNum"` + + // 探点数 + MonitorGroupNum *int64 `json:"MonitorGroupNum,omitnil,omitempty" name:"MonitorGroupNum"` + + // 探测任务数 + MonitorTaskNum *int64 `json:"MonitorTaskNum,omitnil,omitempty" name:"MonitorTaskNum"` + + // 实例相关信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + InstanceInfo []*InstanceInfo `json:"InstanceInfo,omitnil,omitempty" name:"InstanceInfo"` + + // 地址池地址信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + AddressSet []*Address `json:"AddressSet,omitnil,omitempty" name:"AddressSet"` + + // 创建时间 + CreatedOn *string `json:"CreatedOn,omitnil,omitempty" name:"CreatedOn"` + + // 更新时间 + UpdatedOn *string `json:"UpdatedOn,omitnil,omitempty" name:"UpdatedOn"` +} + +type AddressPoolDetail struct { + // 地址池 id + PoolId *uint64 `json:"PoolId,omitnil,omitempty" name:"PoolId"` + + // 地址池名 + PoolName *string `json:"PoolName,omitnil,omitempty" name:"PoolName"` + + // 地址池地址类型:IPV4、IPV6、DOMAIN + AddrType *string `json:"AddrType,omitnil,omitempty" name:"AddrType"` + + // 流量策略: WEIGHT负载均衡,ALL解析全部 + TrafficStrategy *string `json:"TrafficStrategy,omitnil,omitempty" name:"TrafficStrategy"` + + // 监控器id + // 注意:此字段可能返回 null,表示取不到有效值。 + MonitorId *uint64 `json:"MonitorId,omitnil,omitempty" name:"MonitorId"` + + // 创建时间 + CreatedOn *string `json:"CreatedOn,omitnil,omitempty" name:"CreatedOn"` + + // 更新时间 + UpdatedOn *string `json:"UpdatedOn,omitnil,omitempty" name:"UpdatedOn"` +} + +type CostItem struct { + // 计费项名称 + CostName *string `json:"CostName,omitnil,omitempty" name:"CostName"` + + // 计费项值 + CostValue *uint64 `json:"CostValue,omitnil,omitempty" name:"CostValue"` +} + +// Predefined struct for user +type CreateAddressPoolRequestParams struct { + // 地址池名称,不允许重复 + PoolName *string `json:"PoolName,omitnil,omitempty" name:"PoolName"` + + // 流量策略:WEIGHT负载均衡,ALL解析所有健康地址 + TrafficStrategy *string `json:"TrafficStrategy,omitnil,omitempty" name:"TrafficStrategy"` + + // 地址列表 + AddressSet []*Address `json:"AddressSet,omitnil,omitempty" name:"AddressSet"` + + // 监控器id + MonitorId *uint64 `json:"MonitorId,omitnil,omitempty" name:"MonitorId"` +} + +type CreateAddressPoolRequest struct { + *tchttp.BaseRequest + + // 地址池名称,不允许重复 + PoolName *string `json:"PoolName,omitnil,omitempty" name:"PoolName"` + + // 流量策略:WEIGHT负载均衡,ALL解析所有健康地址 + TrafficStrategy *string `json:"TrafficStrategy,omitnil,omitempty" name:"TrafficStrategy"` + + // 地址列表 + AddressSet []*Address `json:"AddressSet,omitnil,omitempty" name:"AddressSet"` + + // 监控器id + MonitorId *uint64 `json:"MonitorId,omitnil,omitempty" name:"MonitorId"` +} + +func (r *CreateAddressPoolRequest) 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 *CreateAddressPoolRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "PoolName") + delete(f, "TrafficStrategy") + delete(f, "AddressSet") + delete(f, "MonitorId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateAddressPoolRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type CreateAddressPoolResponseParams struct { + // 地址池id + AddressPoolId *uint64 `json:"AddressPoolId,omitnil,omitempty" name:"AddressPoolId"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type CreateAddressPoolResponse struct { + *tchttp.BaseResponse + Response *CreateAddressPoolResponseParams `json:"Response"` +} + +func (r *CreateAddressPoolResponse) 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 *CreateAddressPoolResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type CreateInstanceRequestParams struct { + // 业务域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` + + // CUSTOM: 自定义接入域名 + // SYSTEM: 系统接入域名 + AccessType *string `json:"AccessType,omitnil,omitempty" name:"AccessType"` + + // 解析生效时间 + GlobalTtl *uint64 `json:"GlobalTtl,omitnil,omitempty" name:"GlobalTtl"` + + // 套餐类型 + // FREE: 免费版 + // STANDARD:标准版 + // ULTIMATE:旗舰版 + PackageType *string `json:"PackageType,omitnil,omitempty" name:"PackageType"` + + // 实例名称 + InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` + + // 接入主域名 + AccessDomain *string `json:"AccessDomain,omitnil,omitempty" name:"AccessDomain"` + + // 接入子域名 + AccessSubDomain *string `json:"AccessSubDomain,omitnil,omitempty" name:"AccessSubDomain"` + + // 备注 + Remark *string `json:"Remark,omitnil,omitempty" name:"Remark"` + + // 套餐资源id + ResourceId *string `json:"ResourceId,omitnil,omitempty" name:"ResourceId"` +} + +type CreateInstanceRequest struct { + *tchttp.BaseRequest + + // 业务域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` + + // CUSTOM: 自定义接入域名 + // SYSTEM: 系统接入域名 + AccessType *string `json:"AccessType,omitnil,omitempty" name:"AccessType"` + + // 解析生效时间 + GlobalTtl *uint64 `json:"GlobalTtl,omitnil,omitempty" name:"GlobalTtl"` + + // 套餐类型 + // FREE: 免费版 + // STANDARD:标准版 + // ULTIMATE:旗舰版 + PackageType *string `json:"PackageType,omitnil,omitempty" name:"PackageType"` + + // 实例名称 + InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` + + // 接入主域名 + AccessDomain *string `json:"AccessDomain,omitnil,omitempty" name:"AccessDomain"` + + // 接入子域名 + AccessSubDomain *string `json:"AccessSubDomain,omitnil,omitempty" name:"AccessSubDomain"` + + // 备注 + Remark *string `json:"Remark,omitnil,omitempty" name:"Remark"` + + // 套餐资源id + ResourceId *string `json:"ResourceId,omitnil,omitempty" name:"ResourceId"` +} + +func (r *CreateInstanceRequest) 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 *CreateInstanceRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Domain") + delete(f, "AccessType") + delete(f, "GlobalTtl") + delete(f, "PackageType") + delete(f, "InstanceName") + delete(f, "AccessDomain") + delete(f, "AccessSubDomain") + delete(f, "Remark") + delete(f, "ResourceId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateInstanceRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type CreateInstanceResponseParams struct { + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type CreateInstanceResponse struct { + *tchttp.BaseResponse + Response *CreateInstanceResponseParams `json:"Response"` +} + +func (r *CreateInstanceResponse) 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 *CreateInstanceResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type CreateMonitorRequestParams struct { + // 监控器名称 + MonitorName *string `json:"MonitorName,omitnil,omitempty" name:"MonitorName"` + + // 探测协议,可选值 PING TCP HTTP HTTPS + CheckProtocol *string `json:"CheckProtocol,omitnil,omitempty" name:"CheckProtocol"` + + // 检查间隔(秒),可选值有15 60 120 300 + CheckInterval *uint64 `json:"CheckInterval,omitnil,omitempty" name:"CheckInterval"` + + // 超时时间,单位秒,可选值为2 3 5 10 + Timeout *uint64 `json:"Timeout,omitnil,omitempty" name:"Timeout"` + + // 重试次数,可选值为 0,1,2 + FailTimes *uint64 `json:"FailTimes,omitnil,omitempty" name:"FailTimes"` + + // 失败比例,取值为 20 30 40 50 60 70 80 100,默认值50 + FailRate *uint64 `json:"FailRate,omitnil,omitempty" name:"FailRate"` + + // 监控节点类型,可选值有AUTO INTERNAL OVERSEAS IPV6 ALL + DetectorStyle *string `json:"DetectorStyle,omitnil,omitempty" name:"DetectorStyle"` + + // 探测器组id列表以,分隔 + DetectorGroupIds []*uint64 `json:"DetectorGroupIds,omitnil,omitempty" name:"DetectorGroupIds"` + + // PING 包数目,当CheckProtocol=ping时必填,可选值有20 50 100 + PingNum *uint64 `json:"PingNum,omitnil,omitempty" name:"PingNum"` + + // 检查端口,可选值在1-65535之间 + TcpPort *uint64 `json:"TcpPort,omitnil,omitempty" name:"TcpPort"` + + // Host 设置,默认为业务域名 + Host *string `json:"Host,omitnil,omitempty" name:"Host"` + + // URL 路径,默认为“/” + Path *string `json:"Path,omitnil,omitempty" name:"Path"` + + // 返回错误码阈值, 可选值为 400 和 500, 默认值500 + ReturnCodeThreshold *uint64 `json:"ReturnCodeThreshold,omitnil,omitempty" name:"ReturnCodeThreshold"` + + // 跟随 3XX 重定向 ,不开启为 DISABLED, 开启为 ENABLED,默认不开启 + EnableRedirect *string `json:"EnableRedirect,omitnil,omitempty" name:"EnableRedirect"` + + // 启用 SNI,不开启为 DISABLED, 开启为 ENABLED,默认不开启 + EnableSni *string `json:"EnableSni,omitnil,omitempty" name:"EnableSni"` + + // 丢包率告警阈值,当CheckProtocol=ping时必填取值为10 30 50 80 90 100 + PacketLossRate *uint64 `json:"PacketLossRate,omitnil,omitempty" name:"PacketLossRate"` + + // 持续周期数,可选值1-5 + ContinuePeriod *uint64 `json:"ContinuePeriod,omitnil,omitempty" name:"ContinuePeriod"` +} + +type CreateMonitorRequest struct { + *tchttp.BaseRequest + + // 监控器名称 + MonitorName *string `json:"MonitorName,omitnil,omitempty" name:"MonitorName"` + + // 探测协议,可选值 PING TCP HTTP HTTPS + CheckProtocol *string `json:"CheckProtocol,omitnil,omitempty" name:"CheckProtocol"` + + // 检查间隔(秒),可选值有15 60 120 300 + CheckInterval *uint64 `json:"CheckInterval,omitnil,omitempty" name:"CheckInterval"` + + // 超时时间,单位秒,可选值为2 3 5 10 + Timeout *uint64 `json:"Timeout,omitnil,omitempty" name:"Timeout"` + + // 重试次数,可选值为 0,1,2 + FailTimes *uint64 `json:"FailTimes,omitnil,omitempty" name:"FailTimes"` + + // 失败比例,取值为 20 30 40 50 60 70 80 100,默认值50 + FailRate *uint64 `json:"FailRate,omitnil,omitempty" name:"FailRate"` + + // 监控节点类型,可选值有AUTO INTERNAL OVERSEAS IPV6 ALL + DetectorStyle *string `json:"DetectorStyle,omitnil,omitempty" name:"DetectorStyle"` + + // 探测器组id列表以,分隔 + DetectorGroupIds []*uint64 `json:"DetectorGroupIds,omitnil,omitempty" name:"DetectorGroupIds"` + + // PING 包数目,当CheckProtocol=ping时必填,可选值有20 50 100 + PingNum *uint64 `json:"PingNum,omitnil,omitempty" name:"PingNum"` + + // 检查端口,可选值在1-65535之间 + TcpPort *uint64 `json:"TcpPort,omitnil,omitempty" name:"TcpPort"` + + // Host 设置,默认为业务域名 + Host *string `json:"Host,omitnil,omitempty" name:"Host"` + + // URL 路径,默认为“/” + Path *string `json:"Path,omitnil,omitempty" name:"Path"` + + // 返回错误码阈值, 可选值为 400 和 500, 默认值500 + ReturnCodeThreshold *uint64 `json:"ReturnCodeThreshold,omitnil,omitempty" name:"ReturnCodeThreshold"` + + // 跟随 3XX 重定向 ,不开启为 DISABLED, 开启为 ENABLED,默认不开启 + EnableRedirect *string `json:"EnableRedirect,omitnil,omitempty" name:"EnableRedirect"` + + // 启用 SNI,不开启为 DISABLED, 开启为 ENABLED,默认不开启 + EnableSni *string `json:"EnableSni,omitnil,omitempty" name:"EnableSni"` + + // 丢包率告警阈值,当CheckProtocol=ping时必填取值为10 30 50 80 90 100 + PacketLossRate *uint64 `json:"PacketLossRate,omitnil,omitempty" name:"PacketLossRate"` + + // 持续周期数,可选值1-5 + ContinuePeriod *uint64 `json:"ContinuePeriod,omitnil,omitempty" name:"ContinuePeriod"` +} + +func (r *CreateMonitorRequest) 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 *CreateMonitorRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "MonitorName") + delete(f, "CheckProtocol") + delete(f, "CheckInterval") + delete(f, "Timeout") + delete(f, "FailTimes") + delete(f, "FailRate") + delete(f, "DetectorStyle") + delete(f, "DetectorGroupIds") + delete(f, "PingNum") + delete(f, "TcpPort") + delete(f, "Host") + delete(f, "Path") + delete(f, "ReturnCodeThreshold") + delete(f, "EnableRedirect") + delete(f, "EnableSni") + delete(f, "PacketLossRate") + delete(f, "ContinuePeriod") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateMonitorRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type CreateMonitorResponseParams struct { + // 监控器id + MonitorId *uint64 `json:"MonitorId,omitnil,omitempty" name:"MonitorId"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type CreateMonitorResponse struct { + *tchttp.BaseResponse + Response *CreateMonitorResponseParams `json:"Response"` +} + +func (r *CreateMonitorResponse) 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 *CreateMonitorResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type CreateStrategyRequestParams struct { + // 实例id + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // 策略名称,不允许重复 + StrategyName *string `json:"StrategyName,omitnil,omitempty" name:"StrategyName"` + + // 解析线路 + Source []*Source `json:"Source,omitnil,omitempty" name:"Source"` + + // 主力地址池集合,最多允许配置四级 + MainAddressPoolSet []*MainAddressPool `json:"MainAddressPoolSet,omitnil,omitempty" name:"MainAddressPoolSet"` + + // 兜底地址池集合,只允许配置一级,且地址池数量为1 + FallbackAddressPoolSet []*MainAddressPool `json:"FallbackAddressPoolSet,omitnil,omitempty" name:"FallbackAddressPoolSet"` + + // 是否开启策略强制保留默认线路 disabled, enabled,默认不开启且只有一个策略能开启 + KeepDomainRecords *string `json:"KeepDomainRecords,omitnil,omitempty" name:"KeepDomainRecords"` + + // 策略调度模式:AUTO默认切换;STOP仅暂停不切换 + SwitchPoolType *string `json:"SwitchPoolType,omitnil,omitempty" name:"SwitchPoolType"` +} + +type CreateStrategyRequest struct { + *tchttp.BaseRequest + + // 实例id + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // 策略名称,不允许重复 + StrategyName *string `json:"StrategyName,omitnil,omitempty" name:"StrategyName"` + + // 解析线路 + Source []*Source `json:"Source,omitnil,omitempty" name:"Source"` + + // 主力地址池集合,最多允许配置四级 + MainAddressPoolSet []*MainAddressPool `json:"MainAddressPoolSet,omitnil,omitempty" name:"MainAddressPoolSet"` + + // 兜底地址池集合,只允许配置一级,且地址池数量为1 + FallbackAddressPoolSet []*MainAddressPool `json:"FallbackAddressPoolSet,omitnil,omitempty" name:"FallbackAddressPoolSet"` + + // 是否开启策略强制保留默认线路 disabled, enabled,默认不开启且只有一个策略能开启 + KeepDomainRecords *string `json:"KeepDomainRecords,omitnil,omitempty" name:"KeepDomainRecords"` + + // 策略调度模式:AUTO默认切换;STOP仅暂停不切换 + SwitchPoolType *string `json:"SwitchPoolType,omitnil,omitempty" name:"SwitchPoolType"` +} + +func (r *CreateStrategyRequest) 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 *CreateStrategyRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceId") + delete(f, "StrategyName") + delete(f, "Source") + delete(f, "MainAddressPoolSet") + delete(f, "FallbackAddressPoolSet") + delete(f, "KeepDomainRecords") + delete(f, "SwitchPoolType") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateStrategyRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type CreateStrategyResponseParams struct { + // 新增策略id + StrategyId *int64 `json:"StrategyId,omitnil,omitempty" name:"StrategyId"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type CreateStrategyResponse struct { + *tchttp.BaseResponse + Response *CreateStrategyResponseParams `json:"Response"` +} + +func (r *CreateStrategyResponse) 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 *CreateStrategyResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DeleteAddressPoolRequestParams struct { + // 地址池id + PoolId *uint64 `json:"PoolId,omitnil,omitempty" name:"PoolId"` +} + +type DeleteAddressPoolRequest struct { + *tchttp.BaseRequest + + // 地址池id + PoolId *uint64 `json:"PoolId,omitnil,omitempty" name:"PoolId"` +} + +func (r *DeleteAddressPoolRequest) 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 *DeleteAddressPoolRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "PoolId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteAddressPoolRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DeleteAddressPoolResponseParams struct { + // 是否成功 + Msg *string `json:"Msg,omitnil,omitempty" name:"Msg"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DeleteAddressPoolResponse struct { + *tchttp.BaseResponse + Response *DeleteAddressPoolResponseParams `json:"Response"` +} + +func (r *DeleteAddressPoolResponse) 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 *DeleteAddressPoolResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DeleteMonitorRequestParams struct { + // 监控器id + MonitorId *uint64 `json:"MonitorId,omitnil,omitempty" name:"MonitorId"` +} + +type DeleteMonitorRequest struct { + *tchttp.BaseRequest + + // 监控器id + MonitorId *uint64 `json:"MonitorId,omitnil,omitempty" name:"MonitorId"` +} + +func (r *DeleteMonitorRequest) 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 *DeleteMonitorRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "MonitorId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteMonitorRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DeleteMonitorResponseParams struct { + // 成功返回 + Msg *string `json:"Msg,omitnil,omitempty" name:"Msg"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DeleteMonitorResponse struct { + *tchttp.BaseResponse + Response *DeleteMonitorResponseParams `json:"Response"` +} + +func (r *DeleteMonitorResponse) 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 *DeleteMonitorResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DeleteStrategyRequestParams struct { + // 策略id + StrategyId *uint64 `json:"StrategyId,omitnil,omitempty" name:"StrategyId"` + + // 实例id + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` +} + +type DeleteStrategyRequest struct { + *tchttp.BaseRequest + + // 策略id + StrategyId *uint64 `json:"StrategyId,omitnil,omitempty" name:"StrategyId"` + + // 实例id + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` +} + +func (r *DeleteStrategyRequest) 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 *DeleteStrategyRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "StrategyId") + delete(f, "InstanceId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteStrategyRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DeleteStrategyResponseParams struct { + // 是否成功 + Msg *string `json:"Msg,omitnil,omitempty" name:"Msg"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DeleteStrategyResponse struct { + *tchttp.BaseResponse + Response *DeleteStrategyResponseParams `json:"Response"` +} + +func (r *DeleteStrategyResponse) 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 *DeleteStrategyResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeAddressLocationRequestParams struct { + // 地址数组 + Address []*string `json:"Address,omitnil,omitempty" name:"Address"` +} + +type DescribeAddressLocationRequest struct { + *tchttp.BaseRequest + + // 地址数组 + Address []*string `json:"Address,omitnil,omitempty" name:"Address"` +} + +func (r *DescribeAddressLocationRequest) 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 *DescribeAddressLocationRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Address") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAddressLocationRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeAddressLocationResponseParams struct { + // 所属地域 + AddressLocation []*AddressLocation `json:"AddressLocation,omitnil,omitempty" name:"AddressLocation"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeAddressLocationResponse struct { + *tchttp.BaseResponse + Response *DescribeAddressLocationResponseParams `json:"Response"` +} + +func (r *DescribeAddressLocationResponse) 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 *DescribeAddressLocationResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeAddressPoolDetailRequestParams struct { + // 地址池id + PoolId *int64 `json:"PoolId,omitnil,omitempty" name:"PoolId"` +} + +type DescribeAddressPoolDetailRequest struct { + *tchttp.BaseRequest + + // 地址池id + PoolId *int64 `json:"PoolId,omitnil,omitempty" name:"PoolId"` +} + +func (r *DescribeAddressPoolDetailRequest) 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 *DescribeAddressPoolDetailRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "PoolId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAddressPoolDetailRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeAddressPoolDetailResponseParams struct { + // 资源组详情描述 + AddressPool *AddressPoolDetail `json:"AddressPool,omitnil,omitempty" name:"AddressPool"` + + // 资源组中的资源列表 + AddressSet []*Address `json:"AddressSet,omitnil,omitempty" name:"AddressSet"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeAddressPoolDetailResponse struct { + *tchttp.BaseResponse + Response *DescribeAddressPoolDetailResponseParams `json:"Response"` +} + +func (r *DescribeAddressPoolDetailResponse) 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 *DescribeAddressPoolDetailResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeAddressPoolListRequestParams struct { + // 告警过滤条件:PoolName:地址池名称;MonitorId:监控器id + Filters []*ResourceFilter `json:"Filters,omitnil,omitempty" name:"Filters"` + + // 页数 + Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"` + + // 每页数 + Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` +} + +type DescribeAddressPoolListRequest struct { + *tchttp.BaseRequest + + // 告警过滤条件:PoolName:地址池名称;MonitorId:监控器id + Filters []*ResourceFilter `json:"Filters,omitnil,omitempty" name:"Filters"` + + // 页数 + Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"` + + // 每页数 + Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` +} + +func (r *DescribeAddressPoolListRequest) 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 *DescribeAddressPoolListRequest) 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, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAddressPoolListRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeAddressPoolListResponseParams struct { + // 资源组列表 + AddressPoolSet []*AddressPool `json:"AddressPoolSet,omitnil,omitempty" name:"AddressPoolSet"` + + // 总数 + TotalCount *uint64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeAddressPoolListResponse struct { + *tchttp.BaseResponse + Response *DescribeAddressPoolListResponseParams `json:"Response"` +} + +func (r *DescribeAddressPoolListResponse) 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 *DescribeAddressPoolListResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeDetectPackageDetailRequestParams struct { + // 资源id + ResourceId *string `json:"ResourceId,omitnil,omitempty" name:"ResourceId"` +} + +type DescribeDetectPackageDetailRequest struct { + *tchttp.BaseRequest + + // 资源id + ResourceId *string `json:"ResourceId,omitnil,omitempty" name:"ResourceId"` +} + +func (r *DescribeDetectPackageDetailRequest) 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 *DescribeDetectPackageDetailRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ResourceId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDetectPackageDetailRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeDetectPackageDetailResponseParams struct { + // 资源id + ResourceId *string `json:"ResourceId,omitnil,omitempty" name:"ResourceId"` + + // 资源类型 TASK 探测任务 + ResourceType *string `json:"ResourceType,omitnil,omitempty" name:"ResourceType"` + + // 额度 + Quota *uint64 `json:"Quota,omitnil,omitempty" name:"Quota"` + + // 过期时间 + CurrentDeadline *string `json:"CurrentDeadline,omitnil,omitempty" name:"CurrentDeadline"` + + // 创建时间 + CreateTime *string `json:"CreateTime,omitnil,omitempty" name:"CreateTime"` + + // 是否过期 + IsExpire *uint64 `json:"IsExpire,omitnil,omitempty" name:"IsExpire"` + + // 状态 ENABLED: 正常 ISOLATED: 隔离 DESTROYED:销毁 REFUNDED:已退款 + Status *string `json:"Status,omitnil,omitempty" name:"Status"` + + // 是否自动续费:0否1是 + AutoRenewFlag *uint64 `json:"AutoRenewFlag,omitnil,omitempty" name:"AutoRenewFlag"` + + // 备注 + Remark *string `json:"Remark,omitnil,omitempty" name:"Remark"` + + // 计费项 + CostItemList []*CostItem `json:"CostItemList,omitnil,omitempty" name:"CostItemList"` + + // 使用数量 + UsedNum *uint64 `json:"UsedNum,omitnil,omitempty" name:"UsedNum"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeDetectPackageDetailResponse struct { + *tchttp.BaseResponse + Response *DescribeDetectPackageDetailResponseParams `json:"Response"` +} + +func (r *DescribeDetectPackageDetailResponse) 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 *DescribeDetectPackageDetailResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeDetectTaskPackageListRequestParams struct { + // 每页条数 + Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` + + // 探测任务过滤条件:ResourceId 探测任务的资源id,PeriodStart 最小过期时间,PeriodEnd 最大过期时间 + Filters []*ResourceFilter `json:"Filters,omitnil,omitempty" name:"Filters"` +} + +type DescribeDetectTaskPackageListRequest struct { + *tchttp.BaseRequest + + // 每页条数 + Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` + + // 探测任务过滤条件:ResourceId 探测任务的资源id,PeriodStart 最小过期时间,PeriodEnd 最大过期时间 + Filters []*ResourceFilter `json:"Filters,omitnil,omitempty" name:"Filters"` +} + +func (r *DescribeDetectTaskPackageListRequest) 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 *DescribeDetectTaskPackageListRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Limit") + delete(f, "Filters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDetectTaskPackageListRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeDetectTaskPackageListResponseParams struct { + // 总数 + TotalCount *uint64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"` + + // 探测任务套餐列表 + TaskPackageSet []*DetectTaskPackage `json:"TaskPackageSet,omitnil,omitempty" name:"TaskPackageSet"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeDetectTaskPackageListResponse struct { + *tchttp.BaseResponse + Response *DescribeDetectTaskPackageListResponseParams `json:"Response"` +} + +func (r *DescribeDetectTaskPackageListResponse) 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 *DescribeDetectTaskPackageListResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeDetectorsRequestParams struct { + +} + +type DescribeDetectorsRequest struct { + *tchttp.BaseRequest + +} + +func (r *DescribeDetectorsRequest) 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 *DescribeDetectorsRequest) 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", "DescribeDetectorsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeDetectorsResponseParams struct { + // 探测器组列表 + DetectorGroupSet []*DetectorGroup `json:"DetectorGroupSet,omitnil,omitempty" name:"DetectorGroupSet"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeDetectorsResponse struct { + *tchttp.BaseResponse + Response *DescribeDetectorsResponseParams `json:"Response"` +} + +func (r *DescribeDetectorsResponse) 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 *DescribeDetectorsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeDnsLineListRequestParams struct { + // 实例id + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` +} + +type DescribeDnsLineListRequest struct { + *tchttp.BaseRequest + + // 实例id + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` +} + +func (r *DescribeDnsLineListRequest) 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 *DescribeDnsLineListRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDnsLineListRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeDnsLineListResponseParams struct { + // 地址池列表 + DnsLineSet []*GroupLine `json:"DnsLineSet,omitnil,omitempty" name:"DnsLineSet"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeDnsLineListResponse struct { + *tchttp.BaseResponse + Response *DescribeDnsLineListResponseParams `json:"Response"` +} + +func (r *DescribeDnsLineListResponse) 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 *DescribeDnsLineListResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeInstanceDetailRequestParams struct { + +} + +type DescribeInstanceDetailRequest struct { + *tchttp.BaseRequest + +} + +func (r *DescribeInstanceDetailRequest) 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 *DescribeInstanceDetailRequest) 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", "DescribeInstanceDetailRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeInstanceDetailResponseParams struct { + // 实例详情 + Instance *InstanceDetail `json:"Instance,omitnil,omitempty" name:"Instance"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeInstanceDetailResponse struct { + *tchttp.BaseResponse + Response *DescribeInstanceDetailResponseParams `json:"Response"` +} + +func (r *DescribeInstanceDetailResponse) 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 *DescribeInstanceDetailResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeInstanceListRequestParams struct { + // 分页偏移量 + Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"` + + // 分页数 + Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` + + // Name: "实例名称" 模糊查询Domain: "域名" 模糊查询MonitorId: "监控器 id" PoolId: "地址池id", AccessDomain接入主域名 + Filters []*ResourceFilter `json:"Filters,omitnil,omitempty" name:"Filters"` +} + +type DescribeInstanceListRequest struct { + *tchttp.BaseRequest + + // 分页偏移量 + Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"` + + // 分页数 + Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` + + // Name: "实例名称" 模糊查询Domain: "域名" 模糊查询MonitorId: "监控器 id" PoolId: "地址池id", AccessDomain接入主域名 + Filters []*ResourceFilter `json:"Filters,omitnil,omitempty" name:"Filters"` +} + +func (r *DescribeInstanceListRequest) 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 *DescribeInstanceListRequest) 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") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeInstanceListRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeInstanceListResponseParams struct { + // 实例列表 + InstanceSet []*Instance `json:"InstanceSet,omitnil,omitempty" name:"InstanceSet"` + + // 列表总数 + TotalCount *uint64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"` + + // 是否支持系统域名接入:true支持;false不支持 + SystemAccessEnabled *bool `json:"SystemAccessEnabled,omitnil,omitempty" name:"SystemAccessEnabled"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeInstanceListResponse struct { + *tchttp.BaseResponse + Response *DescribeInstanceListResponseParams `json:"Response"` +} + +func (r *DescribeInstanceListResponse) 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 *DescribeInstanceListResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeInstancePackageListRequestParams struct { + // 每页条数 + Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` + + // InstanceId实例Id,InstanceName实例名称,ResourceId套餐Id,PackageType套餐类型 + Filters []*ResourceFilter `json:"Filters,omitnil,omitempty" name:"Filters"` + + // 是否使用:0未使用1已使用 + IsUsed *uint64 `json:"IsUsed,omitnil,omitempty" name:"IsUsed"` +} + +type DescribeInstancePackageListRequest struct { + *tchttp.BaseRequest + + // 每页条数 + Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` + + // InstanceId实例Id,InstanceName实例名称,ResourceId套餐Id,PackageType套餐类型 + Filters []*ResourceFilter `json:"Filters,omitnil,omitempty" name:"Filters"` + + // 是否使用:0未使用1已使用 + IsUsed *uint64 `json:"IsUsed,omitnil,omitempty" name:"IsUsed"` +} + +func (r *DescribeInstancePackageListRequest) 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 *DescribeInstancePackageListRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Limit") + delete(f, "Filters") + delete(f, "IsUsed") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeInstancePackageListRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeInstancePackageListResponseParams struct { + // 总数 + TotalCount *uint64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"` + + // 实例套餐列表 + InstanceSet []*InstancePackage `json:"InstanceSet,omitnil,omitempty" name:"InstanceSet"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeInstancePackageListResponse struct { + *tchttp.BaseResponse + Response *DescribeInstancePackageListResponseParams `json:"Response"` +} + +func (r *DescribeInstancePackageListResponse) 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 *DescribeInstancePackageListResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeMonitorDetailRequestParams struct { + // 监控器id + MonitorId *uint64 `json:"MonitorId,omitnil,omitempty" name:"MonitorId"` +} + +type DescribeMonitorDetailRequest struct { + *tchttp.BaseRequest + + // 监控器id + MonitorId *uint64 `json:"MonitorId,omitnil,omitempty" name:"MonitorId"` +} + +func (r *DescribeMonitorDetailRequest) 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 *DescribeMonitorDetailRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "MonitorId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeMonitorDetailRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeMonitorDetailResponseParams struct { + // 探测规则 + MonitorDetail *MonitorDetail `json:"MonitorDetail,omitnil,omitempty" name:"MonitorDetail"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeMonitorDetailResponse struct { + *tchttp.BaseResponse + Response *DescribeMonitorDetailResponseParams `json:"Response"` +} + +func (r *DescribeMonitorDetailResponse) 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 *DescribeMonitorDetailResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeMonitorsRequestParams struct { + // 分页,偏移值 + Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"` + + // 分页,当前分页记录数 + Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` + + // 是否查探测次数0否1是 + IsDetectNum *uint64 `json:"IsDetectNum,omitnil,omitempty" name:"IsDetectNum"` +} + +type DescribeMonitorsRequest struct { + *tchttp.BaseRequest + + // 分页,偏移值 + Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"` + + // 分页,当前分页记录数 + Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` + + // 是否查探测次数0否1是 + IsDetectNum *uint64 `json:"IsDetectNum,omitnil,omitempty" name:"IsDetectNum"` +} + +func (r *DescribeMonitorsRequest) 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 *DescribeMonitorsRequest) 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, "IsDetectNum") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeMonitorsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeMonitorsResponseParams struct { + // 监控器列表 + MonitorDataSet []*MonitorDetail `json:"MonitorDataSet,omitnil,omitempty" name:"MonitorDataSet"` + + // 数量 + TotalCount *uint64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeMonitorsResponse struct { + *tchttp.BaseResponse + Response *DescribeMonitorsResponseParams `json:"Response"` +} + +func (r *DescribeMonitorsResponse) 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 *DescribeMonitorsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeQuotasRequestParams struct { + // 接入域名 + AccessDomain *string `json:"AccessDomain,omitnil,omitempty" name:"AccessDomain"` +} + +type DescribeQuotasRequest struct { + *tchttp.BaseRequest + + // 接入域名 + AccessDomain *string `json:"AccessDomain,omitnil,omitempty" name:"AccessDomain"` +} + +func (r *DescribeQuotasRequest) 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 *DescribeQuotasRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "AccessDomain") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeQuotasRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeQuotasResponseParams struct { + // 配额id + Quotas *Quota `json:"Quotas,omitnil,omitempty" name:"Quotas"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeQuotasResponse struct { + *tchttp.BaseResponse + Response *DescribeQuotasResponseParams `json:"Response"` +} + +func (r *DescribeQuotasResponse) 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 *DescribeQuotasResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeStrategyDetailRequestParams struct { + // 实例id + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // 策略 id + StrategyId *int64 `json:"StrategyId,omitnil,omitempty" name:"StrategyId"` +} + +type DescribeStrategyDetailRequest struct { + *tchttp.BaseRequest + + // 实例id + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // 策略 id + StrategyId *int64 `json:"StrategyId,omitnil,omitempty" name:"StrategyId"` +} + +func (r *DescribeStrategyDetailRequest) 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 *DescribeStrategyDetailRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceId") + delete(f, "StrategyId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeStrategyDetailRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeStrategyDetailResponseParams struct { + // 策略详情 + StrategyDetail *StrategyDetail `json:"StrategyDetail,omitnil,omitempty" name:"StrategyDetail"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeStrategyDetailResponse struct { + *tchttp.BaseResponse + Response *DescribeStrategyDetailResponseParams `json:"Response"` +} + +func (r *DescribeStrategyDetailResponse) 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 *DescribeStrategyDetailResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeStrategyListRequestParams struct { + // 实例 id + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // 偏移量 + Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"` + + // 每页条数 + Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` + + // 策略过滤条件:StrategyName:策略名称 + Filters []*ResourceFilter `json:"Filters,omitnil,omitempty" name:"Filters"` +} + +type DescribeStrategyListRequest struct { + *tchttp.BaseRequest + + // 实例 id + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // 偏移量 + Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"` + + // 每页条数 + Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"` + + // 策略过滤条件:StrategyName:策略名称 + Filters []*ResourceFilter `json:"Filters,omitnil,omitempty" name:"Filters"` +} + +func (r *DescribeStrategyListRequest) 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 *DescribeStrategyListRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceId") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "Filters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeStrategyListRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeStrategyListResponseParams struct { + // 策略列表 + StrategySet []*Strategy `json:"StrategySet,omitnil,omitempty" name:"StrategySet"` + + // 总数 + TotalCount *uint64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type DescribeStrategyListResponse struct { + *tchttp.BaseResponse + Response *DescribeStrategyListResponseParams `json:"Response"` +} + +func (r *DescribeStrategyListResponse) 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 *DescribeStrategyListResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DetectTaskPackage struct { + // 资源id + ResourceId *string `json:"ResourceId,omitnil,omitempty" name:"ResourceId"` + + // 资源类型 + // TASK 探测任务 + ResourceType *string `json:"ResourceType,omitnil,omitempty" name:"ResourceType"` + + // 额度 + Quota *uint64 `json:"Quota,omitnil,omitempty" name:"Quota"` + + // 套餐过期时间 + CurrentDeadline *string `json:"CurrentDeadline,omitnil,omitempty" name:"CurrentDeadline"` + + // 套餐创建时间 + CreateTime *string `json:"CreateTime,omitnil,omitempty" name:"CreateTime"` + + // 是否过期0否1是 + IsExpire *uint64 `json:"IsExpire,omitnil,omitempty" name:"IsExpire"` + + // 状态 + // ENABLED: 正常 + // ISOLATED: 隔离 + // DESTROYED:销毁 + // REFUNDED:已退款 + Status *string `json:"Status,omitnil,omitempty" name:"Status"` + + // 是否自动续费0不1是 + AutoRenewFlag *uint64 `json:"AutoRenewFlag,omitnil,omitempty" name:"AutoRenewFlag"` + + // 备注 + Remark *string `json:"Remark,omitnil,omitempty" name:"Remark"` + + // 计费项 + CostItemList []*CostItem `json:"CostItemList,omitnil,omitempty" name:"CostItemList"` + + // 探测任务类型:100系统设定;200计费;300管理系统;110D监控迁移的免费任务;120容灾切换任务 + // 注意:此字段可能返回 null,表示取不到有效值。 + Group *uint64 `json:"Group,omitnil,omitempty" name:"Group"` +} + +type DetectorGroup struct { + // 线路组id GroupLineId + Gid *uint64 `json:"Gid,omitnil,omitempty" name:"Gid"` + + // bgp, international, isp + GroupType *string `json:"GroupType,omitnil,omitempty" name:"GroupType"` + + // 组名 + GroupName *string `json:"GroupName,omitnil,omitempty" name:"GroupName"` + + // ipv4, ipv6 + InternetFamily *string `json:"InternetFamily,omitnil,omitempty" name:"InternetFamily"` + + // 支持的套餐类型 + // 注意:此字段可能返回 null,表示取不到有效值。 + PackageSet []*string `json:"PackageSet,omitnil,omitempty" name:"PackageSet"` +} + +type GroupLine struct { + // 分组线路id + DnsLineId *uint64 `json:"DnsLineId,omitnil,omitempty" name:"DnsLineId"` + + // 父节点 0为根节点 + Parent *uint64 `json:"Parent,omitnil,omitempty" name:"Parent"` + + // 线路名 + LineName *string `json:"LineName,omitnil,omitempty" name:"LineName"` + + // 10=9 DNSPod 线路 id + LineId *string `json:"LineId,omitnil,omitempty" name:"LineId"` + + // 是否已使用过 + Useful *bool `json:"Useful,omitnil,omitempty" name:"Useful"` + + // 0为未使用 + SubGroup *uint64 `json:"SubGroup,omitnil,omitempty" name:"SubGroup"` + + // 权限标识 + LinePackage *uint64 `json:"LinePackage,omitnil,omitempty" name:"LinePackage"` + + // 1 + Weight *uint64 `json:"Weight,omitnil,omitempty" name:"Weight"` +} + +type Instance struct { + // 实例id + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // 实例名 + InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` + + // 资源 id + ResourceId *string `json:"ResourceId,omitnil,omitempty" name:"ResourceId"` + + // 业务域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` + + // Cname域名接入方式 + // CUSTOM: 自定义接入域名 + // SYSTEM: 系统接入域名 + AccessType *string `json:"AccessType,omitnil,omitempty" name:"AccessType"` + + // 接入域名 + AccessDomain *string `json:"AccessDomain,omitnil,omitempty" name:"AccessDomain"` + + // 接入子域名 + AccessSubDomain *string `json:"AccessSubDomain,omitnil,omitempty" name:"AccessSubDomain"` + + // 全局记录过期时间 + GlobalTtl *int64 `json:"GlobalTtl,omitnil,omitempty" name:"GlobalTtl"` + + // 套餐类型 + // FREE: 免费版 + // STANDARD:标准版 + // ULTIMATE:旗舰版 + PackageType *string `json:"PackageType,omitnil,omitempty" name:"PackageType"` + + // 实例运行状态 + // NORMAL: 健康 + // FAULTY: 有风险 + // DOWN: 宕机 + // UNKNOWN: 未知 + WorkingStatus *string `json:"WorkingStatus,omitnil,omitempty" name:"WorkingStatus"` + + // 实例状态,ENABLED: 正常,DISABLED: 禁用 + Status *string `json:"Status,omitnil,omitempty" name:"Status"` + + // 是否cname接入:true已接入;false未接入 + IsCnameConfigured *bool `json:"IsCnameConfigured,omitnil,omitempty" name:"IsCnameConfigured"` + + // 备注 + Remark *string `json:"Remark,omitnil,omitempty" name:"Remark"` + + // 策略数量 + StrategyNum *int64 `json:"StrategyNum,omitnil,omitempty" name:"StrategyNum"` + + // 绑定地址池个数 + AddressPoolNum *int64 `json:"AddressPoolNum,omitnil,omitempty" name:"AddressPoolNum"` + + // 绑定监控器数量 + MonitorNum *int64 `json:"MonitorNum,omitnil,omitempty" name:"MonitorNum"` + + // 地址池id + PoolId *uint64 `json:"PoolId,omitnil,omitempty" name:"PoolId"` + + // 地址池名称 + PoolName *string `json:"PoolName,omitnil,omitempty" name:"PoolName"` + + // 实例创建时间 + CreatedOn *string `json:"CreatedOn,omitnil,omitempty" name:"CreatedOn"` + + // 实例更新时间 + UpdatedOn *string `json:"UpdatedOn,omitnil,omitempty" name:"UpdatedOn"` +} + +type InstanceConfig struct { + // 实例名称 + InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` + + // 业务域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` + + // CUSTOM: 自定义接入域名,SYSTEM: 系统接入域名 + AccessType *string `json:"AccessType,omitnil,omitempty" name:"AccessType"` + + // 备注 + Remark *string `json:"Remark,omitnil,omitempty" name:"Remark"` + + // 全局记录过期时间 + GlobalTtl *int64 `json:"GlobalTtl,omitnil,omitempty" name:"GlobalTtl"` + + // 接入主域名 + AccessDomain *string `json:"AccessDomain,omitnil,omitempty" name:"AccessDomain"` + + // 接入子域名 + AccessSubDomain *string `json:"AccessSubDomain,omitnil,omitempty" name:"AccessSubDomain"` +} + +type InstanceDetail struct { + // 实例id + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // 实例名 + InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` + + // 业务域名 + Domain *string `json:"Domain,omitnil,omitempty" name:"Domain"` + + // Cname域名接入方式 + // CUSTOM: 自定义接入域名 + // SYSTEM: 系统接入域名 + AccessType *string `json:"AccessType,omitnil,omitempty" name:"AccessType"` + + // 接入子域名 + AccessSubDomain *string `json:"AccessSubDomain,omitnil,omitempty" name:"AccessSubDomain"` + + // 接入域名 + AccessDomain *string `json:"AccessDomain,omitnil,omitempty" name:"AccessDomain"` + + // 解析生效时间 + GlobalTtl *uint64 `json:"GlobalTtl,omitnil,omitempty" name:"GlobalTtl"` + + // 套餐类型 + // FREE: 免费版 + // STANDARD:标准版 + // ULTIMATE:旗舰版 + PackageType *string `json:"PackageType,omitnil,omitempty" name:"PackageType"` + + // 实例运行状态 + // NORMAL: 健康 + // FAULTY: 有风险 + // DOWN: 宕机 + // UNKNOWN: 未知 + WorkingStatus *string `json:"WorkingStatus,omitnil,omitempty" name:"WorkingStatus"` + + // 实例状态,ENABLED: 正常;DISABLED: 禁用 + Status *string `json:"Status,omitnil,omitempty" name:"Status"` + + // cname是否接入:true已接入;false未接入 + IsCnameConfigured *bool `json:"IsCnameConfigured,omitnil,omitempty" name:"IsCnameConfigured"` + + // 备注 + Remark *string `json:"Remark,omitnil,omitempty" name:"Remark"` + + // 策略数量 + StrategyNum *int64 `json:"StrategyNum,omitnil,omitempty" name:"StrategyNum"` + + // 绑定地址池个数 + AddressPoolNum *int64 `json:"AddressPoolNum,omitnil,omitempty" name:"AddressPoolNum"` + + // 绑定监控器数量 + MonitorNum *int64 `json:"MonitorNum,omitnil,omitempty" name:"MonitorNum"` + + // 实例绑定套餐资源id + ResourceId *string `json:"ResourceId,omitnil,omitempty" name:"ResourceId"` + + // 订阅事件列表 + NotifyEventSet []*string `json:"NotifyEventSet,omitnil,omitempty" name:"NotifyEventSet"` + + // 实例创建时间 + CreatedOn *string `json:"CreatedOn,omitnil,omitempty" name:"CreatedOn"` + + // 实例更新时间 + UpdatedOn *string `json:"UpdatedOn,omitnil,omitempty" name:"UpdatedOn"` +} + +type InstanceInfo struct { + // 实例id + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // 实例名称 + InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` +} + +type InstancePackage struct { + // 实例套餐资源id + // 注意:此字段可能返回 null,表示取不到有效值。 + ResourceId *string `json:"ResourceId,omitnil,omitempty" name:"ResourceId"` + + // 实例id + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // 实例名 + InstanceName *string `json:"InstanceName,omitnil,omitempty" name:"InstanceName"` + + // 套餐类型 + // FREE: 免费版 + // STANDARD:标准版 + // ULTIMATE:旗舰版 + PackageType *string `json:"PackageType,omitnil,omitempty" name:"PackageType"` + + // 套餐过期时间 + CurrentDeadline *string `json:"CurrentDeadline,omitnil,omitempty" name:"CurrentDeadline"` + + // 套餐创建时间 + CreateTime *string `json:"CreateTime,omitnil,omitempty" name:"CreateTime"` + + // 是否过期0否1是 + IsExpire *uint64 `json:"IsExpire,omitnil,omitempty" name:"IsExpire"` + + // 实例状态 + // ENABLED: 正常 + // DISABLED: 禁用 + Status *string `json:"Status,omitnil,omitempty" name:"Status"` + + // 是否自动续费0不1是 + AutoRenewFlag *uint64 `json:"AutoRenewFlag,omitnil,omitempty" name:"AutoRenewFlag"` + + // 备注 + Remark *string `json:"Remark,omitnil,omitempty" name:"Remark"` + + // 计费项 + CostItemList []*CostItem `json:"CostItemList,omitnil,omitempty" name:"CostItemList"` + + // 最小检查间隔时间s + MinCheckInterval *uint64 `json:"MinCheckInterval,omitnil,omitempty" name:"MinCheckInterval"` + + // 最小TTL s + MinGlobalTtl *uint64 `json:"MinGlobalTtl,omitnil,omitempty" name:"MinGlobalTtl"` + + // 流量策略类型:ALL返回全部,WEIGHT权重 + TrafficStrategy []*string `json:"TrafficStrategy,omitnil,omitempty" name:"TrafficStrategy"` + + // 策略类型:LOCATION按地理位置调度,DELAY按延迟调度 + ScheduleStrategy []*string `json:"ScheduleStrategy,omitnil,omitempty" name:"ScheduleStrategy"` +} + +type MainAddressPool struct { + // 集合中的地址池id与权重,数组 + // 注意:此字段可能返回 null,表示取不到有效值。 + AddressPools []*MainPoolWeight `json:"AddressPools,omitnil,omitempty" name:"AddressPools"` + + // 地址池集合id + MainAddressPoolId *uint64 `json:"MainAddressPoolId,omitnil,omitempty" name:"MainAddressPoolId"` + + // 切换阀值,不能大于主力集合内地址总数 + MinSurviveNum *uint64 `json:"MinSurviveNum,omitnil,omitempty" name:"MinSurviveNum"` + + // 切换策略:ALL解析所有地址;WEIGHT:负载均衡。当为ALL时,解析地址的权重值为1;当为WEIGHT时;权重为地址池权重*地址权重 + TrafficStrategy *string `json:"TrafficStrategy,omitnil,omitempty" name:"TrafficStrategy"` +} + +type MainPoolWeight struct { + // 地址池id + PoolId *uint64 `json:"PoolId,omitnil,omitempty" name:"PoolId"` + + // 权重 + // 注意:此字段可能返回 null,表示取不到有效值。 + Weight *uint64 `json:"Weight,omitnil,omitempty" name:"Weight"` +} + +// Predefined struct for user +type ModifyAddressPoolRequestParams struct { + // 地址池id + PoolId *uint64 `json:"PoolId,omitnil,omitempty" name:"PoolId"` + + // 地址池名称,不允许重复 + PoolName *string `json:"PoolName,omitnil,omitempty" name:"PoolName"` + + // 流量策略: WEIGHT负载均衡,ALL解析全部 + TrafficStrategy *string `json:"TrafficStrategy,omitnil,omitempty" name:"TrafficStrategy"` + + // 监控器id,当监控器已关联策略时,此字段必传 + MonitorId *uint64 `json:"MonitorId,omitnil,omitempty" name:"MonitorId"` + + // 地址列表,全量更新逻辑,对于存量不需要修改的地址信息也需要带上(其中参数里的AddressId需传入正确的值),否则会被删除。 + AddressSet []*Address `json:"AddressSet,omitnil,omitempty" name:"AddressSet"` +} + +type ModifyAddressPoolRequest struct { + *tchttp.BaseRequest + + // 地址池id + PoolId *uint64 `json:"PoolId,omitnil,omitempty" name:"PoolId"` + + // 地址池名称,不允许重复 + PoolName *string `json:"PoolName,omitnil,omitempty" name:"PoolName"` + + // 流量策略: WEIGHT负载均衡,ALL解析全部 + TrafficStrategy *string `json:"TrafficStrategy,omitnil,omitempty" name:"TrafficStrategy"` + + // 监控器id,当监控器已关联策略时,此字段必传 + MonitorId *uint64 `json:"MonitorId,omitnil,omitempty" name:"MonitorId"` + + // 地址列表,全量更新逻辑,对于存量不需要修改的地址信息也需要带上(其中参数里的AddressId需传入正确的值),否则会被删除。 + AddressSet []*Address `json:"AddressSet,omitnil,omitempty" name:"AddressSet"` +} + +func (r *ModifyAddressPoolRequest) 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 *ModifyAddressPoolRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "PoolId") + delete(f, "PoolName") + delete(f, "TrafficStrategy") + delete(f, "MonitorId") + delete(f, "AddressSet") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyAddressPoolRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyAddressPoolResponseParams struct { + // 是否修改成功 + Msg *string `json:"Msg,omitnil,omitempty" name:"Msg"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type ModifyAddressPoolResponse struct { + *tchttp.BaseResponse + Response *ModifyAddressPoolResponseParams `json:"Response"` +} + +func (r *ModifyAddressPoolResponse) 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 *ModifyAddressPoolResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyInstanceConfigRequestParams struct { + // 实例配置详情 + InstanceConfig *InstanceConfig `json:"InstanceConfig,omitnil,omitempty" name:"InstanceConfig"` +} + +type ModifyInstanceConfigRequest struct { + *tchttp.BaseRequest + + // 实例配置详情 + InstanceConfig *InstanceConfig `json:"InstanceConfig,omitnil,omitempty" name:"InstanceConfig"` +} + +func (r *ModifyInstanceConfigRequest) 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 *ModifyInstanceConfigRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceConfig") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyInstanceConfigRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyInstanceConfigResponseParams struct { + // 实例详情 + Instance *InstanceDetail `json:"Instance,omitnil,omitempty" name:"Instance"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type ModifyInstanceConfigResponse struct { + *tchttp.BaseResponse + Response *ModifyInstanceConfigResponseParams `json:"Response"` +} + +func (r *ModifyInstanceConfigResponse) 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 *ModifyInstanceConfigResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyMonitorRequestParams struct { + // 监控器id + MonitorId *uint64 `json:"MonitorId,omitnil,omitempty" name:"MonitorId"` + + // 监控器名称 + MonitorName *string `json:"MonitorName,omitnil,omitempty" name:"MonitorName"` + + // 检查协议,可选值 PING TCP HTTP HTTPS + CheckProtocol *string `json:"CheckProtocol,omitnil,omitempty" name:"CheckProtocol"` + + // 检查间隔(秒),可选值 15 60 120 300 + CheckInterval *uint64 `json:"CheckInterval,omitnil,omitempty" name:"CheckInterval"` + + // 超时时间,单位:秒,可选值 2 3 5 10 + Timeout *uint64 `json:"Timeout,omitnil,omitempty" name:"Timeout"` + + // 重试次数,可选值为 0,1,2 + FailTimes *uint64 `json:"FailTimes,omitnil,omitempty" name:"FailTimes"` + + // 失败比例,可选值为 20 30 40 50 60 70 80 100,默认值为50 + FailRate *uint64 `json:"FailRate,omitnil,omitempty" name:"FailRate"` + + // 监控节点类型,可选值有AUTO INTERNAL OVERSEAS IPV6 ALL + DetectorStyle *string `json:"DetectorStyle,omitnil,omitempty" name:"DetectorStyle"` + + // 探测器组id列表 + DetectorGroupIds []*uint64 `json:"DetectorGroupIds,omitnil,omitempty" name:"DetectorGroupIds"` + + // PING 包数目, 当CheckProtocol=ping时必填,可选值 20 50 100 + PingNum *uint64 `json:"PingNum,omitnil,omitempty" name:"PingNum"` + + // 检查端口,可选值为1-65535之间的整数 + TcpPort *uint64 `json:"TcpPort,omitnil,omitempty" name:"TcpPort"` + + // Host 设置,默认为业务域名 + Host *string `json:"Host,omitnil,omitempty" name:"Host"` + + // URL 路径,默认为“/” + Path *string `json:"Path,omitnil,omitempty" name:"Path"` + + // 返回错误码阈值, 可选值为 400 和 500, 默认值500 + ReturnCodeThreshold *uint64 `json:"ReturnCodeThreshold,omitnil,omitempty" name:"ReturnCodeThreshold"` + + // 跟随 3XX 重定向 ,不开启为 DISABLED, 开启为 ENABLED,默认不开启 + EnableRedirect *string `json:"EnableRedirect,omitnil,omitempty" name:"EnableRedirect"` + + // 启用 SNI,不开启为 DISABLED, 开启为 ENABLED,默认不开启 + EnableSni *string `json:"EnableSni,omitnil,omitempty" name:"EnableSni"` + + // 丢包率告警阈值,当CheckProtocol=ping时必填,取值在10 30 50 80 90 100 + PacketLossRate *uint64 `json:"PacketLossRate,omitnil,omitempty" name:"PacketLossRate"` + + // 持续周期数,可选值1-5 + ContinuePeriod *uint64 `json:"ContinuePeriod,omitnil,omitempty" name:"ContinuePeriod"` +} + +type ModifyMonitorRequest struct { + *tchttp.BaseRequest + + // 监控器id + MonitorId *uint64 `json:"MonitorId,omitnil,omitempty" name:"MonitorId"` + + // 监控器名称 + MonitorName *string `json:"MonitorName,omitnil,omitempty" name:"MonitorName"` + + // 检查协议,可选值 PING TCP HTTP HTTPS + CheckProtocol *string `json:"CheckProtocol,omitnil,omitempty" name:"CheckProtocol"` + + // 检查间隔(秒),可选值 15 60 120 300 + CheckInterval *uint64 `json:"CheckInterval,omitnil,omitempty" name:"CheckInterval"` + + // 超时时间,单位:秒,可选值 2 3 5 10 + Timeout *uint64 `json:"Timeout,omitnil,omitempty" name:"Timeout"` + + // 重试次数,可选值为 0,1,2 + FailTimes *uint64 `json:"FailTimes,omitnil,omitempty" name:"FailTimes"` + + // 失败比例,可选值为 20 30 40 50 60 70 80 100,默认值为50 + FailRate *uint64 `json:"FailRate,omitnil,omitempty" name:"FailRate"` + + // 监控节点类型,可选值有AUTO INTERNAL OVERSEAS IPV6 ALL + DetectorStyle *string `json:"DetectorStyle,omitnil,omitempty" name:"DetectorStyle"` + + // 探测器组id列表 + DetectorGroupIds []*uint64 `json:"DetectorGroupIds,omitnil,omitempty" name:"DetectorGroupIds"` + + // PING 包数目, 当CheckProtocol=ping时必填,可选值 20 50 100 + PingNum *uint64 `json:"PingNum,omitnil,omitempty" name:"PingNum"` + + // 检查端口,可选值为1-65535之间的整数 + TcpPort *uint64 `json:"TcpPort,omitnil,omitempty" name:"TcpPort"` + + // Host 设置,默认为业务域名 + Host *string `json:"Host,omitnil,omitempty" name:"Host"` + + // URL 路径,默认为“/” + Path *string `json:"Path,omitnil,omitempty" name:"Path"` + + // 返回错误码阈值, 可选值为 400 和 500, 默认值500 + ReturnCodeThreshold *uint64 `json:"ReturnCodeThreshold,omitnil,omitempty" name:"ReturnCodeThreshold"` + + // 跟随 3XX 重定向 ,不开启为 DISABLED, 开启为 ENABLED,默认不开启 + EnableRedirect *string `json:"EnableRedirect,omitnil,omitempty" name:"EnableRedirect"` + + // 启用 SNI,不开启为 DISABLED, 开启为 ENABLED,默认不开启 + EnableSni *string `json:"EnableSni,omitnil,omitempty" name:"EnableSni"` + + // 丢包率告警阈值,当CheckProtocol=ping时必填,取值在10 30 50 80 90 100 + PacketLossRate *uint64 `json:"PacketLossRate,omitnil,omitempty" name:"PacketLossRate"` + + // 持续周期数,可选值1-5 + ContinuePeriod *uint64 `json:"ContinuePeriod,omitnil,omitempty" name:"ContinuePeriod"` +} + +func (r *ModifyMonitorRequest) 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 *ModifyMonitorRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "MonitorId") + delete(f, "MonitorName") + delete(f, "CheckProtocol") + delete(f, "CheckInterval") + delete(f, "Timeout") + delete(f, "FailTimes") + delete(f, "FailRate") + delete(f, "DetectorStyle") + delete(f, "DetectorGroupIds") + delete(f, "PingNum") + delete(f, "TcpPort") + delete(f, "Host") + delete(f, "Path") + delete(f, "ReturnCodeThreshold") + delete(f, "EnableRedirect") + delete(f, "EnableSni") + delete(f, "PacketLossRate") + delete(f, "ContinuePeriod") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyMonitorRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyMonitorResponseParams struct { + // success 为修改成功 + Msg *string `json:"Msg,omitnil,omitempty" name:"Msg"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type ModifyMonitorResponse struct { + *tchttp.BaseResponse + Response *ModifyMonitorResponseParams `json:"Response"` +} + +func (r *ModifyMonitorResponse) 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 *ModifyMonitorResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyStrategyRequestParams struct { + // 实例id + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // 策略id + StrategyId *uint64 `json:"StrategyId,omitnil,omitempty" name:"StrategyId"` + + // 解析线路,需要全量传参 + Source []*Source `json:"Source,omitnil,omitempty" name:"Source"` + + // 主力地址池集合,需要全量传参 + MainAddressPoolSet []*MainAddressPool `json:"MainAddressPoolSet,omitnil,omitempty" name:"MainAddressPoolSet"` + + // 兜底地址池集合,需要全量传参 + FallbackAddressPoolSet []*MainAddressPool `json:"FallbackAddressPoolSet,omitnil,omitempty" name:"FallbackAddressPoolSet"` + + // 策略名称,不允许重复 + StrategyName *string `json:"StrategyName,omitnil,omitempty" name:"StrategyName"` + + // 策略开启状态:ENABLED开启;DISABLED关闭 + IsEnabled *string `json:"IsEnabled,omitnil,omitempty" name:"IsEnabled"` + + // 是否开启策略强制保留默认线路 disabled, enabled,默认不开启且只有一个策略能开启 + KeepDomainRecords *string `json:"KeepDomainRecords,omitnil,omitempty" name:"KeepDomainRecords"` + + // 调度模式:AUTO默认;STOP仅暂停不切换 + SwitchPoolType *string `json:"SwitchPoolType,omitnil,omitempty" name:"SwitchPoolType"` +} + +type ModifyStrategyRequest struct { + *tchttp.BaseRequest + + // 实例id + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // 策略id + StrategyId *uint64 `json:"StrategyId,omitnil,omitempty" name:"StrategyId"` + + // 解析线路,需要全量传参 + Source []*Source `json:"Source,omitnil,omitempty" name:"Source"` + + // 主力地址池集合,需要全量传参 + MainAddressPoolSet []*MainAddressPool `json:"MainAddressPoolSet,omitnil,omitempty" name:"MainAddressPoolSet"` + + // 兜底地址池集合,需要全量传参 + FallbackAddressPoolSet []*MainAddressPool `json:"FallbackAddressPoolSet,omitnil,omitempty" name:"FallbackAddressPoolSet"` + + // 策略名称,不允许重复 + StrategyName *string `json:"StrategyName,omitnil,omitempty" name:"StrategyName"` + + // 策略开启状态:ENABLED开启;DISABLED关闭 + IsEnabled *string `json:"IsEnabled,omitnil,omitempty" name:"IsEnabled"` + + // 是否开启策略强制保留默认线路 disabled, enabled,默认不开启且只有一个策略能开启 + KeepDomainRecords *string `json:"KeepDomainRecords,omitnil,omitempty" name:"KeepDomainRecords"` + + // 调度模式:AUTO默认;STOP仅暂停不切换 + SwitchPoolType *string `json:"SwitchPoolType,omitnil,omitempty" name:"SwitchPoolType"` +} + +func (r *ModifyStrategyRequest) 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 *ModifyStrategyRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceId") + delete(f, "StrategyId") + delete(f, "Source") + delete(f, "MainAddressPoolSet") + delete(f, "FallbackAddressPoolSet") + delete(f, "StrategyName") + delete(f, "IsEnabled") + delete(f, "KeepDomainRecords") + delete(f, "SwitchPoolType") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyStrategyRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyStrategyResponseParams struct { + // 是否成功 + Msg *string `json:"Msg,omitnil,omitempty" name:"Msg"` + + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type ModifyStrategyResponse struct { + *tchttp.BaseResponse + Response *ModifyStrategyResponseParams `json:"Response"` +} + +func (r *ModifyStrategyResponse) 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 *ModifyStrategyResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type MonitorDetail struct { + // 探测规则id + MonitorId *uint64 `json:"MonitorId,omitnil,omitempty" name:"MonitorId"` + + // 监控器名称 + MonitorName *string `json:"MonitorName,omitnil,omitempty" name:"MonitorName"` + + // 所属用户 + Uin *string `json:"Uin,omitnil,omitempty" name:"Uin"` + + // 监控节点id组 + DetectorGroupIds []*uint64 `json:"DetectorGroupIds,omitnil,omitempty" name:"DetectorGroupIds"` + + // 探测协议 PING TCP HTTP HTTPS + CheckProtocol *string `json:"CheckProtocol,omitnil,omitempty" name:"CheckProtocol"` + + // 探测周期 + CheckInterval *uint64 `json:"CheckInterval,omitnil,omitempty" name:"CheckInterval"` + + // 发包数量 + PingNum *uint64 `json:"PingNum,omitnil,omitempty" name:"PingNum"` + + // tcp端口 + TcpPort *uint64 `json:"TcpPort,omitnil,omitempty" name:"TcpPort"` + + // 探测 host + Host *string `json:"Host,omitnil,omitempty" name:"Host"` + + // 探测路径 + Path *string `json:"Path,omitnil,omitempty" name:"Path"` + + // 返回值阈值 + ReturnCodeThreshold *uint64 `json:"ReturnCodeThreshold,omitnil,omitempty" name:"ReturnCodeThreshold"` + + // 是否开启3xx重定向跟随 ENABLED DISABLED + EnableRedirect *string `json:"EnableRedirect,omitnil,omitempty" name:"EnableRedirect"` + + // 是否启用 sni + // ENABLED DISABLED + EnableSni *string `json:"EnableSni,omitnil,omitempty" name:"EnableSni"` + + // 丢包率上限 + PacketLossRate *uint64 `json:"PacketLossRate,omitnil,omitempty" name:"PacketLossRate"` + + // 探测超时 + Timeout *uint64 `json:"Timeout,omitnil,omitempty" name:"Timeout"` + + // 失败次数 + FailTimes *uint64 `json:"FailTimes,omitnil,omitempty" name:"FailTimes"` + + // 失败率上限100 + FailRate *uint64 `json:"FailRate,omitnil,omitempty" name:"FailRate"` + + // 创建时间 + CreatedOn *string `json:"CreatedOn,omitnil,omitempty" name:"CreatedOn"` + + // 更新时间 + UpdatedOn *string `json:"UpdatedOn,omitnil,omitempty" name:"UpdatedOn"` + + // 监控节点类型 + // AUTO INTERNAL OVERSEAS IPV6 ALL + DetectorStyle *string `json:"DetectorStyle,omitnil,omitempty" name:"DetectorStyle"` + + // 探测次数 + DetectNum *uint64 `json:"DetectNum,omitnil,omitempty" name:"DetectNum"` + + // 持续周期数 + ContinuePeriod *uint64 `json:"ContinuePeriod,omitnil,omitempty" name:"ContinuePeriod"` +} + +type Quota struct { + // 探测任务配额 + TaskQuota *uint64 `json:"TaskQuota,omitnil,omitempty" name:"TaskQuota"` + + // 地址池配额 + PoolQuota *uint64 `json:"PoolQuota,omitnil,omitempty" name:"PoolQuota"` + + // 地址配额 + AddressQuota *uint64 `json:"AddressQuota,omitnil,omitempty" name:"AddressQuota"` + + // 探点资源数 + MonitorQuota *uint64 `json:"MonitorQuota,omitnil,omitempty" name:"MonitorQuota"` + + // 消息资源数 + MessageQuota *uint64 `json:"MessageQuota,omitnil,omitempty" name:"MessageQuota"` + + // 已使用探测任务数 + UsedTaskQuota *uint64 `json:"UsedTaskQuota,omitnil,omitempty" name:"UsedTaskQuota"` + + // 已使用体验实例数 + UsedFreeInstanceNum *uint64 `json:"UsedFreeInstanceNum,omitnil,omitempty" name:"UsedFreeInstanceNum"` + + // 已使用付费实例 + UsedBillInstanceNum *uint64 `json:"UsedBillInstanceNum,omitnil,omitempty" name:"UsedBillInstanceNum"` + + // 体验套餐总数 + FreePackageNum *uint64 `json:"FreePackageNum,omitnil,omitempty" name:"FreePackageNum"` + + // 已使用付费套餐数 + UsedBillPackageNum *uint64 `json:"UsedBillPackageNum,omitnil,omitempty" name:"UsedBillPackageNum"` + + // 付费套餐总数 + BillPackageNum *uint64 `json:"BillPackageNum,omitnil,omitempty" name:"BillPackageNum"` +} + +type ResourceFilter struct { + // 过滤字段名,支持的列表如下: + // - type:主资源类型,CDN。 + // - instanceId:IGTM实例ID。此为必传参数,未传将导致接口查询失败。 + Name *string `json:"Name,omitnil,omitempty" name:"Name"` + + // 过滤字段值。 + Value []*string `json:"Value,omitnil,omitempty" name:"Value"` + + // 是否启用模糊查询,仅支持过滤字段名为domain。 + // 模糊查询时,Value长度最大为1,否则Value长度最大为5。(预留字段,暂未使用) + Fuzzy *bool `json:"Fuzzy,omitnil,omitempty" name:"Fuzzy"` +} + +type Source struct { + // 解析请求来源线路id + DnsLineId *uint64 `json:"DnsLineId,omitnil,omitempty" name:"DnsLineId"` + + // 解析请求来源线路名 + Name *string `json:"Name,omitnil,omitempty" name:"Name"` +} + +type Strategy struct { + // 实例id + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // 策略名 + Name *string `json:"Name,omitnil,omitempty" name:"Name"` + + // 地址来源 + // 注意:此字段可能返回 null,表示取不到有效值。 + Source []*Source `json:"Source,omitnil,omitempty" name:"Source"` + + // 策略id + StrategyId *uint64 `json:"StrategyId,omitnil,omitempty" name:"StrategyId"` + + // 健康状态:ok健康、warn风险、down故障 + Status *string `json:"Status,omitnil,omitempty" name:"Status"` + + // 生效的主力池id,null则为未知 + // 注意:此字段可能返回 null,表示取不到有效值。 + ActivateMainPoolId *int64 `json:"ActivateMainPoolId,omitnil,omitempty" name:"ActivateMainPoolId"` + + // 当前生效地址池所在级数,为0则代表兜底生效,null则为未知 + // 注意:此字段可能返回 null,表示取不到有效值。 + ActivateLevel *int64 `json:"ActivateLevel,omitnil,omitempty" name:"ActivateLevel"` + + // 当前生效地址池集合类型:main主力;fallback兜底 + ActivePoolType *string `json:"ActivePoolType,omitnil,omitempty" name:"ActivePoolType"` + + // 当前生效地址池流量策略:all解析所有;weight负载均衡 + ActiveTrafficStrategy *string `json:"ActiveTrafficStrategy,omitnil,omitempty" name:"ActiveTrafficStrategy"` + + // 监控器数量 + MonitorNum *uint64 `json:"MonitorNum,omitnil,omitempty" name:"MonitorNum"` + + // 是否开启:ENABLED开启;DISABLED关闭 + IsEnabled *string `json:"IsEnabled,omitnil,omitempty" name:"IsEnabled"` + + // 是否保留线路:enabled保留,disabled不保留,只保留默认线路 + KeepDomainRecords *string `json:"KeepDomainRecords,omitnil,omitempty" name:"KeepDomainRecords"` + + // 调度模式:AUTO默认;PAUSE仅暂停不切换 + SwitchPoolType *string `json:"SwitchPoolType,omitnil,omitempty" name:"SwitchPoolType"` + + // 创建时间 + CreatedOn *string `json:"CreatedOn,omitnil,omitempty" name:"CreatedOn"` + + // 更新时间 + UpdatedOn *string `json:"UpdatedOn,omitnil,omitempty" name:"UpdatedOn"` +} + +type StrategyDetail struct { + // 实例id + InstanceId *string `json:"InstanceId,omitnil,omitempty" name:"InstanceId"` + + // 策略id + StrategyId *uint64 `json:"StrategyId,omitnil,omitempty" name:"StrategyId"` + + // 策略名 + Name *string `json:"Name,omitnil,omitempty" name:"Name"` + + // 线路 + // 注意:此字段可能返回 null,表示取不到有效值。 + Source []*Source `json:"Source,omitnil,omitempty" name:"Source"` + + // 主力地址池集合 + // 注意:此字段可能返回 null,表示取不到有效值。 + MainAddressPoolSet []*MainAddressPool `json:"MainAddressPoolSet,omitnil,omitempty" name:"MainAddressPoolSet"` + + // 兜底地址池id + // 注意:此字段可能返回 null,表示取不到有效值。 + FallbackAddressPoolSet []*MainAddressPool `json:"FallbackAddressPoolSet,omitnil,omitempty" name:"FallbackAddressPoolSet"` + + // 是否保留线路:enabled保留,disabled不保留,只保留默认线路 + KeepDomainRecords *string `json:"KeepDomainRecords,omitnil,omitempty" name:"KeepDomainRecords"` + + // 生效主力地址池id + // 注意:此字段可能返回 null,表示取不到有效值。 + ActivateMainPoolId *uint64 `json:"ActivateMainPoolId,omitnil,omitempty" name:"ActivateMainPoolId"` + + // 创建时间 + CreatedOn *string `json:"CreatedOn,omitnil,omitempty" name:"CreatedOn"` + + // 更新时间 + UpdatedOn *string `json:"UpdatedOn,omitnil,omitempty" name:"UpdatedOn"` + + // 调度模式:AUTO默认;PAUSE仅暂停不切换 + SwitchPoolType *string `json:"SwitchPoolType,omitnil,omitempty" name:"SwitchPoolType"` +} \ No newline at end of file diff --git a/vendor/modules.txt b/vendor/modules.txt index 154e51339b..38f6edfd7f 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1235,6 +1235,9 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/gaap/v20180529 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/gwlb v1.0.1127 ## explicit; go 1.14 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/gwlb/v20240906 +# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/igtm v1.1.27 +## explicit; go 1.14 +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/igtm/v20231024 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.1145 ## explicit; go 1.14 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms/v20190118 diff --git a/website/docs/d/igtm_address_pool_list.html.markdown b/website/docs/d/igtm_address_pool_list.html.markdown new file mode 100644 index 0000000000..b422c031b1 --- /dev/null +++ b/website/docs/d/igtm_address_pool_list.html.markdown @@ -0,0 +1,80 @@ +--- +subcategory: "Intelligent Global Traffic Manager(IGTM)" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_igtm_address_pool_list" +sidebar_current: "docs-tencentcloud-datasource-igtm_address_pool_list" +description: |- + Use this data source to query detailed information of IGTM address pool list +--- + +# tencentcloud_igtm_address_pool_list + +Use this data source to query detailed information of IGTM address pool list + +## Example Usage + +### Query all address pool list + +```hcl +data "tencentcloud_igtm_address_pool_list" "example" {} +``` + +### Query address pool list by filter + +```hcl +data "tencentcloud_igtm_address_pool_list" "example" { + filters { + name = "PoolName" + value = ["tf-example"] + fuzzy = true + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `filters` - (Optional, List) Alert filter conditions: PoolName: Address pool name; MonitorId: Monitor ID. +* `result_output_file` - (Optional, String) Used to save results. + +The `filters` object supports the following: + +* `name` - (Required, String) Filter field name, supported list as follows: +- type: Main resource type, CDN. +- instanceId: IGTM instance ID. This is a required parameter, failure to provide will cause interface query failure. +* `value` - (Required, Set) Filter field value. +* `fuzzy` - (Optional, Bool) Whether to enable fuzzy query, only supports filter field name as domain. +When fuzzy query is enabled, maximum Value length is 1, otherwise maximum Value length is 5. (Reserved field, currently not used). + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `address_pool_set` - Resource group list. + * `addr_type` - Address pool address type: IPV4, IPV6, DOMAIN. + * `address_num` - Address count. + * `address_set` - Address pool address information. + * `addr` - Address value: only supports IPv4, IPv6 and domain name formats; +Loopback addresses, reserved addresses, internal network addresses and Tencent reserved network segments are not supported. + * `address_id` - Address ID. + * `created_on` - Creation time. + * `is_enable` - Whether to enable: DISABLED disabled; ENABLED enabled. + * `location` - Address name. + * `status` - OK normal, DOWN failure, WARN risk, UNKNOWN detecting, UNMONITORED unknown. + * `updated_on` - Modification time. + * `weight` - Weight, required when traffic strategy is WEIGHT; range 1-100. + * `created_on` - Creation time. + * `instance_info` - Instance related information. + * `instance_id` - Instance ID. + * `instance_name` - Instance name. + * `monitor_group_num` - Probe point count. + * `monitor_id` - Monitor ID. + * `monitor_task_num` - Detection task count. + * `pool_id` - Address pool ID. + * `pool_name` - Address pool name. + * `status` - OK normal, DOWN failure, WARN risk, UNKNOWN unknown. + * `traffic_strategy` - Traffic strategy: WEIGHT load balancing, ALL resolve all. + * `updated_on` - Update time. + + diff --git a/website/docs/r/igtm_address_pool.html.markdown b/website/docs/r/igtm_address_pool.html.markdown new file mode 100644 index 0000000000..586ced2de6 --- /dev/null +++ b/website/docs/r/igtm_address_pool.html.markdown @@ -0,0 +1,66 @@ +--- +subcategory: "Intelligent Global Traffic Manager(IGTM)" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_igtm_address_pool" +sidebar_current: "docs-tencentcloud-resource-igtm_address_pool" +description: |- + Provides a resource to create a IGTM address pool +--- + +# tencentcloud_igtm_address_pool + +Provides a resource to create a IGTM address pool + +## Example Usage + +```hcl +resource "tencentcloud_igtm_address_pool" "example" { + pool_name = "tf-example" + traffic_strategy = "WEIGHT" + address_set { + addr = "1.1.1.1" + is_enable = "ENABLED" + weight = 90 + } + + address_set { + addr = "2.2.2.2" + is_enable = "DISABLED" + weight = 50 + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `address_set` - (Required, Set) Address list. +* `pool_name` - (Required, String) Address pool name, duplicates are not allowed. +* `traffic_strategy` - (Required, String) Traffic strategy: WEIGHT for load balancing, ALL for resolving all healthy addresses. +* `monitor_id` - (Optional, Int) Monitor ID. + +The `address_set` object supports the following: + +* `addr` - (Required, String) Address value: only supports IPv4, IPv6, and domain name formats. +Loopback addresses, reserved addresses, internal addresses, and Tencent reserved network segments are not supported. +* `is_enable` - (Required, String) Whether to enable: DISABLED for disabled, ENABLED for enabled. +* `location` - (Optional, String) Address name. +* `weight` - (Optional, Int) Weight, required when traffic strategy is WEIGHT; range 1-100. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - ID of the resource. +* `pool_id` - Address pool ID. + + +## Import + +IGTM address pool can be imported using the id, e.g. + +``` +terraform import tencentcloud_igtm_address_pool.example 1012132 +``` + diff --git a/website/tencentcloud.erb b/website/tencentcloud.erb index fca5cc9d2c..ad65ba7910 100644 --- a/website/tencentcloud.erb +++ b/website/tencentcloud.erb @@ -2896,6 +2896,27 @@ +
  • + Intelligent Global Traffic Manager(IGTM) + +
  • Key Management Service(KMS)