diff --git a/go.mod b/go.mod index d1a0375d3c..21a0ff348c 100644 --- a/go.mod +++ b/go.mod @@ -33,7 +33,7 @@ require ( github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb v1.0.445 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cloudaudit v1.0.199 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls v1.0.412 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.479 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.480 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.445 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb v1.0.359 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dayu v1.0.335 @@ -60,7 +60,7 @@ require ( github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcr v1.0.267 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tdmq v1.0.268 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tem v1.0.472 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.438 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.480 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vod v1.0.199 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.479 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/wss v1.0.199 diff --git a/go.sum b/go.sum index 3bcb612ebe..0b93383598 100644 --- a/go.sum +++ b/go.sum @@ -481,21 +481,19 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.363/go.mod github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.383/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.391/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.397/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.398/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.403/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.406/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.409/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.412/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.413/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.414/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.438/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.443/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.445/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.466/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.472 h1:kQxDatbhm8AbZebhnP7xgBBsXHqt3WfGfIPxE9Qmdmk= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.472/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.479 h1:3kwDb6p1J3LxmwnNgSSEheemPffo+vMewoDzKysYdig= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.479/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.480 h1:Dwnfdrk3KXpYRH9Kwrk9sHpZSOmrE7P9LBoNsYUJKR4= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.480/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.445 h1:Bh7XD0ypNMHYyBOM8hhKsSu+y0VVKUnJVS+YKKhfpGg= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.445/go.mod h1:jMDD351efCFpT1+KVFbcpu6SbmP4TYmp4qkoCfr63nQ= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb v1.0.359 h1:cNKqelPgUxrJkLY0Azd2QHr/UMYOPPnmqs88clt2akk= @@ -549,12 +547,10 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tdmq v1.0.268 h1:ez5lvK github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tdmq v1.0.268/go.mod h1:fchXZhmqaYaG2c4wTCBTdnW6TFAtxl3D/P/yuuuLMfA= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tem v1.0.472 h1:9Jzrgx78+5XnZ8myNYjCYZn5ZF+tbSIpF6KWGgWr0uY= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tem v1.0.472/go.mod h1:ayIL2FNqk7HH5fPQrkWtYjgU4jL7if63f7x+yRwb4a0= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.438 h1:pVN2u4lXOaz+A79IeBPnyDYwW3Z2unCi6rxCW2O7LPo= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.438/go.mod h1:D2NpA7a0j4WZ8T2L6BxbN7LFyLHkz6FlhQG8s5AQ2ts= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.480 h1:oZptW2Fo1pW8fKz/dv+RJLr2q8UC1qkqDqWs3rDgvQ8= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.480/go.mod h1:rs+BUoY53xfiE5sRsVk2RpsjgzODtq52xiBTc6WTWWM= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vod v1.0.199 h1:6Yt74l4pA5QtzhwMNIEUt0spXdSBKH744DDqTHJOCP0= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vod v1.0.199/go.mod h1:Yw6OQ33z3s4k0HVYTNSffB12qOzEJ2Zf1Vj4+5S3sRs= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.398 h1:1JVKMl+yjZbntwAW0A6esjQI1/dXXqjQ9+OLai7ZS2w= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.398/go.mod h1:+TD/TRnb5WrLcE2SL3db7ROOpwED5gBfbC19gaXnGxs= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.479 h1:eArkuh12SjyaHaKDNfF2oLjkY3f8SnuazgM/2dV9hcA= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.479/go.mod h1:U+ZEKIS6qZu8unIM3K5qWBaK7bO4ydXgzmdNeRBjQQw= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/wss v1.0.199 h1:hMBLtiJPnZ9GvA677cTB6ELBR6B68wCR2QY1sNoGQc4= diff --git a/tencentcloud/basic_test.go b/tencentcloud/basic_test.go index 5997515f7d..71a483481a 100644 --- a/tencentcloud/basic_test.go +++ b/tencentcloud/basic_test.go @@ -176,6 +176,8 @@ const ( defaultTkeClusterType = "tke" defaultPrometheusId = "prom-1lspn8sw" defaultTemplateId = "temp-gqunlvo1" + tkeClusterIdAgent = "cls-87o4klby" + tkeClusterTypeAgent = "eks" ) /* diff --git a/tencentcloud/provider.go b/tencentcloud/provider.go index cd520af951..88636e9e55 100644 --- a/tencentcloud/provider.go +++ b/tencentcloud/provider.go @@ -439,6 +439,7 @@ Monitor tencentcloud_monitor_alarm_notice tencentcloud_monitor_tmp_tke_record_rule_yaml tencentcloud_monitor_tmp_tke_global_notification + tencentcloud_monitor_tmp_tke_cluster_agent PostgreSQL Data Source @@ -1103,6 +1104,7 @@ func Provider() terraform.ResourceProvider { "tencentcloud_monitor_tmp_tke_template": resourceTencentCloudMonitorTmpTkeTemplate(), "tencentcloud_monitor_tmp_tke_template_attachment": resourceTencentCloudMonitorTmpTkeTemplateAttachment(), "tencentcloud_monitor_tmp_tke_alert_policy": resourceTencentCloudMonitorTmpTkeAlertPolicy(), + "tencentcloud_monitor_tmp_tke_cluster_agent": resourceTencentCloudMonitorTmpTkeClusterAgent(), "tencentcloud_monitor_tmp_tke_config": resourceTencentCloudMonitorTmpTkeConfig(), "tencentcloud_monitor_tmp_tke_record_rule_yaml": resourceTencentCloudMonitorTmpTkeRecordRuleYaml(), "tencentcloud_monitor_tmp_tke_global_notification": resourceTencentCloudMonitorTmpTkeGlobalNotification(), diff --git a/tencentcloud/resource_tc_monitor_tmp_tke_cluster_agent.go b/tencentcloud/resource_tc_monitor_tmp_tke_cluster_agent.go new file mode 100644 index 0000000000..eed6e5736f --- /dev/null +++ b/tencentcloud/resource_tc_monitor_tmp_tke_cluster_agent.go @@ -0,0 +1,459 @@ +/* +Provides a resource to create a tmp tke cluster agent + +Example Usage + +```hcl + +resource "tencentcloud_monitor_tmp_tke_cluster_agent" "tmpClusterAgent" { + instance_id = "prom-xxx" + + agents { + region = "ap-xxx" + cluster_type = "eks" + cluster_id = "cls-xxx" + enable_external = false + } +} + +*/ +package tencentcloud + +import ( + "context" + "fmt" + "log" + "strings" + + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + tke "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func resourceTencentCloudMonitorTmpTkeClusterAgent() *schema.Resource { + return &schema.Resource{ + Read: resourceTencentCloudMonitorTmpTkeClusterAgentRead, + Create: resourceTencentCloudMonitorTmpTkeClusterAgentCreate, + Update: resourceTencentCloudMonitorTmpTkeClusterAgentUpdate, + Delete: resourceTencentCloudMonitorTmpTkeClusterAgentDelete, + Schema: map[string]*schema.Schema{ + "instance_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: "Instance Id.", + }, + + "agents": { + Type: schema.TypeList, + MaxItems: 1, + Required: true, + Description: "agent list.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "region": { + Type: schema.TypeString, + Required: true, + Description: "Limitation of region.", + }, + "cluster_type": { + Type: schema.TypeString, + Required: true, + Description: "Type of cluster.", + }, + "cluster_id": { + Type: schema.TypeString, + Required: true, + Description: "An id identify the cluster, like `cls-xxxxxx`.", + }, + "enable_external": { + Type: schema.TypeBool, + Required: true, + Description: "Whether to enable the public network CLB.", + }, + "in_cluster_pod_config": { + Type: schema.TypeMap, + Optional: true, + Description: "Pod configuration for components deployed in the cluster.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "host_net": { + Type: schema.TypeBool, + Required: true, + Description: "Whether to use HostNetWork.", + }, + "node_selector": { + Type: schema.TypeList, + Optional: true, + Description: "Specify the pod to run the node.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Optional: true, + Description: "The pod configuration name of the component deployed in the cluster.", + }, + "value": { + Type: schema.TypeString, + Optional: true, + Description: "Pod configuration values for components deployed in the cluster.", + }, + }, + }, + }, + "tolerations": { + Type: schema.TypeList, + Optional: true, + Description: "Tolerate Stain.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "key": { + Type: schema.TypeString, + Optional: true, + Description: "The taint key to which the tolerance applies.", + }, + "operator": { + Type: schema.TypeString, + Optional: true, + Description: "key-value relationship.", + }, + "effect": { + Type: schema.TypeString, + Optional: true, + Description: "blemish effect to match.", + }, + }, + }, + }, + }, + }, + }, + "external_labels": { + Type: schema.TypeList, + Optional: true, + Description: "All metrics collected by the cluster will carry these labels.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + Description: "Indicator name.", + }, + "value": { + Type: schema.TypeString, + Optional: true, + Description: "Index value.", + }, + }, + }, + }, + "not_install_basic_scrape": { + Type: schema.TypeBool, + Optional: true, + Description: "Whether to install the default collection configuration.", + }, + "not_scrape": { + Type: schema.TypeBool, + Optional: true, + Description: "Whether to collect indicators, true means drop all indicators, false means collect default indicators.", + }, + "cluster_name": { + Type: schema.TypeString, + Computed: true, + Description: "the name of the cluster.", + }, + "status": { + Type: schema.TypeString, + Computed: true, + Description: "agent state, `normal`, `abnormal`.", + }, + }, + }, + }, + }, + } +} + +func resourceTencentCloudMonitorTmpTkeClusterAgentCreate(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("resource.tencentcloud_monitor_tmp_tke_cluster_agent.create")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + + request := tke.NewCreatePrometheusClusterAgentRequest() + + instanceId := "" + if v, ok := d.GetOk("instance_id"); ok { + instanceId = v.(string) + request.InstanceId = helper.String(v.(string)) + } + + clusterId := "" + clusterType := "" + if dMap, ok := helper.InterfacesHeadMap(d, "agents"); ok { + prometheusClusterAgent := tke.PrometheusClusterAgentBasic{} + if v, ok := dMap["region"]; ok { + prometheusClusterAgent.Region = helper.String(v.(string)) + } + if v, ok := dMap["cluster_type"]; ok { + clusterType = v.(string) + prometheusClusterAgent.ClusterType = helper.String(v.(string)) + } + if v, ok := dMap["cluster_id"]; ok { + clusterId = v.(string) + prometheusClusterAgent.ClusterId = helper.String(v.(string)) + } + if v, ok := dMap["enable_external"]; ok { + prometheusClusterAgent.EnableExternal = helper.Bool(v.(bool)) + } + if v, ok := dMap["in_cluster_pod_config"]; ok { + podConfig := v.(map[string]interface{}) + var clusterAgentPodConfig *tke.PrometheusClusterAgentPodConfig + if vv, ok := podConfig["host_net"]; ok { + clusterAgentPodConfig.HostNet = helper.Bool(vv.(bool)) + } + if vv, ok := podConfig["node_selector"]; ok { + labelsList := vv.([]interface{}) + nodeSelectorKV := make([]*tke.Label, 0, len(labelsList)) + for _, labels := range labelsList { + label := labels.(map[string]interface{}) + var kv tke.Label + kv.Name = helper.String(label["name"].(string)) + kv.Value = helper.String(label["value"].(string)) + nodeSelectorKV = append(nodeSelectorKV, &kv) + } + clusterAgentPodConfig.NodeSelector = nodeSelectorKV + } + if vv, ok := podConfig["tolerations"]; ok { + tolerationList := vv.([]interface{}) + tolerations := make([]*tke.Toleration, 0, len(tolerationList)) + for _, t := range tolerationList { + tolerationMap := t.(map[string]interface{}) + var toleration tke.Toleration + toleration.Key = helper.String(tolerationMap["key"].(string)) + toleration.Operator = helper.String(tolerationMap["operator"].(string)) + toleration.Effect = helper.String(tolerationMap["effect"].(string)) + tolerations = append(tolerations, &toleration) + } + clusterAgentPodConfig.Tolerations = tolerations + } + prometheusClusterAgent.InClusterPodConfig = clusterAgentPodConfig + } + if v, ok := dMap["external_labels"]; ok { + labelsList := v.([]interface{}) + externalKV := make([]*tke.Label, 0, len(labelsList)) + for _, labels := range labelsList { + label := labels.(map[string]interface{}) + var kv tke.Label + kv.Name = helper.String(label["name"].(string)) + kv.Value = helper.String(label["value"].(string)) + externalKV = append(externalKV, &kv) + } + prometheusClusterAgent.ExternalLabels = externalKV + } + if v, ok := dMap["not_install_basic_scrape"]; ok { + prometheusClusterAgent.NotInstallBasicScrape = helper.Bool(v.(bool)) + } + if v, ok := dMap["not_scrape"]; ok { + prometheusClusterAgent.NotScrape = helper.Bool(v.(bool)) + } + var prometheusClusterAgents []*tke.PrometheusClusterAgentBasic + prometheusClusterAgents = append(prometheusClusterAgents, &prometheusClusterAgent) + request.Agents = prometheusClusterAgents + } + + err := resource.Retry(writeRetryTimeout, func() *resource.RetryError { + result, e := meta.(*TencentCloudClient).apiV3Conn.UseTkeClient().CreatePrometheusClusterAgent(request) + if e != nil { + return retryError(e) + } else { + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", + logId, request.GetAction(), request.ToJsonString(), result.ToJsonString()) + } + return nil + }) + + if err != nil { + log.Printf("[CRITAL]%s create tke cluster agent failed, reason:%+v", logId, err) + return err + } + + service := TkeService{client: meta.(*TencentCloudClient).apiV3Conn} + ctx := context.WithValue(context.TODO(), logIdKey, logId) + + err = resource.Retry(2*readRetryTimeout, func() *resource.RetryError { + clusterAgent, errRet := service.DescribeTmpTkeClusterAgentsById(ctx, instanceId, clusterId, clusterType) + if errRet != nil { + return retryError(errRet, InternalError) + } + if *clusterAgent.Status == "normal" { + return nil + } + if *clusterAgent.Status == "abnormal" { + return resource.NonRetryableError(fmt.Errorf("cluster agent status is %v, operate failed.", *clusterAgent.Status)) + } + return resource.RetryableError(fmt.Errorf("cluster agent status is %v, retry...", *clusterAgent.Status)) + }) + if err != nil { + return err + } + + d.SetId(strings.Join([]string{instanceId, clusterId, clusterType}, FILED_SP)) + + return resourceTencentCloudMonitorTmpTkeClusterAgentRead(d, meta) +} + +func resourceTencentCloudMonitorTmpTkeClusterAgentRead(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("resource.tencentcloud_monitor_tmp_tke_cluster_agent.read")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + ctx := context.WithValue(context.TODO(), logIdKey, logId) + + service := TkeService{client: meta.(*TencentCloudClient).apiV3Conn} + + ids := strings.Split(d.Id(), FILED_SP) + if len(ids) != 3 { + return fmt.Errorf("id is broken, id is %s", d.Id()) + } + + instanceId := ids[0] + clusterId := ids[1] + clusterType := ids[2] + + clusterAgent, err := service.DescribeTmpTkeClusterAgentsById(ctx, instanceId, clusterId, clusterType) + + if err != nil { + return err + } + + if clusterAgent == nil { + d.SetId("") + return fmt.Errorf("resource `global_notification` %s does not exist", instanceId) + } + + _ = d.Set("cluster_id", clusterAgent.ClusterId) + _ = d.Set("cluster_type", clusterAgent.ClusterType) + _ = d.Set("status", clusterAgent.Status) + _ = d.Set("cluster_name", clusterAgent.ClusterName) + if clusterAgent.ExternalLabels != nil { + clusterAgentList := clusterAgent.ExternalLabels + result := make([]map[string]interface{}, 0, len(clusterAgentList)) + for _, v := range clusterAgentList { + mapping := map[string]interface{}{ + "name": v.Name, + "value": v.Value, + } + result = append(result, mapping) + } + _ = d.Set("external_labels", result) + } + + return nil +} + +func resourceTencentCloudMonitorTmpTkeClusterAgentUpdate(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("resource.tencentcloud_monitor_tmp_tke_cluster_agent.update")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + + var ( + request = tke.NewModifyPrometheusAgentExternalLabelsRequest() + response *tke.ModifyPrometheusAgentExternalLabelsResponse + ) + + ids := strings.Split(d.Id(), FILED_SP) + if len(ids) != 3 { + return fmt.Errorf("id is broken, id is %s", d.Id()) + } + + instanceId := ids[0] + clusterId := ids[1] + request.InstanceId = &instanceId + request.ClusterId = &clusterId + + if d.HasChange("instance_id") { + return fmt.Errorf("`instance_id` do not support change now.") + } + + if d.HasChange("cluster_id") { + return fmt.Errorf("`cluster_id` do not support change now.") + } + + if d.HasChange("agents") { + if dMap, ok := helper.InterfacesHeadMap(d, "agents"); ok { + if v, ok := dMap["external_labels"]; ok { + labelsList := v.([]interface{}) + externalKV := make([]*tke.Label, 0, len(labelsList)) + for _, labels := range labelsList { + label := labels.(map[string]interface{}) + var kv tke.Label + kv.Name = helper.String(label["name"].(string)) + kv.Value = helper.String(label["value"].(string)) + externalKV = append(externalKV, &kv) + } + request.ExternalLabels = externalKV + } + } + } + + err := resource.Retry(writeRetryTimeout, func() *resource.RetryError { + result, e := meta.(*TencentCloudClient).apiV3Conn.UseTkeClient().ModifyPrometheusAgentExternalLabels(request) + if e != nil { + return retryError(e) + } else { + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", + logId, request.GetAction(), request.ToJsonString(), result.ToJsonString()) + } + response = result + return nil + }) + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", + logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + + if err != nil { + return err + } + + return resourceTencentCloudTkeTmpAlertPolicyRead(d, meta) +} + +func resourceTencentCloudMonitorTmpTkeClusterAgentDelete(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("resource.tencentcloud_monitor_tmp_tke_cluster_agent.delete")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + ctx := context.WithValue(context.TODO(), logIdKey, logId) + service := TkeService{client: meta.(*TencentCloudClient).apiV3Conn} + + ids := strings.Split(d.Id(), FILED_SP) + if len(ids) != 3 { + return fmt.Errorf("id is broken, id is %s", d.Id()) + } + + instanceId := ids[0] + clusterId := ids[1] + clusterType := ids[2] + + if err := service.DeletePrometheusClusterAgent(ctx, instanceId, clusterId, clusterType); err != nil { + return err + } + + err := resource.Retry(2*readRetryTimeout, func() *resource.RetryError { + clusterAgent, errRet := service.DescribeTmpTkeClusterAgentsById(ctx, instanceId, clusterId, clusterType) + if errRet != nil { + return retryError(errRet, InternalError) + } + if clusterAgent == nil { + return nil + } + return resource.RetryableError(fmt.Errorf("cluster agent status is %v, retry...", *clusterAgent.Status)) + }) + if err != nil { + return err + } + + return nil +} diff --git a/tencentcloud/resource_tc_monitor_tmp_tke_cluster_agent_test.go b/tencentcloud/resource_tc_monitor_tmp_tke_cluster_agent_test.go new file mode 100644 index 0000000000..c29e1670fc --- /dev/null +++ b/tencentcloud/resource_tc_monitor_tmp_tke_cluster_agent_test.go @@ -0,0 +1,151 @@ +package tencentcloud + +import ( + "context" + "fmt" + "strings" + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/terraform" +) + +func init() { + // go test -v ./tencentcloud -sweep=ap-guangzhou -sweep-run=tencentcloud_monitor_tmp_tke_cluster_agent + resource.AddTestSweepers("tencentcloud_monitor_tmp_tke_cluster_agent", &resource.Sweeper{ + Name: "tencentcloud_monitor_tmp_tke_cluster_agent", + F: testSweepClusterAgent, + }) +} +func testSweepClusterAgent(region string) error { + logId := getLogId(contextNil) + ctx := context.WithValue(context.TODO(), logIdKey, logId) + cli, _ := sharedClientForRegion(region) + client := cli.(*TencentCloudClient).apiV3Conn + service := TkeService{client} + + instanceId := defaultPrometheusId + clusterId := "" + clusterType := "" + + agents, err := service.DescribeTmpTkeClusterAgentsById(ctx, instanceId, clusterId, clusterType) + if err != nil { + return err + } + + if agents != nil { + return nil + } + + err = service.DeletePrometheusClusterAgent(ctx, instanceId, clusterId, clusterType) + if err != nil { + return err + } + + return nil +} + +// go test -i; go test -test.run TestAccTencentCloudMonitorClusterAgent_basic -v +func TestAccTencentCloudMonitorClusterAgent_basic(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheckCommon(t, ACCOUNT_TYPE_COMMON) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckClusterAgentDestroy, + Steps: []resource.TestStep{ + { + Config: testClusterAgentYaml_basic, + Check: resource.ComposeTestCheckFunc( + testAccCheckClusterAgentExists("tencentcloud_monitor_tmp_tke_cluster_agent.basic"), + resource.TestCheckResourceAttr("tencentcloud_monitor_tmp_tke_cluster_agent.basic", "agents.0.cluster_id", "cls-87o4klby"), + resource.TestCheckResourceAttr("tencentcloud_monitor_tmp_tke_cluster_agent.basic", "agents.0.cluster_type", "eks"), + ), + }, + }, + }) +} + +func testAccCheckClusterAgentDestroy(s *terraform.State) error { + logId := getLogId(contextNil) + ctx := context.WithValue(context.TODO(), logIdKey, logId) + service := TkeService{client: testAccProvider.Meta().(*TencentCloudClient).apiV3Conn} + for _, rs := range s.RootModule().Resources { + if rs.Type != "tencentcloud_monitor_tmp_tke_cluster_agent" { + continue + } + items := strings.Split(rs.Primary.ID, FILED_SP) + if len(items) != 3 { + return fmt.Errorf("invalid ID %s", rs.Primary.ID) + } + + instanceId := items[0] + clusterId := items[1] + clusterType := items[2] + agents, err := service.DescribeTmpTkeClusterAgentsById(ctx, instanceId, clusterId, clusterType) + if agents != nil { + return fmt.Errorf("cluster agent %s still exists", rs.Primary.ID) + } + if err != nil { + return err + } + } + return nil +} + +func testAccCheckClusterAgentExists(r string) resource.TestCheckFunc { + return func(s *terraform.State) error { + logId := getLogId(contextNil) + ctx := context.WithValue(context.TODO(), logIdKey, logId) + + rs, ok := s.RootModule().Resources[r] + if !ok { + return fmt.Errorf("resource %s is not found", r) + } + if rs.Primary.ID == "" { + return fmt.Errorf("instance id is not set") + } + items := strings.Split(rs.Primary.ID, FILED_SP) + if len(items) != 3 { + return fmt.Errorf("invalid ID %s", rs.Primary.ID) + } + + instanceId := items[0] + clusterId := items[1] + clusterType := items[2] + service := TkeService{client: testAccProvider.Meta().(*TencentCloudClient).apiV3Conn} + agents, err := service.DescribeTmpTkeClusterAgentsById(ctx, instanceId, clusterId, clusterType) + if agents == nil { + return fmt.Errorf("cluster agent %s is not found", rs.Primary.ID) + } + if err != nil { + return err + } + + return nil + } +} + +const testClusterAgentYamlVar = ` +variable "prometheus_id" { + default = "` + defaultPrometheusId + `" +} +variable "default_region" { + default = "` + defaultRegion + `" +} +variable "agent_cluster_id" { + default = "` + tkeClusterIdAgent + `" +} +variable "agent_cluster_type" { + default = "` + tkeClusterTypeAgent + `" +}` + +const testClusterAgentYaml_basic = testClusterAgentYamlVar + ` +resource "tencentcloud_monitor_tmp_tke_cluster_agent" "basic" { + instance_id = var.prometheus_id + agents { + region = var.default_region + cluster_type = var.agent_cluster_type + cluster_id = var.agent_cluster_id + enable_external = false + } +}` diff --git a/tencentcloud/service_tencentcloud_tke.go b/tencentcloud/service_tencentcloud_tke.go index 54c6930424..19cfdcdbd4 100644 --- a/tencentcloud/service_tencentcloud_tke.go +++ b/tencentcloud/service_tencentcloud_tke.go @@ -1989,6 +1989,8 @@ func (me *TkeService) DeletePrometheusRecordRuleYaml(ctx context.Context, id, na logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) return err } + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", + logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) return } @@ -2127,3 +2129,83 @@ func (me *TkeService) DescribePrometheusTempSync(ctx context.Context, templateId return } + +func (me *TkeService) DescribeTmpTkeClusterAgentsById(ctx context.Context, instanceId, clusterId, clusterType string) (agents *tke.PrometheusAgentOverview, errRet error) { + var ( + logId = getLogId(ctx) + request = tke.NewDescribePrometheusClusterAgentsRequest() + ) + + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", + logId, "query object", request.ToJsonString(), errRet.Error()) + } + }() + + request.InstanceId = &instanceId + ratelimit.Check(request.GetAction()) + + var offset uint64 = 0 + var pageSize uint64 = 100 + + for { + request.Offset = &offset + request.Limit = &pageSize + ratelimit.Check(request.GetAction()) + response, err := me.client.UseTkeClient().DescribePrometheusClusterAgents(request) + if err != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", + logId, request.GetAction(), request.ToJsonString(), err.Error()) + errRet = err + return + } + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", + logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + + if response == nil || len(response.Response.Agents) < 1 { + break + } + for _, v := range response.Response.Agents { + if *v.ClusterId == clusterId && *v.ClusterType == clusterType { + return v, nil + } + } + if len(response.Response.Agents) < int(pageSize) { + break + } + offset += pageSize + } + + return +} + +func (me *TkeService) DeletePrometheusClusterAgent(ctx context.Context, instanceId, clusterId, clusterType string) (errRet error) { + logId := getLogId(ctx) + request := tke.NewDeletePrometheusClusterAgentRequest() + + 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()) + } + }() + + request.InstanceId = &instanceId + request.Agents = append(request.Agents, &tke.PrometheusAgentInfo{ + ClusterId: &clusterId, + ClusterType: &clusterType, + }) + + ratelimit.Check(request.GetAction()) + response, err := me.client.UseTkeClient().DeletePrometheusClusterAgent(request) + if err != nil { + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", + logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + return err + } + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", + logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + + return +} diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go index 8d0dce936f..78b619bbf7 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go @@ -265,7 +265,7 @@ func CompleteCommonParams(request Request, region string) { params["Action"] = request.GetAction() params["Timestamp"] = strconv.FormatInt(time.Now().Unix(), 10) params["Nonce"] = strconv.Itoa(rand.Int()) - params["RequestClient"] = "SDK_GO_1.0.479" + params["RequestClient"] = "SDK_GO_1.0.480" } func ConstructParams(req Request) (err error) { diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/client.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/client.go index ad172d49e4..606e2a6565 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/client.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/client.go @@ -49,6 +49,7 @@ func NewAcquireClusterAdminRoleRequest() (request *AcquireClusterAdminRoleReques request = &AcquireClusterAdminRoleRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "AcquireClusterAdminRole") @@ -126,6 +127,7 @@ func NewAddClusterCIDRRequest() (request *AddClusterCIDRRequest) { request = &AddClusterCIDRRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "AddClusterCIDR") @@ -143,6 +145,7 @@ func NewAddClusterCIDRResponse() (response *AddClusterCIDRResponse) { // 给GR集群增加可用的ClusterCIDR // // 可能返回的错误码: +// FAILEDOPERATION_DB = "FailedOperation.Db" // INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate" // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" @@ -154,6 +157,7 @@ func NewAddClusterCIDRResponse() (response *AddClusterCIDRResponse) { // INVALIDPARAMETER_CIDRCONFLICTWITHVPCCIDR = "InvalidParameter.CidrConflictWithVpcCidr" // INVALIDPARAMETER_CIDRCONFLICTWITHVPCGLOBALROUTE = "InvalidParameter.CidrConflictWithVpcGlobalRoute" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// UNSUPPORTEDOPERATION_CLUSTERNOTSUITADDCLUSTERCIDR = "UnsupportedOperation.ClusterNotSuitAddClusterCIDR" func (c *Client) AddClusterCIDR(request *AddClusterCIDRRequest) (response *AddClusterCIDRResponse, err error) { return c.AddClusterCIDRWithContext(context.Background(), request) } @@ -162,6 +166,7 @@ func (c *Client) AddClusterCIDR(request *AddClusterCIDRRequest) (response *AddCl // 给GR集群增加可用的ClusterCIDR // // 可能返回的错误码: +// FAILEDOPERATION_DB = "FailedOperation.Db" // INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate" // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" @@ -173,6 +178,7 @@ func (c *Client) AddClusterCIDR(request *AddClusterCIDRRequest) (response *AddCl // INVALIDPARAMETER_CIDRCONFLICTWITHVPCCIDR = "InvalidParameter.CidrConflictWithVpcCidr" // INVALIDPARAMETER_CIDRCONFLICTWITHVPCGLOBALROUTE = "InvalidParameter.CidrConflictWithVpcGlobalRoute" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// UNSUPPORTEDOPERATION_CLUSTERNOTSUITADDCLUSTERCIDR = "UnsupportedOperation.ClusterNotSuitAddClusterCIDR" func (c *Client) AddClusterCIDRWithContext(ctx context.Context, request *AddClusterCIDRRequest) (response *AddClusterCIDRResponse, err error) { if request == nil { request = NewAddClusterCIDRRequest() @@ -193,6 +199,7 @@ func NewAddExistedInstancesRequest() (request *AddExistedInstancesRequest) { request = &AddExistedInstancesRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "AddExistedInstances") @@ -274,6 +281,7 @@ func NewAddNodeToNodePoolRequest() (request *AddNodeToNodePoolRequest) { request = &AddNodeToNodePoolRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "AddNodeToNodePool") @@ -292,6 +300,7 @@ func NewAddNodeToNodePoolResponse() (response *AddNodeToNodePoolResponse) { // // 可能返回的错误码: // FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" +// FAILEDOPERATION_CVMCOMMON = "FailedOperation.CvmCommon" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" func (c *Client) AddNodeToNodePool(request *AddNodeToNodePoolRequest) (response *AddNodeToNodePoolResponse, err error) { return c.AddNodeToNodePoolWithContext(context.Background(), request) @@ -302,6 +311,7 @@ func (c *Client) AddNodeToNodePool(request *AddNodeToNodePoolRequest) (response // // 可能返回的错误码: // FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" +// FAILEDOPERATION_CVMCOMMON = "FailedOperation.CvmCommon" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" func (c *Client) AddNodeToNodePoolWithContext(ctx context.Context, request *AddNodeToNodePoolRequest) (response *AddNodeToNodePoolResponse, err error) { if request == nil { @@ -323,6 +333,7 @@ func NewAddVpcCniSubnetsRequest() (request *AddVpcCniSubnetsRequest) { request = &AddVpcCniSubnetsRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "AddVpcCniSubnets") @@ -390,6 +401,7 @@ func NewCheckEdgeClusterCIDRRequest() (request *CheckEdgeClusterCIDRRequest) { request = &CheckEdgeClusterCIDRRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "CheckEdgeClusterCIDR") @@ -423,6 +435,7 @@ func NewCheckEdgeClusterCIDRResponse() (response *CheckEdgeClusterCIDRResponse) // INTERNALERROR_VPCPEERNOTFOUND = "InternalError.VpcPeerNotFound" // INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" // INTERNALERROR_VSTATIONERROR = "InternalError.VstationError" +// INVALIDPARAMETER = "InvalidParameter" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" // INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty" // MISSINGPARAMETER = "MissingParameter" @@ -455,6 +468,7 @@ func (c *Client) CheckEdgeClusterCIDR(request *CheckEdgeClusterCIDRRequest) (res // INTERNALERROR_VPCPEERNOTFOUND = "InternalError.VpcPeerNotFound" // INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" // INTERNALERROR_VSTATIONERROR = "InternalError.VstationError" +// INVALIDPARAMETER = "InvalidParameter" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" // INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty" // MISSINGPARAMETER = "MissingParameter" @@ -483,6 +497,7 @@ func NewCheckInstancesUpgradeAbleRequest() (request *CheckInstancesUpgradeAbleRe request = &CheckInstancesUpgradeAbleRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "CheckInstancesUpgradeAble") @@ -550,6 +565,7 @@ func NewCreateClusterRequest() (request *CreateClusterRequest) { request = &CreateClusterRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "CreateCluster") @@ -582,6 +598,7 @@ func NewCreateClusterResponse() (response *CreateClusterResponse) { // FAILEDOPERATION_QUOTAMAXNODLIMIT = "FailedOperation.QuotaMaxNodLimit" // FAILEDOPERATION_QUOTAUSGLIMIT = "FailedOperation.QuotaUSGLimit" // FAILEDOPERATION_TRADECOMMON = "FailedOperation.TradeCommon" +// FAILEDOPERATION_VPCCOMMON = "FailedOperation.VpcCommon" // FAILEDOPERATION_VPCRECODRNOTFOUND = "FailedOperation.VpcRecodrNotFound" // FAILEDOPERATION_WHITELISTUNEXPECTEDERROR = "FailedOperation.WhitelistUnexpectedError" // INTERNALERROR = "InternalError" @@ -624,6 +641,7 @@ func NewCreateClusterResponse() (response *CreateClusterResponse) { // INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute" // INVALIDPARAMETER_CIDRCONFLICTWITHVPCCIDR = "InvalidParameter.CidrConflictWithVpcCidr" // INVALIDPARAMETER_CIDRCONFLICTWITHVPCGLOBALROUTE = "InvalidParameter.CidrConflictWithVpcGlobalRoute" +// INVALIDPARAMETER_CIDRINVALI = "InvalidParameter.CidrInvali" // INVALIDPARAMETER_CIDRINVALID = "InvalidParameter.CidrInvalid" // INVALIDPARAMETER_INVALIDPRIVATENETWORKCIDR = "InvalidParameter.InvalidPrivateNetworkCIDR" // LIMITEXCEEDED = "LimitExceeded" @@ -650,6 +668,7 @@ func (c *Client) CreateCluster(request *CreateClusterRequest) (response *CreateC // FAILEDOPERATION_QUOTAMAXNODLIMIT = "FailedOperation.QuotaMaxNodLimit" // FAILEDOPERATION_QUOTAUSGLIMIT = "FailedOperation.QuotaUSGLimit" // FAILEDOPERATION_TRADECOMMON = "FailedOperation.TradeCommon" +// FAILEDOPERATION_VPCCOMMON = "FailedOperation.VpcCommon" // FAILEDOPERATION_VPCRECODRNOTFOUND = "FailedOperation.VpcRecodrNotFound" // FAILEDOPERATION_WHITELISTUNEXPECTEDERROR = "FailedOperation.WhitelistUnexpectedError" // INTERNALERROR = "InternalError" @@ -692,6 +711,7 @@ func (c *Client) CreateCluster(request *CreateClusterRequest) (response *CreateC // INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute" // INVALIDPARAMETER_CIDRCONFLICTWITHVPCCIDR = "InvalidParameter.CidrConflictWithVpcCidr" // INVALIDPARAMETER_CIDRCONFLICTWITHVPCGLOBALROUTE = "InvalidParameter.CidrConflictWithVpcGlobalRoute" +// INVALIDPARAMETER_CIDRINVALI = "InvalidParameter.CidrInvali" // INVALIDPARAMETER_CIDRINVALID = "InvalidParameter.CidrInvalid" // INVALIDPARAMETER_INVALIDPRIVATENETWORKCIDR = "InvalidParameter.InvalidPrivateNetworkCIDR" // LIMITEXCEEDED = "LimitExceeded" @@ -715,6 +735,7 @@ func NewCreateClusterEndpointRequest() (request *CreateClusterEndpointRequest) { request = &CreateClusterEndpointRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "CreateClusterEndpoint") @@ -733,6 +754,7 @@ func NewCreateClusterEndpointResponse() (response *CreateClusterEndpointResponse // // 可能返回的错误码: // FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_KUBECLIENTCONNECTION = "FailedOperation.KubeClientConnection" // INTERNALERROR = "InternalError" // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" @@ -748,6 +770,7 @@ func NewCreateClusterEndpointResponse() (response *CreateClusterEndpointResponse // RESOURCEINUSE = "ResourceInUse" // RESOURCENOTFOUND = "ResourceNotFound" // RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" // UNAUTHORIZEDOPERATION = "UnauthorizedOperation" // UNKNOWNPARAMETER = "UnknownParameter" // UNSUPPORTEDOPERATION = "UnsupportedOperation" @@ -760,6 +783,7 @@ func (c *Client) CreateClusterEndpoint(request *CreateClusterEndpointRequest) (r // // 可能返回的错误码: // FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_KUBECLIENTCONNECTION = "FailedOperation.KubeClientConnection" // INTERNALERROR = "InternalError" // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" @@ -775,6 +799,7 @@ func (c *Client) CreateClusterEndpoint(request *CreateClusterEndpointRequest) (r // RESOURCEINUSE = "ResourceInUse" // RESOURCENOTFOUND = "ResourceNotFound" // RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" // UNAUTHORIZEDOPERATION = "UnauthorizedOperation" // UNKNOWNPARAMETER = "UnknownParameter" // UNSUPPORTEDOPERATION = "UnsupportedOperation" @@ -798,6 +823,7 @@ func NewCreateClusterEndpointVipRequest() (request *CreateClusterEndpointVipRequ request = &CreateClusterEndpointVipRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "CreateClusterEndpointVip") @@ -830,6 +856,7 @@ func NewCreateClusterEndpointVipResponse() (response *CreateClusterEndpointVipRe // RESOURCEINUSE = "ResourceInUse" // RESOURCENOTFOUND = "ResourceNotFound" // RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" // UNAUTHORIZEDOPERATION = "UnauthorizedOperation" // UNKNOWNPARAMETER = "UnknownParameter" // UNSUPPORTEDOPERATION = "UnsupportedOperation" @@ -856,6 +883,7 @@ func (c *Client) CreateClusterEndpointVip(request *CreateClusterEndpointVipReque // RESOURCEINUSE = "ResourceInUse" // RESOURCENOTFOUND = "ResourceNotFound" // RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" // UNAUTHORIZEDOPERATION = "UnauthorizedOperation" // UNKNOWNPARAMETER = "UnknownParameter" // UNSUPPORTEDOPERATION = "UnsupportedOperation" @@ -879,6 +907,7 @@ func NewCreateClusterInstancesRequest() (request *CreateClusterInstancesRequest) request = &CreateClusterInstancesRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "CreateClusterInstances") @@ -1002,6 +1031,7 @@ func NewCreateClusterNodePoolRequest() (request *CreateClusterNodePoolRequest) { request = &CreateClusterNodePoolRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "CreateClusterNodePool") @@ -1071,6 +1101,7 @@ func NewCreateClusterNodePoolFromExistingAsgRequest() (request *CreateClusterNod request = &CreateClusterNodePoolFromExistingAsgRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "CreateClusterNodePoolFromExistingAsg") @@ -1122,6 +1153,7 @@ func NewCreateClusterRouteRequest() (request *CreateClusterRouteRequest) { request = &CreateClusterRouteRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "CreateClusterRoute") @@ -1139,6 +1171,7 @@ func NewCreateClusterRouteResponse() (response *CreateClusterRouteResponse) { // 创建集群路由 // // 可能返回的错误码: +// FAILEDOPERATION_VPCCOMMON = "FailedOperation.VpcCommon" // INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute" // INTERNALERROR_CIDROUTOFROUTETABLE = "InternalError.CidrOutOfRouteTable" // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" @@ -1161,6 +1194,7 @@ func (c *Client) CreateClusterRoute(request *CreateClusterRouteRequest) (respons // 创建集群路由 // // 可能返回的错误码: +// FAILEDOPERATION_VPCCOMMON = "FailedOperation.VpcCommon" // INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute" // INTERNALERROR_CIDROUTOFROUTETABLE = "InternalError.CidrOutOfRouteTable" // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" @@ -1195,6 +1229,7 @@ func NewCreateClusterRouteTableRequest() (request *CreateClusterRouteTableReques request = &CreateClusterRouteTableRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "CreateClusterRouteTable") @@ -1270,6 +1305,7 @@ func NewCreateECMInstancesRequest() (request *CreateECMInstancesRequest) { request = &CreateECMInstancesRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "CreateECMInstances") @@ -1339,6 +1375,7 @@ func NewCreateEKSClusterRequest() (request *CreateEKSClusterRequest) { request = &CreateEKSClusterRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "CreateEKSCluster") @@ -1408,6 +1445,7 @@ func NewCreateEKSContainerInstancesRequest() (request *CreateEKSContainerInstanc request = &CreateEKSContainerInstancesRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "CreateEKSContainerInstances") @@ -1463,10 +1501,131 @@ func (c *Client) CreateEKSContainerInstancesWithContext(ctx context.Context, req return } +func NewCreateEdgeCVMInstancesRequest() (request *CreateEdgeCVMInstancesRequest) { + request = &CreateEdgeCVMInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("tke", APIVersion, "CreateEdgeCVMInstances") + + + return +} + +func NewCreateEdgeCVMInstancesResponse() (response *CreateEdgeCVMInstancesResponse) { + response = &CreateEdgeCVMInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateEdgeCVMInstances +// 创建边缘容器CVM机器 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) CreateEdgeCVMInstances(request *CreateEdgeCVMInstancesRequest) (response *CreateEdgeCVMInstancesResponse, err error) { + return c.CreateEdgeCVMInstancesWithContext(context.Background(), request) +} + +// CreateEdgeCVMInstances +// 创建边缘容器CVM机器 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) CreateEdgeCVMInstancesWithContext(ctx context.Context, request *CreateEdgeCVMInstancesRequest) (response *CreateEdgeCVMInstancesResponse, err error) { + if request == nil { + request = NewCreateEdgeCVMInstancesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("CreateEdgeCVMInstances require credential") + } + + request.SetContext(ctx) + + response = NewCreateEdgeCVMInstancesResponse() + err = c.Send(request, response) + return +} + +func NewCreateEdgeLogConfigRequest() (request *CreateEdgeLogConfigRequest) { + request = &CreateEdgeLogConfigRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("tke", APIVersion, "CreateEdgeLogConfig") + + + return +} + +func NewCreateEdgeLogConfigResponse() (response *CreateEdgeLogConfigResponse) { + response = &CreateEdgeLogConfigResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateEdgeLogConfig +// 创建边缘集群日志采集配置 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CreateEdgeLogConfig(request *CreateEdgeLogConfigRequest) (response *CreateEdgeLogConfigResponse, err error) { + return c.CreateEdgeLogConfigWithContext(context.Background(), request) +} + +// CreateEdgeLogConfig +// 创建边缘集群日志采集配置 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CreateEdgeLogConfigWithContext(ctx context.Context, request *CreateEdgeLogConfigRequest) (response *CreateEdgeLogConfigResponse, err error) { + if request == nil { + request = NewCreateEdgeLogConfigRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("CreateEdgeLogConfig require credential") + } + + request.SetContext(ctx) + + response = NewCreateEdgeLogConfigResponse() + err = c.Send(request, response) + return +} + func NewCreateImageCacheRequest() (request *CreateImageCacheRequest) { request = &CreateImageCacheRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "CreateImageCache") @@ -1516,6 +1675,7 @@ func NewCreatePrometheusAlertPolicyRequest() (request *CreatePrometheusAlertPoli request = &CreatePrometheusAlertPolicyRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "CreatePrometheusAlertPolicy") @@ -1575,6 +1735,7 @@ func NewCreatePrometheusAlertRuleRequest() (request *CreatePrometheusAlertRuleRe request = &CreatePrometheusAlertRuleRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "CreatePrometheusAlertRule") @@ -1632,6 +1793,7 @@ func NewCreatePrometheusClusterAgentRequest() (request *CreatePrometheusClusterA request = &CreatePrometheusClusterAgentRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "CreatePrometheusClusterAgent") @@ -1649,6 +1811,7 @@ func NewCreatePrometheusClusterAgentResponse() (response *CreatePrometheusCluste // 与云监控融合的2.0实例关联集群 // // 可能返回的错误码: +// FAILEDOPERATION_COMPONENTCLIENTCOMMON = "FailedOperation.ComponentClientCommon" // INTERNALERROR = "InternalError" // INTERNALERROR_DB = "InternalError.Db" // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" @@ -1664,6 +1827,7 @@ func (c *Client) CreatePrometheusClusterAgent(request *CreatePrometheusClusterAg // 与云监控融合的2.0实例关联集群 // // 可能返回的错误码: +// FAILEDOPERATION_COMPONENTCLIENTCOMMON = "FailedOperation.ComponentClientCommon" // INTERNALERROR = "InternalError" // INTERNALERROR_DB = "InternalError.Db" // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" @@ -1691,6 +1855,7 @@ func NewCreatePrometheusConfigRequest() (request *CreatePrometheusConfigRequest) request = &CreatePrometheusConfigRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "CreatePrometheusConfig") @@ -1716,6 +1881,7 @@ func NewCreatePrometheusConfigResponse() (response *CreatePrometheusConfigRespon // INVALIDPARAMETER = "InvalidParameter" // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_PROMCLUSTERNOTFOUND = "InvalidParameter.PromClusterNotFound" // RESOURCEINUSE_RESOURCEEXISTALREADY = "ResourceInUse.ResourceExistAlready" // RESOURCENOTFOUND = "ResourceNotFound" func (c *Client) CreatePrometheusConfig(request *CreatePrometheusConfigRequest) (response *CreatePrometheusConfigResponse, err error) { @@ -1734,6 +1900,7 @@ func (c *Client) CreatePrometheusConfig(request *CreatePrometheusConfigRequest) // INVALIDPARAMETER = "InvalidParameter" // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_PROMCLUSTERNOTFOUND = "InvalidParameter.PromClusterNotFound" // RESOURCEINUSE_RESOURCEEXISTALREADY = "ResourceInUse.ResourceExistAlready" // RESOURCENOTFOUND = "ResourceNotFound" func (c *Client) CreatePrometheusConfigWithContext(ctx context.Context, request *CreatePrometheusConfigRequest) (response *CreatePrometheusConfigResponse, err error) { @@ -1756,6 +1923,7 @@ func NewCreatePrometheusDashboardRequest() (request *CreatePrometheusDashboardRe request = &CreatePrometheusDashboardRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "CreatePrometheusDashboard") @@ -1819,6 +1987,7 @@ func NewCreatePrometheusGlobalNotificationRequest() (request *CreatePrometheusGl request = &CreatePrometheusGlobalNotificationRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "CreatePrometheusGlobalNotification") @@ -1868,6 +2037,7 @@ func NewCreatePrometheusRecordRuleYamlRequest() (request *CreatePrometheusRecord request = &CreatePrometheusRecordRuleYamlRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "CreatePrometheusRecordRuleYaml") @@ -1931,6 +2101,7 @@ func NewCreatePrometheusTempRequest() (request *CreatePrometheusTempRequest) { request = &CreatePrometheusTempRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "CreatePrometheusTemp") @@ -1982,6 +2153,7 @@ func NewCreatePrometheusTemplateRequest() (request *CreatePrometheusTemplateRequ request = &CreatePrometheusTemplateRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "CreatePrometheusTemplate") @@ -2033,6 +2205,7 @@ func NewCreateTKEEdgeClusterRequest() (request *CreateTKEEdgeClusterRequest) { request = &CreateTKEEdgeClusterRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "CreateTKEEdgeCluster") @@ -2100,6 +2273,7 @@ func NewDeleteClusterRequest() (request *DeleteClusterRequest) { request = &DeleteClusterRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DeleteCluster") @@ -2119,6 +2293,7 @@ func NewDeleteClusterResponse() (response *DeleteClusterResponse) { // 可能返回的错误码: // FAILEDOPERATION = "FailedOperation" // FAILEDOPERATION_CAMNOAUTH = "FailedOperation.CamNoAuth" +// FAILEDOPERATION_CLUSTERFORBIDDENTODELETE = "FailedOperation.ClusterForbiddenToDelete" // FAILEDOPERATION_CLUSTERNOTFOUND = "FailedOperation.ClusterNotFound" // FAILEDOPERATION_CLUSTERSTATE = "FailedOperation.ClusterState" // FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" @@ -2146,6 +2321,7 @@ func (c *Client) DeleteCluster(request *DeleteClusterRequest) (response *DeleteC // 可能返回的错误码: // FAILEDOPERATION = "FailedOperation" // FAILEDOPERATION_CAMNOAUTH = "FailedOperation.CamNoAuth" +// FAILEDOPERATION_CLUSTERFORBIDDENTODELETE = "FailedOperation.ClusterForbiddenToDelete" // FAILEDOPERATION_CLUSTERNOTFOUND = "FailedOperation.ClusterNotFound" // FAILEDOPERATION_CLUSTERSTATE = "FailedOperation.ClusterState" // FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" @@ -2183,6 +2359,7 @@ func NewDeleteClusterAsGroupsRequest() (request *DeleteClusterAsGroupsRequest) { request = &DeleteClusterAsGroupsRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterAsGroups") @@ -2266,6 +2443,7 @@ func NewDeleteClusterEndpointRequest() (request *DeleteClusterEndpointRequest) { request = &DeleteClusterEndpointRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterEndpoint") @@ -2355,6 +2533,7 @@ func NewDeleteClusterEndpointVipRequest() (request *DeleteClusterEndpointVipRequ request = &DeleteClusterEndpointVipRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterEndpointVip") @@ -2438,6 +2617,7 @@ func NewDeleteClusterInstancesRequest() (request *DeleteClusterInstancesRequest) request = &DeleteClusterInstancesRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterInstances") @@ -2458,6 +2638,7 @@ func NewDeleteClusterInstancesResponse() (response *DeleteClusterInstancesRespon // FAILEDOPERATION_ASCOMMON = "FailedOperation.AsCommon" // FAILEDOPERATION_CLUSTERNOTFOUND = "FailedOperation.ClusterNotFound" // FAILEDOPERATION_CLUSTERSTATE = "FailedOperation.ClusterState" +// FAILEDOPERATION_DBRECORDNOTFOUND = "FailedOperation.DbRecordNotFound" // FAILEDOPERATION_PARAM = "FailedOperation.Param" // INTERNALERROR = "InternalError" // INTERNALERROR_ASCOMMON = "InternalError.AsCommon" @@ -2481,6 +2662,7 @@ func (c *Client) DeleteClusterInstances(request *DeleteClusterInstancesRequest) // FAILEDOPERATION_ASCOMMON = "FailedOperation.AsCommon" // FAILEDOPERATION_CLUSTERNOTFOUND = "FailedOperation.ClusterNotFound" // FAILEDOPERATION_CLUSTERSTATE = "FailedOperation.ClusterState" +// FAILEDOPERATION_DBRECORDNOTFOUND = "FailedOperation.DbRecordNotFound" // FAILEDOPERATION_PARAM = "FailedOperation.Param" // INTERNALERROR = "InternalError" // INTERNALERROR_ASCOMMON = "InternalError.AsCommon" @@ -2513,6 +2695,7 @@ func NewDeleteClusterNodePoolRequest() (request *DeleteClusterNodePoolRequest) { request = &DeleteClusterNodePoolRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterNodePool") @@ -2532,6 +2715,7 @@ func NewDeleteClusterNodePoolResponse() (response *DeleteClusterNodePoolResponse // 可能返回的错误码: // INTERNALERROR_DB = "InternalError.Db" // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" // RESOURCENOTFOUND = "ResourceNotFound" func (c *Client) DeleteClusterNodePool(request *DeleteClusterNodePoolRequest) (response *DeleteClusterNodePoolResponse, err error) { @@ -2544,6 +2728,7 @@ func (c *Client) DeleteClusterNodePool(request *DeleteClusterNodePoolRequest) (r // 可能返回的错误码: // INTERNALERROR_DB = "InternalError.Db" // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" // RESOURCENOTFOUND = "ResourceNotFound" func (c *Client) DeleteClusterNodePoolWithContext(ctx context.Context, request *DeleteClusterNodePoolRequest) (response *DeleteClusterNodePoolResponse, err error) { @@ -2566,6 +2751,7 @@ func NewDeleteClusterRouteRequest() (request *DeleteClusterRouteRequest) { request = &DeleteClusterRouteRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterRoute") @@ -2625,6 +2811,7 @@ func NewDeleteClusterRouteTableRequest() (request *DeleteClusterRouteTableReques request = &DeleteClusterRouteTableRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterRouteTable") @@ -2682,6 +2869,7 @@ func NewDeleteECMInstancesRequest() (request *DeleteECMInstancesRequest) { request = &DeleteECMInstancesRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DeleteECMInstances") @@ -2751,6 +2939,7 @@ func NewDeleteEKSClusterRequest() (request *DeleteEKSClusterRequest) { request = &DeleteEKSClusterRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DeleteEKSCluster") @@ -2820,6 +3009,7 @@ func NewDeleteEKSContainerInstancesRequest() (request *DeleteEKSContainerInstanc request = &DeleteEKSContainerInstancesRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DeleteEKSContainerInstances") @@ -2883,6 +3073,7 @@ func NewDeleteEdgeCVMInstancesRequest() (request *DeleteEdgeCVMInstancesRequest) request = &DeleteEdgeCVMInstancesRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DeleteEdgeCVMInstances") @@ -2952,6 +3143,7 @@ func NewDeleteEdgeClusterInstancesRequest() (request *DeleteEdgeClusterInstances request = &DeleteEdgeClusterInstancesRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DeleteEdgeClusterInstances") @@ -3021,6 +3213,7 @@ func NewDeleteImageCachesRequest() (request *DeleteImageCachesRequest) { request = &DeleteImageCachesRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DeleteImageCaches") @@ -3072,6 +3265,7 @@ func NewDeletePrometheusAlertPolicyRequest() (request *DeletePrometheusAlertPoli request = &DeletePrometheusAlertPolicyRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DeletePrometheusAlertPolicy") @@ -3125,6 +3319,7 @@ func NewDeletePrometheusAlertRuleRequest() (request *DeletePrometheusAlertRuleRe request = &DeletePrometheusAlertRuleRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DeletePrometheusAlertRule") @@ -3178,6 +3373,7 @@ func NewDeletePrometheusClusterAgentRequest() (request *DeletePrometheusClusterA request = &DeletePrometheusClusterAgentRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DeletePrometheusClusterAgent") @@ -3192,10 +3388,11 @@ func NewDeletePrometheusClusterAgentResponse() (response *DeletePrometheusCluste } // DeletePrometheusClusterAgent -// 解除2.0实例的集群关联 +// 解除TMP实例的集群关联 // // 可能返回的错误码: // FAILEDOPERATION_DBRECORDNOTFOUND = "FailedOperation.DbRecordNotFound" +// FAILEDOPERATION_KUBECOMMON = "FailedOperation.KubeCommon" // INTERNALERROR = "InternalError" // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" // INTERNALERROR_PARAM = "InternalError.Param" @@ -3208,10 +3405,11 @@ func (c *Client) DeletePrometheusClusterAgent(request *DeletePrometheusClusterAg } // DeletePrometheusClusterAgent -// 解除2.0实例的集群关联 +// 解除TMP实例的集群关联 // // 可能返回的错误码: // FAILEDOPERATION_DBRECORDNOTFOUND = "FailedOperation.DbRecordNotFound" +// FAILEDOPERATION_KUBECOMMON = "FailedOperation.KubeCommon" // INTERNALERROR = "InternalError" // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" // INTERNALERROR_PARAM = "InternalError.Param" @@ -3239,6 +3437,7 @@ func NewDeletePrometheusConfigRequest() (request *DeletePrometheusConfigRequest) request = &DeletePrometheusConfigRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DeletePrometheusConfig") @@ -3261,6 +3460,7 @@ func NewDeletePrometheusConfigResponse() (response *DeletePrometheusConfigRespon // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_PROMCLUSTERNOTFOUND = "InvalidParameter.PromClusterNotFound" func (c *Client) DeletePrometheusConfig(request *DeletePrometheusConfigRequest) (response *DeletePrometheusConfigResponse, err error) { return c.DeletePrometheusConfigWithContext(context.Background(), request) } @@ -3274,6 +3474,7 @@ func (c *Client) DeletePrometheusConfig(request *DeletePrometheusConfigRequest) // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_PROMCLUSTERNOTFOUND = "InvalidParameter.PromClusterNotFound" func (c *Client) DeletePrometheusConfigWithContext(ctx context.Context, request *DeletePrometheusConfigRequest) (response *DeletePrometheusConfigResponse, err error) { if request == nil { request = NewDeletePrometheusConfigRequest() @@ -3294,6 +3495,7 @@ func NewDeletePrometheusRecordRuleYamlRequest() (request *DeletePrometheusRecord request = &DeletePrometheusRecordRuleYamlRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DeletePrometheusRecordRuleYaml") @@ -3347,6 +3549,7 @@ func NewDeletePrometheusTempRequest() (request *DeletePrometheusTempRequest) { request = &DeletePrometheusTempRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DeletePrometheusTemp") @@ -3402,6 +3605,7 @@ func NewDeletePrometheusTempSyncRequest() (request *DeletePrometheusTempSyncRequ request = &DeletePrometheusTempSyncRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DeletePrometheusTempSync") @@ -3463,6 +3667,7 @@ func NewDeletePrometheusTemplateRequest() (request *DeletePrometheusTemplateRequ request = &DeletePrometheusTemplateRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DeletePrometheusTemplate") @@ -3518,6 +3723,7 @@ func NewDeletePrometheusTemplateSyncRequest() (request *DeletePrometheusTemplate request = &DeletePrometheusTemplateSyncRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DeletePrometheusTemplateSync") @@ -3577,6 +3783,7 @@ func NewDeleteTKEEdgeClusterRequest() (request *DeleteTKEEdgeClusterRequest) { request = &DeleteTKEEdgeClusterRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DeleteTKEEdgeCluster") @@ -3644,6 +3851,7 @@ func NewDescribeAvailableClusterVersionRequest() (request *DescribeAvailableClus request = &DescribeAvailableClusterVersionRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeAvailableClusterVersion") @@ -3705,6 +3913,7 @@ func NewDescribeAvailableTKEEdgeVersionRequest() (request *DescribeAvailableTKEE request = &DescribeAvailableTKEEdgeVersionRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeAvailableTKEEdgeVersion") @@ -3770,6 +3979,7 @@ func NewDescribeClusterAsGroupOptionRequest() (request *DescribeClusterAsGroupOp request = &DescribeClusterAsGroupOptionRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterAsGroupOption") @@ -3841,6 +4051,7 @@ func NewDescribeClusterAsGroupsRequest() (request *DescribeClusterAsGroupsReques request = &DescribeClusterAsGroupsRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterAsGroups") @@ -3918,6 +4129,7 @@ func NewDescribeClusterAuthenticationOptionsRequest() (request *DescribeClusterA request = &DescribeClusterAuthenticationOptionsRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterAuthenticationOptions") @@ -3971,6 +4183,7 @@ func NewDescribeClusterCommonNamesRequest() (request *DescribeClusterCommonNames request = &DescribeClusterCommonNamesRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterCommonNames") @@ -4036,6 +4249,7 @@ func NewDescribeClusterControllersRequest() (request *DescribeClusterControllers request = &DescribeClusterControllersRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterControllers") @@ -4091,6 +4305,7 @@ func NewDescribeClusterEndpointStatusRequest() (request *DescribeClusterEndpoint request = &DescribeClusterEndpointStatusRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterEndpointStatus") @@ -4184,6 +4399,7 @@ func NewDescribeClusterEndpointVipStatusRequest() (request *DescribeClusterEndpo request = &DescribeClusterEndpointVipStatusRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterEndpointVipStatus") @@ -4269,10 +4485,79 @@ func (c *Client) DescribeClusterEndpointVipStatusWithContext(ctx context.Context return } +func NewDescribeClusterEndpointsRequest() (request *DescribeClusterEndpointsRequest) { + request = &DescribeClusterEndpointsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterEndpoints") + + + return +} + +func NewDescribeClusterEndpointsResponse() (response *DescribeClusterEndpointsResponse) { + response = &DescribeClusterEndpointsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterEndpoints +// 获取集群的访问地址,包括内网地址,外网地址,外网域名,外网访问安全策略 +// +// 可能返回的错误码: +// FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" +// FAILEDOPERATION_KUBERNETESCLIENTBUILDERROR = "FailedOperation.KubernetesClientBuildError" +// INTERNALERROR = "InternalError" +// INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp" +// INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +// RESOURCENOTFOUND_KUBERESOURCENOTFOUND = "ResourceNotFound.KubeResourceNotFound" +// RESOURCEUNAVAILABLE_CLUSTERINABNORMALSTAT = "ResourceUnavailable.ClusterInAbnormalStat" +// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" +func (c *Client) DescribeClusterEndpoints(request *DescribeClusterEndpointsRequest) (response *DescribeClusterEndpointsResponse, err error) { + return c.DescribeClusterEndpointsWithContext(context.Background(), request) +} + +// DescribeClusterEndpoints +// 获取集群的访问地址,包括内网地址,外网地址,外网域名,外网访问安全策略 +// +// 可能返回的错误码: +// FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" +// FAILEDOPERATION_KUBERNETESCLIENTBUILDERROR = "FailedOperation.KubernetesClientBuildError" +// INTERNALERROR = "InternalError" +// INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp" +// INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +// RESOURCENOTFOUND_KUBERESOURCENOTFOUND = "ResourceNotFound.KubeResourceNotFound" +// RESOURCEUNAVAILABLE_CLUSTERINABNORMALSTAT = "ResourceUnavailable.ClusterInAbnormalStat" +// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" +func (c *Client) DescribeClusterEndpointsWithContext(ctx context.Context, request *DescribeClusterEndpointsRequest) (response *DescribeClusterEndpointsResponse, err error) { + if request == nil { + request = NewDescribeClusterEndpointsRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeClusterEndpoints require credential") + } + + request.SetContext(ctx) + + response = NewDescribeClusterEndpointsResponse() + err = c.Send(request, response) + return +} + func NewDescribeClusterInstancesRequest() (request *DescribeClusterInstancesRequest) { request = &DescribeClusterInstancesRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterInstances") @@ -4291,6 +4576,7 @@ func NewDescribeClusterInstancesResponse() (response *DescribeClusterInstancesRe // // 可能返回的错误码: // FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_DB = "FailedOperation.Db" // INTERNALERROR = "InternalError" // INTERNALERROR_DB = "InternalError.Db" // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" @@ -4310,6 +4596,7 @@ func (c *Client) DescribeClusterInstances(request *DescribeClusterInstancesReque // // 可能返回的错误码: // FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_DB = "FailedOperation.Db" // INTERNALERROR = "InternalError" // INTERNALERROR_DB = "InternalError.Db" // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" @@ -4340,6 +4627,7 @@ func NewDescribeClusterKubeconfigRequest() (request *DescribeClusterKubeconfigRe request = &DescribeClusterKubeconfigRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterKubeconfig") @@ -4425,6 +4713,7 @@ func NewDescribeClusterLevelAttributeRequest() (request *DescribeClusterLevelAtt request = &DescribeClusterLevelAttributeRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterLevelAttribute") @@ -4478,6 +4767,7 @@ func NewDescribeClusterLevelChangeRecordsRequest() (request *DescribeClusterLeve request = &DescribeClusterLevelChangeRecordsRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterLevelChangeRecords") @@ -4531,6 +4821,7 @@ func NewDescribeClusterNodePoolDetailRequest() (request *DescribeClusterNodePool request = &DescribeClusterNodePoolDetailRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterNodePoolDetail") @@ -4586,6 +4877,7 @@ func NewDescribeClusterNodePoolsRequest() (request *DescribeClusterNodePoolsRequ request = &DescribeClusterNodePoolsRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterNodePools") @@ -4641,6 +4933,7 @@ func NewDescribeClusterRouteTablesRequest() (request *DescribeClusterRouteTables request = &DescribeClusterRouteTablesRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterRouteTables") @@ -4688,6 +4981,7 @@ func NewDescribeClusterRoutesRequest() (request *DescribeClusterRoutesRequest) { request = &DescribeClusterRoutesRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterRoutes") @@ -4705,6 +4999,7 @@ func NewDescribeClusterRoutesResponse() (response *DescribeClusterRoutesResponse // 查询集群路由 // // 可能返回的错误码: +// FAILEDOPERATION_DB = "FailedOperation.Db" // INTERNALERROR_DB = "InternalError.Db" // INTERNALERROR_PARAM = "InternalError.Param" // INVALIDPARAMETER = "InvalidParameter" @@ -4716,6 +5011,7 @@ func (c *Client) DescribeClusterRoutes(request *DescribeClusterRoutesRequest) (r // 查询集群路由 // // 可能返回的错误码: +// FAILEDOPERATION_DB = "FailedOperation.Db" // INTERNALERROR_DB = "InternalError.Db" // INTERNALERROR_PARAM = "InternalError.Param" // INVALIDPARAMETER = "InvalidParameter" @@ -4739,6 +5035,7 @@ func NewDescribeClusterSecurityRequest() (request *DescribeClusterSecurityReques request = &DescribeClusterSecurityRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterSecurity") @@ -4842,6 +5139,7 @@ func NewDescribeClusterStatusRequest() (request *DescribeClusterStatusRequest) { request = &DescribeClusterStatusRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterStatus") @@ -4919,6 +5217,7 @@ func NewDescribeClustersRequest() (request *DescribeClustersRequest) { request = &DescribeClustersRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusters") @@ -4994,6 +5293,7 @@ func NewDescribeECMInstancesRequest() (request *DescribeECMInstancesRequest) { request = &DescribeECMInstancesRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeECMInstances") @@ -5063,6 +5363,7 @@ func NewDescribeEKSClusterCredentialRequest() (request *DescribeEKSClusterCreden request = &DescribeEKSClusterCredentialRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSClusterCredential") @@ -5132,6 +5433,7 @@ func NewDescribeEKSClustersRequest() (request *DescribeEKSClustersRequest) { request = &DescribeEKSClustersRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSClusters") @@ -5203,6 +5505,7 @@ func NewDescribeEKSContainerInstanceEventRequest() (request *DescribeEKSContaine request = &DescribeEKSContainerInstanceEventRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSContainerInstanceEvent") @@ -5264,6 +5567,7 @@ func NewDescribeEKSContainerInstanceRegionsRequest() (request *DescribeEKSContai request = &DescribeEKSContainerInstanceRegionsRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSContainerInstanceRegions") @@ -5323,6 +5627,7 @@ func NewDescribeEKSContainerInstancesRequest() (request *DescribeEKSContainerIns request = &DescribeEKSContainerInstancesRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSContainerInstances") @@ -5378,6 +5683,7 @@ func NewDescribeEdgeAvailableExtraArgsRequest() (request *DescribeEdgeAvailableE request = &DescribeEdgeAvailableExtraArgsRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeEdgeAvailableExtraArgs") @@ -5427,6 +5733,7 @@ func NewDescribeEdgeCVMInstancesRequest() (request *DescribeEdgeCVMInstancesRequ request = &DescribeEdgeCVMInstancesRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeEdgeCVMInstances") @@ -5496,6 +5803,7 @@ func NewDescribeEdgeClusterExtraArgsRequest() (request *DescribeEdgeClusterExtra request = &DescribeEdgeClusterExtraArgsRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeEdgeClusterExtraArgs") @@ -5555,6 +5863,7 @@ func NewDescribeEdgeClusterInstancesRequest() (request *DescribeEdgeClusterInsta request = &DescribeEdgeClusterInstancesRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeEdgeClusterInstances") @@ -5620,10 +5929,71 @@ func (c *Client) DescribeEdgeClusterInstancesWithContext(ctx context.Context, re return } +func NewDescribeEdgeLogSwitchesRequest() (request *DescribeEdgeLogSwitchesRequest) { + request = &DescribeEdgeLogSwitchesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("tke", APIVersion, "DescribeEdgeLogSwitches") + + + return +} + +func NewDescribeEdgeLogSwitchesResponse() (response *DescribeEdgeLogSwitchesResponse) { + response = &DescribeEdgeLogSwitchesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeEdgeLogSwitches +// 获取事件、审计和日志的状态接口 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_RBACFORBIDDEN = "FailedOperation.RBACForbidden" +// INTERNALERROR = "InternalError" +// INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError" +// INTERNALERROR_KUBERNETESGETOPERATIONERROR = "InternalError.KubernetesGetOperationError" +// INTERNALERROR_PARAM = "InternalError.Param" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeEdgeLogSwitches(request *DescribeEdgeLogSwitchesRequest) (response *DescribeEdgeLogSwitchesResponse, err error) { + return c.DescribeEdgeLogSwitchesWithContext(context.Background(), request) +} + +// DescribeEdgeLogSwitches +// 获取事件、审计和日志的状态接口 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_RBACFORBIDDEN = "FailedOperation.RBACForbidden" +// INTERNALERROR = "InternalError" +// INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError" +// INTERNALERROR_KUBERNETESGETOPERATIONERROR = "InternalError.KubernetesGetOperationError" +// INTERNALERROR_PARAM = "InternalError.Param" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeEdgeLogSwitchesWithContext(ctx context.Context, request *DescribeEdgeLogSwitchesRequest) (response *DescribeEdgeLogSwitchesResponse, err error) { + if request == nil { + request = NewDescribeEdgeLogSwitchesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeEdgeLogSwitches require credential") + } + + request.SetContext(ctx) + + response = NewDescribeEdgeLogSwitchesResponse() + err = c.Send(request, response) + return +} + func NewDescribeEksContainerInstanceLogRequest() (request *DescribeEksContainerInstanceLogRequest) { request = &DescribeEksContainerInstanceLogRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeEksContainerInstanceLog") @@ -5683,6 +6053,7 @@ func NewDescribeEnableVpcCniProgressRequest() (request *DescribeEnableVpcCniProg request = &DescribeEnableVpcCniProgressRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeEnableVpcCniProgress") @@ -5700,6 +6071,7 @@ func NewDescribeEnableVpcCniProgressResponse() (response *DescribeEnableVpcCniPr // 本接口用于查询开启vpc-cni模式的任务进度 // // 可能返回的错误码: +// FAILEDOPERATION_ENABLEVPCCNIFAILED = "FailedOperation.EnableVPCCNIFailed" // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" func (c *Client) DescribeEnableVpcCniProgress(request *DescribeEnableVpcCniProgressRequest) (response *DescribeEnableVpcCniProgressResponse, err error) { @@ -5710,6 +6082,7 @@ func (c *Client) DescribeEnableVpcCniProgress(request *DescribeEnableVpcCniProgr // 本接口用于查询开启vpc-cni模式的任务进度 // // 可能返回的错误码: +// FAILEDOPERATION_ENABLEVPCCNIFAILED = "FailedOperation.EnableVPCCNIFailed" // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" func (c *Client) DescribeEnableVpcCniProgressWithContext(ctx context.Context, request *DescribeEnableVpcCniProgressRequest) (response *DescribeEnableVpcCniProgressResponse, err error) { @@ -5732,6 +6105,7 @@ func NewDescribeExistedInstancesRequest() (request *DescribeExistedInstancesRequ request = &DescribeExistedInstancesRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeExistedInstances") @@ -5845,6 +6219,7 @@ func NewDescribeExternalClusterSpecRequest() (request *DescribeExternalClusterSp request = &DescribeExternalClusterSpecRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeExternalClusterSpec") @@ -5920,6 +6295,7 @@ func NewDescribeImageCachesRequest() (request *DescribeImageCachesRequest) { request = &DescribeImageCachesRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeImageCaches") @@ -5969,6 +6345,7 @@ func NewDescribeImagesRequest() (request *DescribeImagesRequest) { request = &DescribeImagesRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeImages") @@ -6052,6 +6429,7 @@ func NewDescribePrometheusAgentInstancesRequest() (request *DescribePrometheusAg request = &DescribePrometheusAgentInstancesRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusAgentInstances") @@ -6105,6 +6483,7 @@ func NewDescribePrometheusAgentsRequest() (request *DescribePrometheusAgentsRequ request = &DescribePrometheusAgentsRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusAgents") @@ -6160,6 +6539,7 @@ func NewDescribePrometheusAlertHistoryRequest() (request *DescribePrometheusAler request = &DescribePrometheusAlertHistoryRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusAlertHistory") @@ -6177,6 +6557,7 @@ func NewDescribePrometheusAlertHistoryResponse() (response *DescribePrometheusAl // 获取告警历史 // // 可能返回的错误码: +// FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" // INTERNALERROR = "InternalError" // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" // INTERNALERROR_PARAM = "InternalError.Param" @@ -6193,6 +6574,7 @@ func (c *Client) DescribePrometheusAlertHistory(request *DescribePrometheusAlert // 获取告警历史 // // 可能返回的错误码: +// FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" // INTERNALERROR = "InternalError" // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" // INTERNALERROR_PARAM = "InternalError.Param" @@ -6221,6 +6603,7 @@ func NewDescribePrometheusAlertPolicyRequest() (request *DescribePrometheusAlert request = &DescribePrometheusAlertPolicyRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusAlertPolicy") @@ -6290,6 +6673,7 @@ func NewDescribePrometheusAlertRuleRequest() (request *DescribePrometheusAlertRu request = &DescribePrometheusAlertRuleRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusAlertRule") @@ -6355,6 +6739,7 @@ func NewDescribePrometheusClusterAgentsRequest() (request *DescribePrometheusClu request = &DescribePrometheusClusterAgentsRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusClusterAgents") @@ -6412,6 +6797,7 @@ func NewDescribePrometheusConfigRequest() (request *DescribePrometheusConfigRequ request = &DescribePrometheusConfigRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusConfig") @@ -6431,6 +6817,7 @@ func NewDescribePrometheusConfigResponse() (response *DescribePrometheusConfigRe // 可能返回的错误码: // FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" // FAILEDOPERATION_COMPONENTCLIENTUNPACK = "FailedOperation.ComponentClientUnpack" +// FAILEDOPERATION_DB = "FailedOperation.Db" // FAILEDOPERATION_KUBECOMMON = "FailedOperation.KubeCommon" // INTERNALERROR = "InternalError" // INTERNALERROR_DB = "InternalError.Db" @@ -6451,6 +6838,7 @@ func (c *Client) DescribePrometheusConfig(request *DescribePrometheusConfigReque // 可能返回的错误码: // FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" // FAILEDOPERATION_COMPONENTCLIENTUNPACK = "FailedOperation.ComponentClientUnpack" +// FAILEDOPERATION_DB = "FailedOperation.Db" // FAILEDOPERATION_KUBECOMMON = "FailedOperation.KubeCommon" // INTERNALERROR = "InternalError" // INTERNALERROR_DB = "InternalError.Db" @@ -6481,6 +6869,7 @@ func NewDescribePrometheusGlobalConfigRequest() (request *DescribePrometheusGlob request = &DescribePrometheusGlobalConfigRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusGlobalConfig") @@ -6505,6 +6894,7 @@ func NewDescribePrometheusGlobalConfigResponse() (response *DescribePrometheusGl // INTERNALERROR_PARAM = "InternalError.Param" // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" // INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" func (c *Client) DescribePrometheusGlobalConfig(request *DescribePrometheusGlobalConfigRequest) (response *DescribePrometheusGlobalConfigResponse, err error) { return c.DescribePrometheusGlobalConfigWithContext(context.Background(), request) } @@ -6520,6 +6910,7 @@ func (c *Client) DescribePrometheusGlobalConfig(request *DescribePrometheusGloba // INTERNALERROR_PARAM = "InternalError.Param" // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" // INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" func (c *Client) DescribePrometheusGlobalConfigWithContext(ctx context.Context, request *DescribePrometheusGlobalConfigRequest) (response *DescribePrometheusGlobalConfigResponse, err error) { if request == nil { request = NewDescribePrometheusGlobalConfigRequest() @@ -6540,6 +6931,7 @@ func NewDescribePrometheusGlobalNotificationRequest() (request *DescribePromethe request = &DescribePrometheusGlobalNotificationRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusGlobalNotification") @@ -6559,6 +6951,7 @@ func NewDescribePrometheusGlobalNotificationResponse() (response *DescribePromet // 可能返回的错误码: // FAILEDOPERATION_COMPONENTCLIENTCOMMON = "FailedOperation.ComponentClientCommon" // FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" +// FAILEDOPERATION_KUBECLIENTCONF = "FailedOperation.KubeClientConf" // FAILEDOPERATION_KUBECOMMON = "FailedOperation.KubeCommon" // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" @@ -6573,6 +6966,7 @@ func (c *Client) DescribePrometheusGlobalNotification(request *DescribePrometheu // 可能返回的错误码: // FAILEDOPERATION_COMPONENTCLIENTCOMMON = "FailedOperation.ComponentClientCommon" // FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" +// FAILEDOPERATION_KUBECLIENTCONF = "FailedOperation.KubeClientConf" // FAILEDOPERATION_KUBECOMMON = "FailedOperation.KubeCommon" // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" @@ -6597,6 +6991,7 @@ func NewDescribePrometheusInstanceRequest() (request *DescribePrometheusInstance request = &DescribePrometheusInstanceRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusInstance") @@ -6666,6 +7061,7 @@ func NewDescribePrometheusInstanceInitStatusRequest() (request *DescribePromethe request = &DescribePrometheusInstanceInitStatusRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusInstanceInitStatus") @@ -6725,6 +7121,7 @@ func NewDescribePrometheusInstancesOverviewRequest() (request *DescribePrometheu request = &DescribePrometheusInstancesOverviewRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusInstancesOverview") @@ -6782,6 +7179,7 @@ func NewDescribePrometheusOverviewsRequest() (request *DescribePrometheusOvervie request = &DescribePrometheusOverviewsRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusOverviews") @@ -6837,6 +7235,7 @@ func NewDescribePrometheusRecordRulesRequest() (request *DescribePrometheusRecor request = &DescribePrometheusRecordRulesRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusRecordRules") @@ -6855,6 +7254,7 @@ func NewDescribePrometheusRecordRulesResponse() (response *DescribePrometheusRec // // 可能返回的错误码: // FAILEDOPERATION_COMPONENTCLIENTCOMMON = "FailedOperation.ComponentClientCommon" +// FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" // FAILEDOPERATION_COMPONENTCLIENTUNPACK = "FailedOperation.ComponentClientUnpack" // FAILEDOPERATION_KUBECLIENTCONF = "FailedOperation.KubeClientConf" // FAILEDOPERATION_KUBECOMMON = "FailedOperation.KubeCommon" @@ -6873,6 +7273,7 @@ func (c *Client) DescribePrometheusRecordRules(request *DescribePrometheusRecord // // 可能返回的错误码: // FAILEDOPERATION_COMPONENTCLIENTCOMMON = "FailedOperation.ComponentClientCommon" +// FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" // FAILEDOPERATION_COMPONENTCLIENTUNPACK = "FailedOperation.ComponentClientUnpack" // FAILEDOPERATION_KUBECLIENTCONF = "FailedOperation.KubeClientConf" // FAILEDOPERATION_KUBECOMMON = "FailedOperation.KubeCommon" @@ -6902,6 +7303,7 @@ func NewDescribePrometheusTargetsRequest() (request *DescribePrometheusTargetsRe request = &DescribePrometheusTargetsRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusTargets") @@ -6965,6 +7367,7 @@ func NewDescribePrometheusTempRequest() (request *DescribePrometheusTempRequest) request = &DescribePrometheusTempRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusTemp") @@ -6982,6 +7385,7 @@ func NewDescribePrometheusTempResponse() (response *DescribePrometheusTempRespon // 拉取模板列表,默认模板将总是在最前面 // // 可能返回的错误码: +// FAILEDOPERATION_COMPONENTCLIENTUNPACK = "FailedOperation.ComponentClientUnpack" // INTERNALERROR_DB = "InternalError.Db" // INTERNALERROR_PARAM = "InternalError.Param" // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" @@ -6994,6 +7398,7 @@ func (c *Client) DescribePrometheusTemp(request *DescribePrometheusTempRequest) // 拉取模板列表,默认模板将总是在最前面 // // 可能返回的错误码: +// FAILEDOPERATION_COMPONENTCLIENTUNPACK = "FailedOperation.ComponentClientUnpack" // INTERNALERROR_DB = "InternalError.Db" // INTERNALERROR_PARAM = "InternalError.Param" // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" @@ -7018,6 +7423,7 @@ func NewDescribePrometheusTempSyncRequest() (request *DescribePrometheusTempSync request = &DescribePrometheusTempSyncRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusTempSync") @@ -7073,6 +7479,7 @@ func NewDescribePrometheusTemplateSyncRequest() (request *DescribePrometheusTemp request = &DescribePrometheusTemplateSyncRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusTemplateSync") @@ -7126,6 +7533,7 @@ func NewDescribePrometheusTemplatesRequest() (request *DescribePrometheusTemplat request = &DescribePrometheusTemplatesRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusTemplates") @@ -7177,6 +7585,7 @@ func NewDescribeRegionsRequest() (request *DescribeRegionsRequest) { request = &DescribeRegionsRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeRegions") @@ -7256,6 +7665,7 @@ func NewDescribeResourceUsageRequest() (request *DescribeResourceUsageRequest) { request = &DescribeResourceUsageRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeResourceUsage") @@ -7313,6 +7723,7 @@ func NewDescribeRouteTableConflictsRequest() (request *DescribeRouteTableConflic request = &DescribeRouteTableConflictsRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeRouteTableConflicts") @@ -7374,6 +7785,7 @@ func NewDescribeTKEEdgeClusterCredentialRequest() (request *DescribeTKEEdgeClust request = &DescribeTKEEdgeClusterCredentialRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeTKEEdgeClusterCredential") @@ -7441,6 +7853,7 @@ func NewDescribeTKEEdgeClusterStatusRequest() (request *DescribeTKEEdgeClusterSt request = &DescribeTKEEdgeClusterStatusRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeTKEEdgeClusterStatus") @@ -7508,6 +7921,7 @@ func NewDescribeTKEEdgeClustersRequest() (request *DescribeTKEEdgeClustersReques request = &DescribeTKEEdgeClustersRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeTKEEdgeClusters") @@ -7575,6 +7989,7 @@ func NewDescribeTKEEdgeExternalKubeconfigRequest() (request *DescribeTKEEdgeExte request = &DescribeTKEEdgeExternalKubeconfigRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeTKEEdgeExternalKubeconfig") @@ -7642,6 +8057,7 @@ func NewDescribeTKEEdgeScriptRequest() (request *DescribeTKEEdgeScriptRequest) { request = &DescribeTKEEdgeScriptRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeTKEEdgeScript") @@ -7709,6 +8125,7 @@ func NewDescribeVersionsRequest() (request *DescribeVersionsRequest) { request = &DescribeVersionsRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeVersions") @@ -7794,6 +8211,7 @@ func NewDescribeVpcCniPodLimitsRequest() (request *DescribeVpcCniPodLimitsReques request = &DescribeVpcCniPodLimitsRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DescribeVpcCniPodLimits") @@ -7865,6 +8283,7 @@ func NewDisableClusterAuditRequest() (request *DisableClusterAuditRequest) { request = &DisableClusterAuditRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DisableClusterAudit") @@ -7882,6 +8301,7 @@ func NewDisableClusterAuditResponse() (response *DisableClusterAuditResponse) { // 关闭集群审计 // // 可能返回的错误码: +// FAILEDOPERATION_DB = "FailedOperation.Db" // FAILEDOPERATION_KUBERNETESPATCHOPERATIONERROR = "FailedOperation.KubernetesPatchOperationError" // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" @@ -7893,6 +8313,7 @@ func (c *Client) DisableClusterAudit(request *DisableClusterAuditRequest) (respo // 关闭集群审计 // // 可能返回的错误码: +// FAILEDOPERATION_DB = "FailedOperation.Db" // FAILEDOPERATION_KUBERNETESPATCHOPERATIONERROR = "FailedOperation.KubernetesPatchOperationError" // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" @@ -7916,6 +8337,7 @@ func NewDisableClusterDeletionProtectionRequest() (request *DisableClusterDeleti request = &DisableClusterDeletionProtectionRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DisableClusterDeletionProtection") @@ -7967,6 +8389,7 @@ func NewDisableEventPersistenceRequest() (request *DisableEventPersistenceReques request = &DisableEventPersistenceRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DisableEventPersistence") @@ -8032,6 +8455,7 @@ func NewDisableVpcCniNetworkTypeRequest() (request *DisableVpcCniNetworkTypeRequ request = &DisableVpcCniNetworkTypeRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "DisableVpcCniNetworkType") @@ -8049,6 +8473,7 @@ func NewDisableVpcCniNetworkTypeResponse() (response *DisableVpcCniNetworkTypeRe // 提供给附加了VPC-CNI能力的Global-Route集群关闭VPC-CNI // // 可能返回的错误码: +// FAILEDOPERATION_DISABLEVPCCNIFAILED = "FailedOperation.DisableVPCCNIFailed" // INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate" // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" @@ -8062,6 +8487,7 @@ func (c *Client) DisableVpcCniNetworkType(request *DisableVpcCniNetworkTypeReque // 提供给附加了VPC-CNI能力的Global-Route集群关闭VPC-CNI // // 可能返回的错误码: +// FAILEDOPERATION_DISABLEVPCCNIFAILED = "FailedOperation.DisableVPCCNIFailed" // INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate" // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" @@ -8087,6 +8513,7 @@ func NewEnableClusterAuditRequest() (request *EnableClusterAuditRequest) { request = &EnableClusterAuditRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "EnableClusterAudit") @@ -8104,7 +8531,15 @@ func NewEnableClusterAuditResponse() (response *EnableClusterAuditResponse) { // 开启集群审计 // // 可能返回的错误码: +// FAILEDOPERATION_CREATECLSINDEX = "FailedOperation.CreateClsIndex" +// FAILEDOPERATION_CREATECLSMACHINEGROUP = "FailedOperation.CreateClsMachineGroup" +// FAILEDOPERATION_CREATECLSTOPIC = "FailedOperation.CreateClsTopic" +// FAILEDOPERATION_DB = "FailedOperation.Db" // FAILEDOPERATION_GETCLSMACHINEGROUP = "FailedOperation.GetClsMachineGroup" +// FAILEDOPERATION_KUBERNETESCREATEOPERATIONERROR = "FailedOperation.KubernetesCreateOperationError" +// FAILEDOPERATION_KUBERNETESDELETEOPERATIONERROR = "FailedOperation.KubernetesDeleteOperationError" +// FAILEDOPERATION_KUBERNETESPATCHOPERATIONERROR = "FailedOperation.KubernetesPatchOperationError" +// FAILEDOPERATION_MODIFYCLSINDEX = "FailedOperation.ModifyClsIndex" // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" @@ -8117,7 +8552,15 @@ func (c *Client) EnableClusterAudit(request *EnableClusterAuditRequest) (respons // 开启集群审计 // // 可能返回的错误码: +// FAILEDOPERATION_CREATECLSINDEX = "FailedOperation.CreateClsIndex" +// FAILEDOPERATION_CREATECLSMACHINEGROUP = "FailedOperation.CreateClsMachineGroup" +// FAILEDOPERATION_CREATECLSTOPIC = "FailedOperation.CreateClsTopic" +// FAILEDOPERATION_DB = "FailedOperation.Db" // FAILEDOPERATION_GETCLSMACHINEGROUP = "FailedOperation.GetClsMachineGroup" +// FAILEDOPERATION_KUBERNETESCREATEOPERATIONERROR = "FailedOperation.KubernetesCreateOperationError" +// FAILEDOPERATION_KUBERNETESDELETEOPERATIONERROR = "FailedOperation.KubernetesDeleteOperationError" +// FAILEDOPERATION_KUBERNETESPATCHOPERATIONERROR = "FailedOperation.KubernetesPatchOperationError" +// FAILEDOPERATION_MODIFYCLSINDEX = "FailedOperation.ModifyClsIndex" // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" @@ -8142,6 +8585,7 @@ func NewEnableClusterDeletionProtectionRequest() (request *EnableClusterDeletion request = &EnableClusterDeletionProtectionRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "EnableClusterDeletionProtection") @@ -8193,6 +8637,7 @@ func NewEnableEventPersistenceRequest() (request *EnableEventPersistenceRequest) request = &EnableEventPersistenceRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "EnableEventPersistence") @@ -8213,8 +8658,10 @@ func NewEnableEventPersistenceResponse() (response *EnableEventPersistenceRespon // FAILEDOPERATION = "FailedOperation" // FAILEDOPERATION_CLUSTERNOTFOUND = "FailedOperation.ClusterNotFound" // FAILEDOPERATION_CREATECLSCONFIG = "FailedOperation.CreateClsConfig" +// FAILEDOPERATION_CREATECLSINDEX = "FailedOperation.CreateClsIndex" // FAILEDOPERATION_CREATECLSLOGSET = "FailedOperation.CreateClsLogSet" // FAILEDOPERATION_CREATECLSTOPIC = "FailedOperation.CreateClsTopic" +// FAILEDOPERATION_GETCLSCONFIG = "FailedOperation.GetClsConfig" // FAILEDOPERATION_GETCLSLOGSET = "FailedOperation.GetClsLogSet" // FAILEDOPERATION_MODIFYCLSINDEX = "FailedOperation.ModifyClsIndex" // FAILEDOPERATION_RBACFORBIDDEN = "FailedOperation.RBACForbidden" @@ -8240,8 +8687,10 @@ func (c *Client) EnableEventPersistence(request *EnableEventPersistenceRequest) // FAILEDOPERATION = "FailedOperation" // FAILEDOPERATION_CLUSTERNOTFOUND = "FailedOperation.ClusterNotFound" // FAILEDOPERATION_CREATECLSCONFIG = "FailedOperation.CreateClsConfig" +// FAILEDOPERATION_CREATECLSINDEX = "FailedOperation.CreateClsIndex" // FAILEDOPERATION_CREATECLSLOGSET = "FailedOperation.CreateClsLogSet" // FAILEDOPERATION_CREATECLSTOPIC = "FailedOperation.CreateClsTopic" +// FAILEDOPERATION_GETCLSCONFIG = "FailedOperation.GetClsConfig" // FAILEDOPERATION_GETCLSLOGSET = "FailedOperation.GetClsLogSet" // FAILEDOPERATION_MODIFYCLSINDEX = "FailedOperation.ModifyClsIndex" // FAILEDOPERATION_RBACFORBIDDEN = "FailedOperation.RBACForbidden" @@ -8276,6 +8725,7 @@ func NewEnableVpcCniNetworkTypeRequest() (request *EnableVpcCniNetworkTypeReques request = &EnableVpcCniNetworkTypeRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "EnableVpcCniNetworkType") @@ -8293,9 +8743,11 @@ func NewEnableVpcCniNetworkTypeResponse() (response *EnableVpcCniNetworkTypeResp // GR集群可以通过本接口附加vpc-cni容器网络插件,开启vpc-cni容器网络能力 // // 可能返回的错误码: +// FAILEDOPERATION_ENABLEVPCCNIFAILED = "FailedOperation.EnableVPCCNIFailed" // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// UNSUPPORTEDOPERATION_CLUSTERNOTSUITENABLEVPCCNI = "UnsupportedOperation.ClusterNotSuitEnableVPCCNI" func (c *Client) EnableVpcCniNetworkType(request *EnableVpcCniNetworkTypeRequest) (response *EnableVpcCniNetworkTypeResponse, err error) { return c.EnableVpcCniNetworkTypeWithContext(context.Background(), request) } @@ -8304,9 +8756,11 @@ func (c *Client) EnableVpcCniNetworkType(request *EnableVpcCniNetworkTypeRequest // GR集群可以通过本接口附加vpc-cni容器网络插件,开启vpc-cni容器网络能力 // // 可能返回的错误码: +// FAILEDOPERATION_ENABLEVPCCNIFAILED = "FailedOperation.EnableVPCCNIFailed" // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// UNSUPPORTEDOPERATION_CLUSTERNOTSUITENABLEVPCCNI = "UnsupportedOperation.ClusterNotSuitEnableVPCCNI" func (c *Client) EnableVpcCniNetworkTypeWithContext(ctx context.Context, request *EnableVpcCniNetworkTypeRequest) (response *EnableVpcCniNetworkTypeResponse, err error) { if request == nil { request = NewEnableVpcCniNetworkTypeRequest() @@ -8327,6 +8781,7 @@ func NewForwardApplicationRequestV3Request() (request *ForwardApplicationRequest request = &ForwardApplicationRequestV3Request{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "ForwardApplicationRequestV3") @@ -8402,6 +8857,7 @@ func NewForwardTKEEdgeApplicationRequestV3Request() (request *ForwardTKEEdgeAppl request = &ForwardTKEEdgeApplicationRequestV3Request{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "ForwardTKEEdgeApplicationRequestV3") @@ -8473,6 +8929,7 @@ func NewGetClusterLevelPriceRequest() (request *GetClusterLevelPriceRequest) { request = &GetClusterLevelPriceRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "GetClusterLevelPrice") @@ -8522,6 +8979,7 @@ func NewGetMostSuitableImageCacheRequest() (request *GetMostSuitableImageCacheRe request = &GetMostSuitableImageCacheRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "GetMostSuitableImageCache") @@ -8573,6 +9031,7 @@ func NewGetTkeAppChartListRequest() (request *GetTkeAppChartListRequest) { request = &GetTkeAppChartListRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "GetTkeAppChartList") @@ -8622,6 +9081,7 @@ func NewGetUpgradeInstanceProgressRequest() (request *GetUpgradeInstanceProgress request = &GetUpgradeInstanceProgressRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "GetUpgradeInstanceProgress") @@ -8667,10 +9127,65 @@ func (c *Client) GetUpgradeInstanceProgressWithContext(ctx context.Context, requ return } +func NewInstallEdgeLogAgentRequest() (request *InstallEdgeLogAgentRequest) { + request = &InstallEdgeLogAgentRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("tke", APIVersion, "InstallEdgeLogAgent") + + + return +} + +func NewInstallEdgeLogAgentResponse() (response *InstallEdgeLogAgentResponse) { + response = &InstallEdgeLogAgentResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// InstallEdgeLogAgent +// 在tke@edge集群的边缘节点上安装日志采集组件 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) InstallEdgeLogAgent(request *InstallEdgeLogAgentRequest) (response *InstallEdgeLogAgentResponse, err error) { + return c.InstallEdgeLogAgentWithContext(context.Background(), request) +} + +// InstallEdgeLogAgent +// 在tke@edge集群的边缘节点上安装日志采集组件 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) InstallEdgeLogAgentWithContext(ctx context.Context, request *InstallEdgeLogAgentRequest) (response *InstallEdgeLogAgentResponse, err error) { + if request == nil { + request = NewInstallEdgeLogAgentRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("InstallEdgeLogAgent require credential") + } + + request.SetContext(ctx) + + response = NewInstallEdgeLogAgentResponse() + err = c.Send(request, response) + return +} + func NewInstallLogAgentRequest() (request *InstallLogAgentRequest) { request = &InstallLogAgentRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "InstallLogAgent") @@ -8724,6 +9239,7 @@ func NewModifyClusterAsGroupAttributeRequest() (request *ModifyClusterAsGroupAtt request = &ModifyClusterAsGroupAttributeRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterAsGroupAttribute") @@ -8742,6 +9258,7 @@ func NewModifyClusterAsGroupAttributeResponse() (response *ModifyClusterAsGroupA // // 可能返回的错误码: // FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_PARAM = "FailedOperation.Param" // INTERNALERROR = "InternalError" // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" // INTERNALERROR_ASCOMMON = "InternalError.AsCommon" @@ -8771,6 +9288,7 @@ func (c *Client) ModifyClusterAsGroupAttribute(request *ModifyClusterAsGroupAttr // // 可能返回的错误码: // FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_PARAM = "FailedOperation.Param" // INTERNALERROR = "InternalError" // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" // INTERNALERROR_ASCOMMON = "InternalError.AsCommon" @@ -8811,6 +9329,7 @@ func NewModifyClusterAsGroupOptionAttributeRequest() (request *ModifyClusterAsGr request = &ModifyClusterAsGroupOptionAttributeRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterAsGroupOptionAttribute") @@ -8890,6 +9409,7 @@ func NewModifyClusterAttributeRequest() (request *ModifyClusterAttributeRequest) request = &ModifyClusterAttributeRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterAttribute") @@ -8969,6 +9489,7 @@ func NewModifyClusterAuthenticationOptionsRequest() (request *ModifyClusterAuthe request = &ModifyClusterAuthenticationOptionsRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterAuthenticationOptions") @@ -9024,6 +9545,7 @@ func NewModifyClusterEndpointSPRequest() (request *ModifyClusterEndpointSPReques request = &ModifyClusterEndpointSPRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterEndpointSP") @@ -9111,6 +9633,7 @@ func NewModifyClusterNodePoolRequest() (request *ModifyClusterNodePoolRequest) { request = &ModifyClusterNodePoolRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterNodePool") @@ -9134,6 +9657,7 @@ func NewModifyClusterNodePoolResponse() (response *ModifyClusterNodePoolResponse // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" // OPERATIONDENIED = "OperationDenied" // RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCENOTFOUND_ASASGNOTEXIST = "ResourceNotFound.AsAsgNotExist" // UNSUPPORTEDOPERATION_CAENABLEFAILED = "UnsupportedOperation.CaEnableFailed" func (c *Client) ModifyClusterNodePool(request *ModifyClusterNodePoolRequest) (response *ModifyClusterNodePoolResponse, err error) { return c.ModifyClusterNodePoolWithContext(context.Background(), request) @@ -9149,6 +9673,7 @@ func (c *Client) ModifyClusterNodePool(request *ModifyClusterNodePoolRequest) (r // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" // OPERATIONDENIED = "OperationDenied" // RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCENOTFOUND_ASASGNOTEXIST = "ResourceNotFound.AsAsgNotExist" // UNSUPPORTEDOPERATION_CAENABLEFAILED = "UnsupportedOperation.CaEnableFailed" func (c *Client) ModifyClusterNodePoolWithContext(ctx context.Context, request *ModifyClusterNodePoolRequest) (response *ModifyClusterNodePoolResponse, err error) { if request == nil { @@ -9170,6 +9695,7 @@ func NewModifyNodePoolDesiredCapacityAboutAsgRequest() (request *ModifyNodePoolD request = &ModifyNodePoolDesiredCapacityAboutAsgRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "ModifyNodePoolDesiredCapacityAboutAsg") @@ -9194,6 +9720,7 @@ func NewModifyNodePoolDesiredCapacityAboutAsgResponse() (response *ModifyNodePoo // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" // INVALIDPARAMETER = "InvalidParameter" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND = "ResourceNotFound" // RESOURCENOTFOUND_ASASGNOTEXIST = "ResourceNotFound.AsAsgNotExist" // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" // UNKNOWNPARAMETER = "UnknownParameter" @@ -9212,6 +9739,7 @@ func (c *Client) ModifyNodePoolDesiredCapacityAboutAsg(request *ModifyNodePoolDe // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" // INVALIDPARAMETER = "InvalidParameter" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND = "ResourceNotFound" // RESOURCENOTFOUND_ASASGNOTEXIST = "ResourceNotFound.AsAsgNotExist" // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" // UNKNOWNPARAMETER = "UnknownParameter" @@ -9235,6 +9763,7 @@ func NewModifyNodePoolInstanceTypesRequest() (request *ModifyNodePoolInstanceTyp request = &ModifyNodePoolInstanceTypesRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "ModifyNodePoolInstanceTypes") @@ -9302,6 +9831,7 @@ func NewModifyPrometheusAgentExternalLabelsRequest() (request *ModifyPrometheusA request = &ModifyPrometheusAgentExternalLabelsRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "ModifyPrometheusAgentExternalLabels") @@ -9319,6 +9849,7 @@ func NewModifyPrometheusAgentExternalLabelsResponse() (response *ModifyPrometheu // 修改被关联集群的external labels // // 可能返回的错误码: +// FAILEDOPERATION_COMPONENTCLIENTUNPACK = "FailedOperation.ComponentClientUnpack" // INTERNALERROR = "InternalError" // INTERNALERROR_DB = "InternalError.Db" // INTERNALERROR_PARAM = "InternalError.Param" @@ -9334,6 +9865,7 @@ func (c *Client) ModifyPrometheusAgentExternalLabels(request *ModifyPrometheusAg // 修改被关联集群的external labels // // 可能返回的错误码: +// FAILEDOPERATION_COMPONENTCLIENTUNPACK = "FailedOperation.ComponentClientUnpack" // INTERNALERROR = "InternalError" // INTERNALERROR_DB = "InternalError.Db" // INTERNALERROR_PARAM = "InternalError.Param" @@ -9361,6 +9893,7 @@ func NewModifyPrometheusAlertPolicyRequest() (request *ModifyPrometheusAlertPoli request = &ModifyPrometheusAlertPolicyRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "ModifyPrometheusAlertPolicy") @@ -9378,6 +9911,8 @@ func NewModifyPrometheusAlertPolicyResponse() (response *ModifyPrometheusAlertPo // 修改2.0实例告警策略 // // 可能返回的错误码: +// FAILEDOPERATION_COMPONENTCLIENTUNPACK = "FailedOperation.ComponentClientUnpack" +// FAILEDOPERATION_KUBECOMMON = "FailedOperation.KubeCommon" // INTERNALERROR = "InternalError" // INTERNALERROR_PARAM = "InternalError.Param" // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" @@ -9391,6 +9926,8 @@ func (c *Client) ModifyPrometheusAlertPolicy(request *ModifyPrometheusAlertPolic // 修改2.0实例告警策略 // // 可能返回的错误码: +// FAILEDOPERATION_COMPONENTCLIENTUNPACK = "FailedOperation.ComponentClientUnpack" +// FAILEDOPERATION_KUBECOMMON = "FailedOperation.KubeCommon" // INTERNALERROR = "InternalError" // INTERNALERROR_PARAM = "InternalError.Param" // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" @@ -9416,6 +9953,7 @@ func NewModifyPrometheusAlertRuleRequest() (request *ModifyPrometheusAlertRuleRe request = &ModifyPrometheusAlertRuleRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "ModifyPrometheusAlertRule") @@ -9433,6 +9971,8 @@ func NewModifyPrometheusAlertRuleResponse() (response *ModifyPrometheusAlertRule // 修改告警规则 // // 可能返回的错误码: +// FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" +// FAILEDOPERATION_KUBECOMMON = "FailedOperation.KubeCommon" // INTERNALERROR = "InternalError" // INTERNALERROR_PARAM = "InternalError.Param" // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" @@ -9447,6 +9987,8 @@ func (c *Client) ModifyPrometheusAlertRule(request *ModifyPrometheusAlertRuleReq // 修改告警规则 // // 可能返回的错误码: +// FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" +// FAILEDOPERATION_KUBECOMMON = "FailedOperation.KubeCommon" // INTERNALERROR = "InternalError" // INTERNALERROR_PARAM = "InternalError.Param" // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" @@ -9473,6 +10015,7 @@ func NewModifyPrometheusConfigRequest() (request *ModifyPrometheusConfigRequest) request = &ModifyPrometheusConfigRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "ModifyPrometheusConfig") @@ -9496,6 +10039,7 @@ func NewModifyPrometheusConfigResponse() (response *ModifyPrometheusConfigRespon // INVALIDPARAMETER = "InvalidParameter" // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_PROMCLUSTERNOTFOUND = "InvalidParameter.PromClusterNotFound" func (c *Client) ModifyPrometheusConfig(request *ModifyPrometheusConfigRequest) (response *ModifyPrometheusConfigResponse, err error) { return c.ModifyPrometheusConfigWithContext(context.Background(), request) } @@ -9510,6 +10054,7 @@ func (c *Client) ModifyPrometheusConfig(request *ModifyPrometheusConfigRequest) // INVALIDPARAMETER = "InvalidParameter" // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_PROMCLUSTERNOTFOUND = "InvalidParameter.PromClusterNotFound" func (c *Client) ModifyPrometheusConfigWithContext(ctx context.Context, request *ModifyPrometheusConfigRequest) (response *ModifyPrometheusConfigResponse, err error) { if request == nil { request = NewModifyPrometheusConfigRequest() @@ -9530,6 +10075,7 @@ func NewModifyPrometheusGlobalNotificationRequest() (request *ModifyPrometheusGl request = &ModifyPrometheusGlobalNotificationRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "ModifyPrometheusGlobalNotification") @@ -9547,12 +10093,8 @@ func NewModifyPrometheusGlobalNotificationResponse() (response *ModifyPrometheus // 修改全局告警通知渠道 // // 可能返回的错误码: -// INTERNALERROR = "InternalError" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" func (c *Client) ModifyPrometheusGlobalNotification(request *ModifyPrometheusGlobalNotificationRequest) (response *ModifyPrometheusGlobalNotificationResponse, err error) { return c.ModifyPrometheusGlobalNotificationWithContext(context.Background(), request) } @@ -9561,12 +10103,8 @@ func (c *Client) ModifyPrometheusGlobalNotification(request *ModifyPrometheusGlo // 修改全局告警通知渠道 // // 可能返回的错误码: -// INTERNALERROR = "InternalError" -// INTERNALERROR_PARAM = "InternalError.Param" -// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" -// INVALIDPARAMETER = "InvalidParameter" -// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" func (c *Client) ModifyPrometheusGlobalNotificationWithContext(ctx context.Context, request *ModifyPrometheusGlobalNotificationRequest) (response *ModifyPrometheusGlobalNotificationResponse, err error) { if request == nil { request = NewModifyPrometheusGlobalNotificationRequest() @@ -9587,6 +10125,7 @@ func NewModifyPrometheusRecordRuleYamlRequest() (request *ModifyPrometheusRecord request = &ModifyPrometheusRecordRuleYamlRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "ModifyPrometheusRecordRuleYaml") @@ -9604,6 +10143,7 @@ func NewModifyPrometheusRecordRuleYamlResponse() (response *ModifyPrometheusReco // 通过yaml的方式修改Prometheus聚合实例 // // 可能返回的错误码: +// FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" // INTERNALERROR = "InternalError" // INTERNALERROR_PARAM = "InternalError.Param" // INVALIDPARAMETER = "InvalidParameter" @@ -9617,6 +10157,7 @@ func (c *Client) ModifyPrometheusRecordRuleYaml(request *ModifyPrometheusRecordR // 通过yaml的方式修改Prometheus聚合实例 // // 可能返回的错误码: +// FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" // INTERNALERROR = "InternalError" // INTERNALERROR_PARAM = "InternalError.Param" // INVALIDPARAMETER = "InvalidParameter" @@ -9642,6 +10183,7 @@ func NewModifyPrometheusTempRequest() (request *ModifyPrometheusTempRequest) { request = &ModifyPrometheusTempRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "ModifyPrometheusTemp") @@ -9664,6 +10206,7 @@ func NewModifyPrometheusTempResponse() (response *ModifyPrometheusTempResponse) // INTERNALERROR_PARAM = "InternalError.Param" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" // INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" +// RESOURCENOTFOUND = "ResourceNotFound" func (c *Client) ModifyPrometheusTemp(request *ModifyPrometheusTempRequest) (response *ModifyPrometheusTempResponse, err error) { return c.ModifyPrometheusTempWithContext(context.Background(), request) } @@ -9677,6 +10220,7 @@ func (c *Client) ModifyPrometheusTemp(request *ModifyPrometheusTempRequest) (res // INTERNALERROR_PARAM = "InternalError.Param" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" // INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" +// RESOURCENOTFOUND = "ResourceNotFound" func (c *Client) ModifyPrometheusTempWithContext(ctx context.Context, request *ModifyPrometheusTempRequest) (response *ModifyPrometheusTempResponse, err error) { if request == nil { request = NewModifyPrometheusTempRequest() @@ -9697,6 +10241,7 @@ func NewModifyPrometheusTemplateRequest() (request *ModifyPrometheusTemplateRequ request = &ModifyPrometheusTemplateRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "ModifyPrometheusTemplate") @@ -9754,6 +10299,7 @@ func NewRemoveNodeFromNodePoolRequest() (request *RemoveNodeFromNodePoolRequest) request = &RemoveNodeFromNodePoolRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "RemoveNodeFromNodePool") @@ -9803,6 +10349,7 @@ func NewRestartEKSContainerInstancesRequest() (request *RestartEKSContainerInsta request = &RestartEKSContainerInstancesRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "RestartEKSContainerInstances") @@ -9856,6 +10403,7 @@ func NewRunPrometheusInstanceRequest() (request *RunPrometheusInstanceRequest) { request = &RunPrometheusInstanceRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "RunPrometheusInstance") @@ -9907,6 +10455,7 @@ func NewScaleInClusterMasterRequest() (request *ScaleInClusterMasterRequest) { request = &ScaleInClusterMasterRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "ScaleInClusterMaster") @@ -9956,6 +10505,7 @@ func NewScaleOutClusterMasterRequest() (request *ScaleOutClusterMasterRequest) { request = &ScaleOutClusterMasterRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "ScaleOutClusterMaster") @@ -9975,6 +10525,7 @@ func NewScaleOutClusterMasterResponse() (response *ScaleOutClusterMasterResponse // 可能返回的错误码: // FAILEDOPERATION_CVMUNEXPECTEDERROR = "FailedOperation.CVMUnexpectedError" // INTERNALERROR = "InternalError" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" // OPERATIONDENIED = "OperationDenied" // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" func (c *Client) ScaleOutClusterMaster(request *ScaleOutClusterMasterRequest) (response *ScaleOutClusterMasterResponse, err error) { @@ -9987,6 +10538,7 @@ func (c *Client) ScaleOutClusterMaster(request *ScaleOutClusterMasterRequest) (r // 可能返回的错误码: // FAILEDOPERATION_CVMUNEXPECTEDERROR = "FailedOperation.CVMUnexpectedError" // INTERNALERROR = "InternalError" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" // OPERATIONDENIED = "OperationDenied" // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" func (c *Client) ScaleOutClusterMasterWithContext(ctx context.Context, request *ScaleOutClusterMasterRequest) (response *ScaleOutClusterMasterResponse, err error) { @@ -10009,6 +10561,7 @@ func NewSetNodePoolNodeProtectionRequest() (request *SetNodePoolNodeProtectionRe request = &SetNodePoolNodeProtectionRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "SetNodePoolNodeProtection") @@ -10074,6 +10627,7 @@ func NewSyncPrometheusTempRequest() (request *SyncPrometheusTempRequest) { request = &SyncPrometheusTempRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "SyncPrometheusTemp") @@ -10093,6 +10647,7 @@ func NewSyncPrometheusTempResponse() (response *SyncPrometheusTempResponse) { // 可能返回的错误码: // FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" // FAILEDOPERATION_COMPONENTCLIENTUNPACK = "FailedOperation.ComponentClientUnpack" +// FAILEDOPERATION_KUBECOMMON = "FailedOperation.KubeCommon" // INTERNALERROR_DB = "InternalError.Db" // INTERNALERROR_PARAM = "InternalError.Param" // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" @@ -10110,6 +10665,7 @@ func (c *Client) SyncPrometheusTemp(request *SyncPrometheusTempRequest) (respons // 可能返回的错误码: // FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" // FAILEDOPERATION_COMPONENTCLIENTUNPACK = "FailedOperation.ComponentClientUnpack" +// FAILEDOPERATION_KUBECOMMON = "FailedOperation.KubeCommon" // INTERNALERROR_DB = "InternalError.Db" // INTERNALERROR_PARAM = "InternalError.Param" // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" @@ -10137,6 +10693,7 @@ func NewSyncPrometheusTemplateRequest() (request *SyncPrometheusTemplateRequest) request = &SyncPrometheusTemplateRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "SyncPrometheusTemplate") @@ -10198,10 +10755,63 @@ func (c *Client) SyncPrometheusTemplateWithContext(ctx context.Context, request return } +func NewUninstallEdgeLogAgentRequest() (request *UninstallEdgeLogAgentRequest) { + request = &UninstallEdgeLogAgentRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("tke", APIVersion, "UninstallEdgeLogAgent") + + + return +} + +func NewUninstallEdgeLogAgentResponse() (response *UninstallEdgeLogAgentResponse) { + response = &UninstallEdgeLogAgentResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// UninstallEdgeLogAgent +// 从tke@edge集群边缘节点上卸载日志采集组件 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) UninstallEdgeLogAgent(request *UninstallEdgeLogAgentRequest) (response *UninstallEdgeLogAgentResponse, err error) { + return c.UninstallEdgeLogAgentWithContext(context.Background(), request) +} + +// UninstallEdgeLogAgent +// 从tke@edge集群边缘节点上卸载日志采集组件 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) UninstallEdgeLogAgentWithContext(ctx context.Context, request *UninstallEdgeLogAgentRequest) (response *UninstallEdgeLogAgentResponse, err error) { + if request == nil { + request = NewUninstallEdgeLogAgentRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("UninstallEdgeLogAgent require credential") + } + + request.SetContext(ctx) + + response = NewUninstallEdgeLogAgentResponse() + err = c.Send(request, response) + return +} + func NewUninstallLogAgentRequest() (request *UninstallLogAgentRequest) { request = &UninstallLogAgentRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "UninstallLogAgent") @@ -10219,6 +10829,7 @@ func NewUninstallLogAgentResponse() (response *UninstallLogAgentResponse) { // 从TKE集群中卸载CLS日志采集组件 // // 可能返回的错误码: +// FAILEDOPERATION_DB = "FailedOperation.Db" // FAILEDOPERATION_KUBERNETESDELETEOPERATIONERROR = "FailedOperation.KubernetesDeleteOperationError" // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" @@ -10232,6 +10843,7 @@ func (c *Client) UninstallLogAgent(request *UninstallLogAgentRequest) (response // 从TKE集群中卸载CLS日志采集组件 // // 可能返回的错误码: +// FAILEDOPERATION_DB = "FailedOperation.Db" // FAILEDOPERATION_KUBERNETESDELETEOPERATIONERROR = "FailedOperation.KubernetesDeleteOperationError" // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" @@ -10257,6 +10869,7 @@ func NewUpdateClusterVersionRequest() (request *UpdateClusterVersionRequest) { request = &UpdateClusterVersionRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "UpdateClusterVersion") @@ -10320,6 +10933,7 @@ func NewUpdateEKSClusterRequest() (request *UpdateEKSClusterRequest) { request = &UpdateEKSClusterRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "UpdateEKSCluster") @@ -10391,6 +11005,7 @@ func NewUpdateEKSContainerInstanceRequest() (request *UpdateEKSContainerInstance request = &UpdateEKSContainerInstanceRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "UpdateEKSContainerInstance") @@ -10442,6 +11057,7 @@ func NewUpdateImageCacheRequest() (request *UpdateImageCacheRequest) { request = &UpdateImageCacheRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "UpdateImageCache") @@ -10491,6 +11107,7 @@ func NewUpdateTKEEdgeClusterRequest() (request *UpdateTKEEdgeClusterRequest) { request = &UpdateTKEEdgeClusterRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "UpdateTKEEdgeCluster") @@ -10560,6 +11177,7 @@ func NewUpgradeClusterInstancesRequest() (request *UpgradeClusterInstancesReques request = &UpgradeClusterInstancesRequest{ BaseRequest: &tchttp.BaseRequest{}, } + request.Init().WithApiInfo("tke", APIVersion, "UpgradeClusterInstances") diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/errors.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/errors.go index 035d92ca23..147046b92d 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/errors.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/errors.go @@ -38,6 +38,9 @@ const ( // 无该接口CAM权限。 FAILEDOPERATION_CAMNOAUTH = "FailedOperation.CamNoAuth" + // 集群禁止删除。 + FAILEDOPERATION_CLUSTERFORBIDDENTODELETE = "FailedOperation.ClusterForbiddenToDelete" + // 集群未找到。 FAILEDOPERATION_CLUSTERNOTFOUND = "FailedOperation.ClusterNotFound" @@ -62,9 +65,15 @@ const ( // 创建CLS采集配置失败。 FAILEDOPERATION_CREATECLSCONFIG = "FailedOperation.CreateClsConfig" + // 创建CLS索引失败。 + FAILEDOPERATION_CREATECLSINDEX = "FailedOperation.CreateClsIndex" + // 创建CLS日志集失败。 FAILEDOPERATION_CREATECLSLOGSET = "FailedOperation.CreateClsLogSet" + // 创建CLS机器组失败。 + FAILEDOPERATION_CREATECLSMACHINEGROUP = "FailedOperation.CreateClsMachineGroup" + // 创建 CLS 主题失败。 FAILEDOPERATION_CREATECLSTOPIC = "FailedOperation.CreateClsTopic" @@ -86,6 +95,15 @@ const ( // 获得安全组配额失败。 FAILEDOPERATION_DFWGETUSGQUOTA = "FailedOperation.DfwGetUSGQuota" + // 集群关闭 VPC-CNI 模式失败。 + FAILEDOPERATION_DISABLEVPCCNIFAILED = "FailedOperation.DisableVPCCNIFailed" + + // 开启 VPC-CNI 模式失败。 + FAILEDOPERATION_ENABLEVPCCNIFAILED = "FailedOperation.EnableVPCCNIFailed" + + // 获取CLS采集配置失败。 + FAILEDOPERATION_GETCLSCONFIG = "FailedOperation.GetClsConfig" + // 查询主题集失败。 FAILEDOPERATION_GETCLSLOGSET = "FailedOperation.GetClsLogSet" @@ -392,6 +410,9 @@ const ( // 创建的路由与VPC下已存在的全局路由产生冲突。 INVALIDPARAMETER_CIDRCONFLICTWITHVPCGLOBALROUTE = "InvalidParameter.CidrConflictWithVpcGlobalRoute" + // CIDR无效。 + INVALIDPARAMETER_CIDRINVALI = "InvalidParameter.CidrInvali" + // 参数错误,CIDR不符合规范。 INVALIDPARAMETER_CIDRINVALID = "InvalidParameter.CidrInvalid" @@ -494,6 +515,12 @@ const ( // AS伸缩关闭导致无法开启CA。 UNSUPPORTEDOPERATION_CAENABLEFAILED = "UnsupportedOperation.CaEnableFailed" + // 集群不支持添加 ClusterCIDR。 + UNSUPPORTEDOPERATION_CLUSTERNOTSUITADDCLUSTERCIDR = "UnsupportedOperation.ClusterNotSuitAddClusterCIDR" + + // 集群不支持开启 VPC-CNI 模式。 + UNSUPPORTEDOPERATION_CLUSTERNOTSUITENABLEVPCCNI = "UnsupportedOperation.ClusterNotSuitEnableVPCCNI" + // 非白名单用户。 UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist" ) diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/models.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/models.go index c00279e3c4..4eb365bfda 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/models.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/models.go @@ -2450,6 +2450,173 @@ func (r *CreateEKSContainerInstancesResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +// Predefined struct for user +type CreateEdgeCVMInstancesRequestParams struct { + // 集群id + ClusterID *string `json:"ClusterID,omitempty" name:"ClusterID"` + + // CVM创建透传参数,json化字符串格式,如需要保证扩展集群节点请求幂等性需要在此参数添加ClientToken字段,详见[CVM创建实例](https://cloud.tencent.com/document/product/213/15730)接口。 + RunInstancePara *string `json:"RunInstancePara,omitempty" name:"RunInstancePara"` + + // CVM所属Region + CvmRegion *string `json:"CvmRegion,omitempty" name:"CvmRegion"` + + // CVM数量 + CvmCount *int64 `json:"CvmCount,omitempty" name:"CvmCount"` + + // 实例扩展信息 + External *string `json:"External,omitempty" name:"External"` + + // 用户自定义脚本 + UserScript *string `json:"UserScript,omitempty" name:"UserScript"` + + // 是否开启弹性网卡功能 + EnableEni *bool `json:"EnableEni,omitempty" name:"EnableEni"` +} + +type CreateEdgeCVMInstancesRequest struct { + *tchttp.BaseRequest + + // 集群id + ClusterID *string `json:"ClusterID,omitempty" name:"ClusterID"` + + // CVM创建透传参数,json化字符串格式,如需要保证扩展集群节点请求幂等性需要在此参数添加ClientToken字段,详见[CVM创建实例](https://cloud.tencent.com/document/product/213/15730)接口。 + RunInstancePara *string `json:"RunInstancePara,omitempty" name:"RunInstancePara"` + + // CVM所属Region + CvmRegion *string `json:"CvmRegion,omitempty" name:"CvmRegion"` + + // CVM数量 + CvmCount *int64 `json:"CvmCount,omitempty" name:"CvmCount"` + + // 实例扩展信息 + External *string `json:"External,omitempty" name:"External"` + + // 用户自定义脚本 + UserScript *string `json:"UserScript,omitempty" name:"UserScript"` + + // 是否开启弹性网卡功能 + EnableEni *bool `json:"EnableEni,omitempty" name:"EnableEni"` +} + +func (r *CreateEdgeCVMInstancesRequest) 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 *CreateEdgeCVMInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterID") + delete(f, "RunInstancePara") + delete(f, "CvmRegion") + delete(f, "CvmCount") + delete(f, "External") + delete(f, "UserScript") + delete(f, "EnableEni") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateEdgeCVMInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type CreateEdgeCVMInstancesResponseParams struct { + // cvm id 列表 + CvmIdSet []*string `json:"CvmIdSet,omitempty" name:"CvmIdSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` +} + +type CreateEdgeCVMInstancesResponse struct { + *tchttp.BaseResponse + Response *CreateEdgeCVMInstancesResponseParams `json:"Response"` +} + +func (r *CreateEdgeCVMInstancesResponse) 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 *CreateEdgeCVMInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type CreateEdgeLogConfigRequestParams struct { + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 日志采集配置的json表达 + LogConfig *string `json:"LogConfig,omitempty" name:"LogConfig"` + + // CLS日志集ID + LogsetId *string `json:"LogsetId,omitempty" name:"LogsetId"` +} + +type CreateEdgeLogConfigRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 日志采集配置的json表达 + LogConfig *string `json:"LogConfig,omitempty" name:"LogConfig"` + + // CLS日志集ID + LogsetId *string `json:"LogsetId,omitempty" name:"LogsetId"` +} + +func (r *CreateEdgeLogConfigRequest) 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 *CreateEdgeLogConfigRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "LogConfig") + delete(f, "LogsetId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateEdgeLogConfigRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type CreateEdgeLogConfigResponseParams struct { + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` +} + +type CreateEdgeLogConfigResponse struct { + *tchttp.BaseResponse + Response *CreateEdgeLogConfigResponseParams `json:"Response"` +} + +func (r *CreateEdgeLogConfigResponse) 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 *CreateEdgeLogConfigResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + // Predefined struct for user type CreateImageCacheRequestParams struct { // 用于制作镜像缓存的容器镜像列表 @@ -3195,6 +3362,15 @@ type CreateTKEEdgeClusterRequestParams struct { // 边缘计算集群公网访问LB信息 PublicLB *EdgeClusterPublicLB `json:"PublicLB,omitempty" name:"PublicLB"` + + // 集群的级别 + ClusterLevel *string `json:"ClusterLevel,omitempty" name:"ClusterLevel"` + + // 集群是否支持自动升配 + AutoUpgradeClusterLevel *bool `json:"AutoUpgradeClusterLevel,omitempty" name:"AutoUpgradeClusterLevel"` + + // 集群计费方式 + ChargeType *string `json:"ChargeType,omitempty" name:"ChargeType"` } type CreateTKEEdgeClusterRequest struct { @@ -3226,6 +3402,15 @@ type CreateTKEEdgeClusterRequest struct { // 边缘计算集群公网访问LB信息 PublicLB *EdgeClusterPublicLB `json:"PublicLB,omitempty" name:"PublicLB"` + + // 集群的级别 + ClusterLevel *string `json:"ClusterLevel,omitempty" name:"ClusterLevel"` + + // 集群是否支持自动升配 + AutoUpgradeClusterLevel *bool `json:"AutoUpgradeClusterLevel,omitempty" name:"AutoUpgradeClusterLevel"` + + // 集群计费方式 + ChargeType *string `json:"ChargeType,omitempty" name:"ChargeType"` } func (r *CreateTKEEdgeClusterRequest) ToJsonString() string { @@ -3249,6 +3434,9 @@ func (r *CreateTKEEdgeClusterRequest) FromJsonString(s string) error { delete(f, "ClusterAdvancedSettings") delete(f, "MaxNodePodNum") delete(f, "PublicLB") + delete(f, "ClusterLevel") + delete(f, "AutoUpgradeClusterLevel") + delete(f, "ChargeType") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateTKEEdgeClusterRequest has unknown keys!", "") } @@ -4341,12 +4529,21 @@ func (r *DeletePrometheusAlertRuleResponse) FromJsonString(s string) error { // Predefined struct for user type DeletePrometheusClusterAgentRequestParams struct { + // agent列表 + Agents []*PrometheusAgentInfo `json:"Agents,omitempty" name:"Agents"` + // 实例id + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` } type DeletePrometheusClusterAgentRequest struct { *tchttp.BaseRequest + // agent列表 + Agents []*PrometheusAgentInfo `json:"Agents,omitempty" name:"Agents"` + + // 实例id + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` } func (r *DeletePrometheusClusterAgentRequest) ToJsonString() string { @@ -4361,7 +4558,8 @@ func (r *DeletePrometheusClusterAgentRequest) FromJsonString(s string) error { if err := json.Unmarshal([]byte(s), &f); err != nil { return err } - + delete(f, "Agents") + delete(f, "InstanceId") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeletePrometheusClusterAgentRequest has unknown keys!", "") } @@ -5406,6 +5604,77 @@ func (r *DescribeClusterEndpointVipStatusResponse) FromJsonString(s string) erro return json.Unmarshal([]byte(s), &r) } +// Predefined struct for user +type DescribeClusterEndpointsRequestParams struct { + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +type DescribeClusterEndpointsRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *DescribeClusterEndpointsRequest) 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 *DescribeClusterEndpointsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterEndpointsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeClusterEndpointsResponseParams struct { + // 集群APIServer的CA证书 + CertificationAuthority *string `json:"CertificationAuthority,omitempty" name:"CertificationAuthority"` + + // 集群APIServer的外网访问地址 + ClusterExternalEndpoint *string `json:"ClusterExternalEndpoint,omitempty" name:"ClusterExternalEndpoint"` + + // 集群APIServer的内网访问地址 + ClusterIntranetEndpoint *string `json:"ClusterIntranetEndpoint,omitempty" name:"ClusterIntranetEndpoint"` + + // 集群APIServer的域名 + // 注意:此字段可能返回 null,表示取不到有效值。 + ClusterDomain *string `json:"ClusterDomain,omitempty" name:"ClusterDomain"` + + // 集群APIServer的外网访问ACL列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + ClusterExternalACL []*string `json:"ClusterExternalACL,omitempty" name:"ClusterExternalACL"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` +} + +type DescribeClusterEndpointsResponse struct { + *tchttp.BaseResponse + Response *DescribeClusterEndpointsResponseParams `json:"Response"` +} + +func (r *DescribeClusterEndpointsResponse) 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 *DescribeClusterEndpointsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + // Predefined struct for user type DescribeClusterInstancesRequestParams struct { // 集群ID @@ -7055,6 +7324,64 @@ func (r *DescribeEdgeClusterInstancesResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +// Predefined struct for user +type DescribeEdgeLogSwitchesRequestParams struct { + // 集群ID列表 + ClusterIds []*string `json:"ClusterIds,omitempty" name:"ClusterIds"` +} + +type DescribeEdgeLogSwitchesRequest struct { + *tchttp.BaseRequest + + // 集群ID列表 + ClusterIds []*string `json:"ClusterIds,omitempty" name:"ClusterIds"` +} + +func (r *DescribeEdgeLogSwitchesRequest) 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 *DescribeEdgeLogSwitchesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeEdgeLogSwitchesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeEdgeLogSwitchesResponseParams struct { + // 集群日志开关集合 + // 注意:此字段可能返回 null,表示取不到有效值。 + SwitchSet []*string `json:"SwitchSet,omitempty" name:"SwitchSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` +} + +type DescribeEdgeLogSwitchesResponse struct { + *tchttp.BaseResponse + Response *DescribeEdgeLogSwitchesResponseParams `json:"Response"` +} + +func (r *DescribeEdgeLogSwitchesResponse) 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 *DescribeEdgeLogSwitchesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + // Predefined struct for user type DescribeEksContainerInstanceLogRequestParams struct { // Eks Container Instance Id,即容器实例Id @@ -9462,6 +9789,9 @@ type DescribeTKEEdgeScriptRequestParams struct { // json格式的节点配置 Config *string `json:"Config,omitempty" name:"Config"` + + // 可以下载某个历史版本的edgectl脚本,默认下载最新版本,edgectl版本信息可以在脚本里查看 + ScriptVersion *string `json:"ScriptVersion,omitempty" name:"ScriptVersion"` } type DescribeTKEEdgeScriptRequest struct { @@ -9478,6 +9808,9 @@ type DescribeTKEEdgeScriptRequest struct { // json格式的节点配置 Config *string `json:"Config,omitempty" name:"Config"` + + // 可以下载某个历史版本的edgectl脚本,默认下载最新版本,edgectl版本信息可以在脚本里查看 + ScriptVersion *string `json:"ScriptVersion,omitempty" name:"ScriptVersion"` } func (r *DescribeTKEEdgeScriptRequest) ToJsonString() string { @@ -9496,6 +9829,7 @@ func (r *DescribeTKEEdgeScriptRequest) FromJsonString(s string) error { delete(f, "Interface") delete(f, "NodeName") delete(f, "Config") + delete(f, "ScriptVersion") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeTKEEdgeScriptRequest has unknown keys!", "") } @@ -9513,6 +9847,10 @@ type DescribeTKEEdgeScriptResponseParams struct { // 下载命令 Command *string `json:"Command,omitempty" name:"Command"` + // edgectl脚本版本,默认拉取最新版本 + // 注意:此字段可能返回 null,表示取不到有效值。 + ScriptVersion *string `json:"ScriptVersion,omitempty" name:"ScriptVersion"` + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` } @@ -9998,12 +10336,24 @@ type EdgeCluster struct { // 节点最大Pod数 // 注意:此字段可能返回 null,表示取不到有效值。 MaxNodePodNum *int64 `json:"MaxNodePodNum,omitempty" name:"MaxNodePodNum"` + + // 集群高级设置 + // 注意:此字段可能返回 null,表示取不到有效值。 + ClusterAdvancedSettings *EdgeClusterAdvancedSettings `json:"ClusterAdvancedSettings,omitempty" name:"ClusterAdvancedSettings"` } type EdgeClusterAdvancedSettings struct { // 集群自定义参数 // 注意:此字段可能返回 null,表示取不到有效值。 ExtraArgs *EdgeClusterExtraArgs `json:"ExtraArgs,omitempty" name:"ExtraArgs"` + + // 运行时类型,支持"docker"和"containerd",默认为docker + // 注意:此字段可能返回 null,表示取不到有效值。 + Runtime *string `json:"Runtime,omitempty" name:"Runtime"` + + // 集群kube-proxy转发模式,支持"iptables"和"ipvs",默认为iptables + // 注意:此字段可能返回 null,表示取不到有效值。 + ProxyMode *string `json:"ProxyMode,omitempty" name:"ProxyMode"` } type EdgeClusterExtraArgs struct { @@ -10591,6 +10941,11 @@ type ExistedInstance struct { // 实例计费模式。取值范围: PREPAID:表示预付费,即包年包月 POSTPAID_BY_HOUR:表示后付费,即按量计费 CDHPAID:CDH付费,即只对CDH计费,不对CDH上的实例计费。 // 注意:此字段可能返回 null,表示取不到有效值。 InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` + + // 实例的IPv6地址。 + // 注意:此字段可能返回 null,表示取不到有效值。 + // 注意:此字段可能返回 null,表示取不到有效值。 + IPv6Addresses []*string `json:"IPv6Addresses,omitempty" name:"IPv6Addresses"` } type ExistedInstancesForNode struct { @@ -11238,6 +11593,60 @@ type ImageRegistryCredential struct { Name *string `json:"Name,omitempty" name:"Name"` } +// Predefined struct for user +type InstallEdgeLogAgentRequestParams struct { + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +type InstallEdgeLogAgentRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *InstallEdgeLogAgentRequest) 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 *InstallEdgeLogAgentRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "InstallEdgeLogAgentRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type InstallEdgeLogAgentResponseParams struct { + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` +} + +type InstallEdgeLogAgentResponse struct { + *tchttp.BaseResponse + Response *InstallEdgeLogAgentResponseParams `json:"Response"` +} + +func (r *InstallEdgeLogAgentResponse) 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 *InstallEdgeLogAgentResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + // Predefined struct for user type InstallLogAgentRequestParams struct { // TKE集群ID @@ -12855,6 +13264,17 @@ type Probe struct { FailureThreshold *int64 `json:"FailureThreshold,omitempty" name:"FailureThreshold"` } +type PrometheusAgentInfo struct { + // 集群类型 + ClusterType *string `json:"ClusterType,omitempty" name:"ClusterType"` + + // 集群id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 备注 + Describe *string `json:"Describe,omitempty" name:"Describe"` +} + type PrometheusAgentOverview struct { // 集群类型 ClusterType *string `json:"ClusterType,omitempty" name:"ClusterType"` @@ -14299,6 +14719,60 @@ type Toleration struct { Effect *string `json:"Effect,omitempty" name:"Effect"` } +// Predefined struct for user +type UninstallEdgeLogAgentRequestParams struct { + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +type UninstallEdgeLogAgentRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *UninstallEdgeLogAgentRequest) 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 *UninstallEdgeLogAgentRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "UninstallEdgeLogAgentRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type UninstallEdgeLogAgentResponseParams struct { + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` +} + +type UninstallEdgeLogAgentResponse struct { + *tchttp.BaseResponse + Response *UninstallEdgeLogAgentResponseParams `json:"Response"` +} + +func (r *UninstallEdgeLogAgentResponse) 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 *UninstallEdgeLogAgentResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + // Predefined struct for user type UninstallLogAgentRequestParams struct { // 集群ID diff --git a/vendor/modules.txt b/vendor/modules.txt index 7cf6207ffb..98c65dfb7d 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -555,7 +555,7 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb/v20180317 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cloudaudit/v20190319 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls v1.0.412 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls/v20201016 -# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.479 +# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.480 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http @@ -613,7 +613,7 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcr/v20190924 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tdmq/v20200217 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tem v1.0.472 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tem/v20210701 -# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.438 +# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.480 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vod v1.0.199 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vod/v20180717 diff --git a/website/docs/r/monitor_tmp_tke_cluster_agent.html.markdown b/website/docs/r/monitor_tmp_tke_cluster_agent.html.markdown new file mode 100644 index 0000000000..9826645217 --- /dev/null +++ b/website/docs/r/monitor_tmp_tke_cluster_agent.html.markdown @@ -0,0 +1,65 @@ +--- +subcategory: "Monitor" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_monitor_tmp_tke_cluster_agent" +sidebar_current: "docs-tencentcloud-resource-monitor_tmp_tke_cluster_agent" +description: |- + Provides a resource to create a tmp tke cluster agent +--- + +# tencentcloud_monitor_tmp_tke_cluster_agent + +Provides a resource to create a tmp tke cluster agent + +## Example Usage + + + +## Argument Reference + +The following arguments are supported: + +* `agents` - (Required, List) agent list. +* `instance_id` - (Required, String, ForceNew) Instance Id. + +The `agents` object supports the following: + +* `cluster_id` - (Required, String) An id identify the cluster, like `cls-xxxxxx`. +* `cluster_type` - (Required, String) Type of cluster. +* `enable_external` - (Required, Bool) Whether to enable the public network CLB. +* `region` - (Required, String) Limitation of region. +* `external_labels` - (Optional, List) All metrics collected by the cluster will carry these labels. +* `in_cluster_pod_config` - (Optional, Map) Pod configuration for components deployed in the cluster. +* `not_install_basic_scrape` - (Optional, Bool) Whether to install the default collection configuration. +* `not_scrape` - (Optional, Bool) Whether to collect indicators, true means drop all indicators, false means collect default indicators. + +The `external_labels` object supports the following: + +* `name` - (Required, String) Indicator name. +* `value` - (Optional, String) Index value. + +The `in_cluster_pod_config` object supports the following: + +* `host_net` - (Required, Bool) Whether to use HostNetWork. +* `node_selector` - (Optional, List) Specify the pod to run the node. +* `tolerations` - (Optional, List) Tolerate Stain. + +The `node_selector` object supports the following: + +* `name` - (Optional, String) The pod configuration name of the component deployed in the cluster. +* `value` - (Optional, String) Pod configuration values for components deployed in the cluster. + +The `tolerations` object supports the following: + +* `effect` - (Optional, String) blemish effect to match. +* `key` - (Optional, String) The taint key to which the tolerance applies. +* `operator` - (Optional, String) key-value relationship. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - ID of the resource. + + + diff --git a/website/tencentcloud.erb b/website/tencentcloud.erb index 9ee078b622..a304f09396 100644 --- a/website/tencentcloud.erb +++ b/website/tencentcloud.erb @@ -1154,6 +1154,9 @@