diff --git a/go.mod b/go.mod index 6560a6924e..66e02f9149 100644 --- a/go.mod +++ b/go.mod @@ -76,7 +76,7 @@ require ( github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tdmq v1.0.548 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tem v1.0.527 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.0.529 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.519 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.549 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vod v1.0.199 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.515 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/wss v1.0.199 diff --git a/go.sum b/go.sum index 8712043bed..2129ef5af5 100644 --- a/go.sum +++ b/go.sum @@ -520,6 +520,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.542/go.mod github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.544 h1:ydXS/Tt3NKxTe10SlnMsyzlHzLOtGJIahvf/CoCVtCM= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.544/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.546 h1:18ZUEkte3A9b5OkF2vAe070HYo3dg0Zonp/rw+GvI8Y= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.546 h1:18ZUEkte3A9b5OkF2vAe070HYo3dg0Zonp/rw+GvI8Y= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.546/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.546/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.547/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.548/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= @@ -616,6 +618,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.0.529 h1:vWUgseU github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.0.529/go.mod h1:vOd23iOVeQqm5LSEXUmE8773kiUCwGuoJnTO0po5D+Q= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.519 h1:o8NsQPLV6T8TD4sHxufCwtCsqYM4CUM1132zut6toww= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.519/go.mod h1:ydWSzYKc8AwtT9I8Cd0JdICqiyp9h+u2J5maDWxC9Mo= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.549 h1:WWKxOUMmhH5U2VxKtAKp5Hp0RDSxWJUk87pUjI5hmYM= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.549/go.mod h1:UPffPhIo23aJ3N40bwWhxhr0fIR9jn0Lfboxh17km8E= 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.515 h1:OWA3zSqC+tY42DwnlzAZVNYkB5dWgcwk435n+84jXNM= diff --git a/tencentcloud/internal/helper/helper.go b/tencentcloud/internal/helper/helper.go index b310d51e91..4b5855e7ca 100644 --- a/tencentcloud/internal/helper/helper.go +++ b/tencentcloud/internal/helper/helper.go @@ -146,6 +146,18 @@ func InterfacesHeadMap(d *schema.ResourceData, key string) (result map[string]in return } +// ConvertInterfacesHeadToMap returns string key map if argument is MaxItem: 1 List Type +func ConvertInterfacesHeadToMap(v interface{}) (result map[string]interface{}, ok bool) { + interfaces, ok := v.([]interface{}) + if !ok || len(interfaces) == 0 { + ok = false + return + } + head := interfaces[0] + result, ok = head.(map[string]interface{}) + return +} + func SetMapInterfaces(d *schema.ResourceData, key string, values ...map[string]interface{}) error { val := make([]interface{}, 0, len(values)) for i := range values { diff --git a/tencentcloud/resource_tc_kubernetes_cluster.go b/tencentcloud/resource_tc_kubernetes_cluster.go index c86aa580e9..651e9f748c 100644 --- a/tencentcloud/resource_tc_kubernetes_cluster.go +++ b/tencentcloud/resource_tc_kubernetes_cluster.go @@ -1321,6 +1321,12 @@ func resourceTencentCloudTkeCluster() *schema.Resource { Optional: true, Description: "Specify id of existing CLS log topic, or auto create a new topic by leave it empty.", }, + "delete_event_log_and_topic": { + Type: schema.TypeBool, + Optional: true, + Description: "when you want to close the cluster event persistence or delete the cluster, you can use this parameter to determine " + + "whether the event persistence log set and topic created by default will be deleted.", + }, }, }, }, @@ -1346,6 +1352,13 @@ func resourceTencentCloudTkeCluster() *schema.Resource { Optional: true, Description: "Specify id of existing CLS log topic, or auto create a new topic by leave it empty.", }, + "delete_audit_log_and_topic": { + Type: schema.TypeBool, + Optional: true, + Description: "when you want to close the cluster audit log or delete the cluster, you can use " + + "this parameter to determine whether the audit log set and topic created by default will" + + " be deleted.", + }, }, }, }, @@ -2295,7 +2308,7 @@ func resourceTencentCloudTkeClusterCreate(d *schema.ResourceData, meta interface logSetId := v["log_set_id"].(string) topicId := v["topic_id"].(string) if enabled { - err := service.SwitchEventPersistence(ctx, id, logSetId, topicId, enabled) + err := service.SwitchEventPersistence(ctx, id, logSetId, topicId, enabled, false) if err != nil { return err } @@ -2307,7 +2320,7 @@ func resourceTencentCloudTkeClusterCreate(d *schema.ResourceData, meta interface logSetId := v["log_set_id"].(string) topicId := v["topic_id"].(string) if enabled { - err := service.SwitchClusterAudit(ctx, id, logSetId, topicId, enabled) + err := service.SwitchClusterAudit(ctx, id, logSetId, topicId, enabled, false) if err != nil { return err } @@ -2862,12 +2875,15 @@ func resourceTencentCloudTkeClusterUpdate(d *schema.ResourceData, meta interface enabled := false logSetId := "" topicId := "" + deleteEventLog := false if ok { enabled = v["enabled"].(bool) logSetId = v["log_set_id"].(string) topicId = v["topic_id"].(string) + deleteEventLog = v["delete_event_log_and_topic"].(bool) } - err := tkeService.SwitchEventPersistence(ctx, id, logSetId, topicId, enabled) + + err := tkeService.SwitchEventPersistence(ctx, id, logSetId, topicId, enabled, deleteEventLog) if err != nil { return err } @@ -2878,12 +2894,15 @@ func resourceTencentCloudTkeClusterUpdate(d *schema.ResourceData, meta interface enabled := false logSetId := "" topicId := "" + deleteAuditLog := false if ok { enabled = v["enabled"].(bool) logSetId = v["log_set_id"].(string) topicId = v["topic_id"].(string) + deleteAuditLog = v["delete_audit_log_and_topic"].(bool) } - err := tkeService.SwitchClusterAudit(ctx, id, logSetId, topicId, enabled) + + err := tkeService.SwitchClusterAudit(ctx, id, logSetId, topicId, enabled, deleteAuditLog) if err != nil { return err } @@ -2903,8 +2922,40 @@ func resourceTencentCloudTkeClusterDelete(d *schema.ResourceData, meta interface logId := getLogId(contextNil) ctx := context.WithValue(context.TODO(), logIdKey, logId) service := TkeService{client: meta.(*TencentCloudClient).apiV3Conn} + deleteEventLogSetAndTopic := false + enableEventLog := false + deleteAuditLogSetAndTopic := false + if v, ok := helper.InterfacesHeadMap(d, "event_persistence"); ok { + deleteEventLogSetAndTopic = v["delete_event_log_and_topic"].(bool) + // get cluster current enabled status + enableEventLog = v["enabled"].(bool) + } + + if v, ok := helper.InterfacesHeadMap(d, "cluster_audit"); ok { + deleteAuditLogSetAndTopic = v["delete_audit_log_and_topic"].(bool) + } err := resource.Retry(writeRetryTimeout, func() *resource.RetryError { + if deleteEventLogSetAndTopic && enableEventLog { + err := service.SwitchEventPersistence(ctx, d.Id(), "", "", false, true) + if e, ok := err.(*errors.TencentCloudSDKError); ok { + if e.GetCode() != "FailedOperation.ClusterNotFound" { + return retryError(err, InternalError) + } + } else if err != nil { + return retryError(err, InternalError) + } + } + if deleteAuditLogSetAndTopic { + err := service.SwitchClusterAudit(ctx, d.Id(), "", "", false, true) + if e, ok := err.(*errors.TencentCloudSDKError); ok { + if e.GetCode() != "ResourceNotFound.ClusterNotFound" { + return retryError(err, InternalError) + } + } else if err != nil { + return retryError(err, InternalError) + } + } err := service.DeleteCluster(ctx, d.Id()) if e, ok := err.(*errors.TencentCloudSDKError); ok { diff --git a/tencentcloud/resource_tc_kubernetes_cluster_test.go b/tencentcloud/resource_tc_kubernetes_cluster_test.go index d6ab36dcf2..916f6f4287 100644 --- a/tencentcloud/resource_tc_kubernetes_cluster_test.go +++ b/tencentcloud/resource_tc_kubernetes_cluster_test.go @@ -56,6 +56,7 @@ func TestAccTencentCloudTkeResourceBasic(t *testing.T) { CheckDestroy: testAccCheckTkeDestroy, Steps: []resource.TestStep{ { + //PreventDiskCleanup: true, Config: testAccTkeCluster, Check: resource.ComposeTestCheckFunc( testAccCheckTkeExists(testTkeClusterResourceKey), @@ -108,6 +109,7 @@ func TestAccTencentCloudTkeResourceLogs(t *testing.T) { CheckDestroy: testAccCheckTkeDestroy, Steps: []resource.TestStep{ { + //PreventDiskCleanup: true, Config: testAccTkeClusterLogs, Check: resource.ComposeTestCheckFunc( testAccCheckTkeExists(testTkeClusterResourceKey), @@ -132,7 +134,11 @@ func TestAccTencentCloudTkeResourceLogs(t *testing.T) { resource.TestCheckResourceAttr(testTkeClusterResourceKey, "cluster_desc", "test cluster desc"), resource.TestCheckResourceAttr(testTkeClusterResourceKey, "log_agent.0.enabled", "true"), resource.TestCheckResourceAttr(testTkeClusterResourceKey, "event_persistence.0.enabled", "false"), + resource.TestCheckResourceAttr(testTkeClusterResourceKey, "event_persistence.0.delete_event_log_and_topic", + "true"), resource.TestCheckResourceAttr(testTkeClusterResourceKey, "cluster_audit.0.enabled", "true"), + resource.TestCheckResourceAttr(testTkeClusterResourceKey, "cluster_audit.0.delete_audit_log_and_topic", + "true"), ), }, }, @@ -477,9 +483,11 @@ resource "tencentcloud_kubernetes_cluster" "managed_cluster" { event_persistence { enabled = false + delete_event_log_and_topic = true } cluster_audit { enabled = true + delete_audit_log_and_topic = true } }` diff --git a/tencentcloud/service_tencentcloud_tke.go b/tencentcloud/service_tencentcloud_tke.go index 7236444b16..f95095b78b 100644 --- a/tencentcloud/service_tencentcloud_tke.go +++ b/tencentcloud/service_tencentcloud_tke.go @@ -1593,7 +1593,8 @@ func (me *TkeService) SwitchLogAgent(ctx context.Context, clusterId, rootDir str return me.UninstallLogAgent(ctx, request) } -func (me *TkeService) SwitchEventPersistence(ctx context.Context, clusterId, logSetId, topicId string, enable bool) error { +func (me *TkeService) SwitchEventPersistence(ctx context.Context, clusterId, logSetId, topicId string, + enable, deleteEventLog bool) error { if enable { request := tke.NewEnableEventPersistenceRequest() request.ClusterId = &clusterId @@ -1605,12 +1606,15 @@ func (me *TkeService) SwitchEventPersistence(ctx context.Context, clusterId, log } return me.EnableEventPersistence(ctx, request) } + request := tke.NewDisableEventPersistenceRequest() request.ClusterId = &clusterId + request.DeleteLogSetAndTopic = &deleteEventLog return me.DisableEventPersistence(ctx, request) } -func (me *TkeService) SwitchClusterAudit(ctx context.Context, clusterId, logSetId, topicId string, enable bool) error { +func (me *TkeService) SwitchClusterAudit(ctx context.Context, clusterId, logSetId, topicId string, + enable, deleteAuditLog bool) error { if enable { request := tke.NewEnableClusterAuditRequest() request.ClusterId = &clusterId @@ -1624,6 +1628,7 @@ func (me *TkeService) SwitchClusterAudit(ctx context.Context, clusterId, logSetI } request := tke.NewDisableClusterAuditRequest() request.ClusterId = &clusterId + request.DeleteLogSetAndTopic = &deleteAuditLog return me.DisableClusterAudit(ctx, request) } 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 812c624992..a0de973ff5 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 @@ -219,6 +219,7 @@ func NewAddExistedInstancesResponse() (response *AddExistedInstancesResponse) { // 可能返回的错误码: // FAILEDOPERATION_CLUSTERNOTFOUND = "FailedOperation.ClusterNotFound" // FAILEDOPERATION_CLUSTERSTATE = "FailedOperation.ClusterState" +// FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" // FAILEDOPERATION_CVMCOMMON = "FailedOperation.CvmCommon" // FAILEDOPERATION_NETWORKSCALEERROR = "FailedOperation.NetworkScaleError" // FAILEDOPERATION_PARAM = "FailedOperation.Param" @@ -245,6 +246,7 @@ func (c *Client) AddExistedInstances(request *AddExistedInstancesRequest) (respo // 可能返回的错误码: // FAILEDOPERATION_CLUSTERNOTFOUND = "FailedOperation.ClusterNotFound" // FAILEDOPERATION_CLUSTERSTATE = "FailedOperation.ClusterState" +// FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" // FAILEDOPERATION_CVMCOMMON = "FailedOperation.CvmCommon" // FAILEDOPERATION_NETWORKSCALEERROR = "FailedOperation.NetworkScaleError" // FAILEDOPERATION_PARAM = "FailedOperation.Param" @@ -647,6 +649,7 @@ func NewCreateClusterResponse() (response *CreateClusterResponse) { // INVALIDPARAMETER_CIDRINVALID = "InvalidParameter.CidrInvalid" // INVALIDPARAMETER_INVALIDPRIVATENETWORKCIDR = "InvalidParameter.InvalidPrivateNetworkCIDR" // LIMITEXCEEDED = "LimitExceeded" +// RESOURCEINSUFFICIENT_SPECIFIEDINSTANCETYPE = "ResourceInsufficient.SpecifiedInstanceType" func (c *Client) CreateCluster(request *CreateClusterRequest) (response *CreateClusterResponse, err error) { return c.CreateClusterWithContext(context.Background(), request) } @@ -717,6 +720,7 @@ func (c *Client) CreateCluster(request *CreateClusterRequest) (response *CreateC // INVALIDPARAMETER_CIDRINVALID = "InvalidParameter.CidrInvalid" // INVALIDPARAMETER_INVALIDPRIVATENETWORKCIDR = "InvalidParameter.InvalidPrivateNetworkCIDR" // LIMITEXCEEDED = "LimitExceeded" +// RESOURCEINSUFFICIENT_SPECIFIEDINSTANCETYPE = "ResourceInsufficient.SpecifiedInstanceType" func (c *Client) CreateClusterWithContext(ctx context.Context, request *CreateClusterRequest) (response *CreateClusterResponse, err error) { if request == nil { request = NewCreateClusterRequest() @@ -961,6 +965,7 @@ func NewCreateClusterInstancesResponse() (response *CreateClusterInstancesRespon // INVALIDPARAMETER = "InvalidParameter" // MISSINGPARAMETER = "MissingParameter" // RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT_SPECIFIEDINSTANCETYPE = "ResourceInsufficient.SpecifiedInstanceType" // RESOURCENOTFOUND = "ResourceNotFound" // RESOURCEUNAVAILABLE = "ResourceUnavailable" // UNAUTHORIZEDOPERATION = "UnauthorizedOperation" @@ -1008,6 +1013,7 @@ func (c *Client) CreateClusterInstances(request *CreateClusterInstancesRequest) // INVALIDPARAMETER = "InvalidParameter" // MISSINGPARAMETER = "MissingParameter" // RESOURCEINUSE = "ResourceInUse" +// RESOURCEINSUFFICIENT_SPECIFIEDINSTANCETYPE = "ResourceInsufficient.SpecifiedInstanceType" // RESOURCENOTFOUND = "ResourceNotFound" // RESOURCEUNAVAILABLE = "ResourceUnavailable" // UNAUTHORIZEDOPERATION = "UnauthorizedOperation" @@ -1053,6 +1059,7 @@ func NewCreateClusterNodePoolResponse() (response *CreateClusterNodePoolResponse // 可能返回的错误码: // FAILEDOPERATION_ASCOMMON = "FailedOperation.AsCommon" // FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" +// FAILEDOPERATION_UNEXPECTEDERROR = "FailedOperation.UnexpectedError" // INTERNALERROR_ASCOMMON = "InternalError.AsCommon" // INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp" // INTERNALERROR_DB = "InternalError.Db" @@ -1073,6 +1080,7 @@ func (c *Client) CreateClusterNodePool(request *CreateClusterNodePoolRequest) (r // 可能返回的错误码: // FAILEDOPERATION_ASCOMMON = "FailedOperation.AsCommon" // FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" +// FAILEDOPERATION_UNEXPECTEDERROR = "FailedOperation.UnexpectedError" // INTERNALERROR_ASCOMMON = "InternalError.AsCommon" // INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp" // INTERNALERROR_DB = "InternalError.Db" @@ -2063,6 +2071,7 @@ func NewCreatePrometheusRecordRuleYamlResponse() (response *CreatePrometheusReco // 以Yaml的方式创建聚合规则 // // 可能返回的错误码: +// FAILEDOPERATION_COMPONENTCLIENTUNPACK = "FailedOperation.ComponentClientUnpack" // FAILEDOPERATION_KUBECOMMON = "FailedOperation.KubeCommon" // INTERNALERROR = "InternalError" // INTERNALERROR_PARAM = "InternalError.Param" @@ -2080,6 +2089,7 @@ func (c *Client) CreatePrometheusRecordRuleYaml(request *CreatePrometheusRecordR // 以Yaml的方式创建聚合规则 // // 可能返回的错误码: +// FAILEDOPERATION_COMPONENTCLIENTUNPACK = "FailedOperation.ComponentClientUnpack" // FAILEDOPERATION_KUBECOMMON = "FailedOperation.KubeCommon" // INTERNALERROR = "InternalError" // INTERNALERROR_PARAM = "InternalError.Param" @@ -2129,6 +2139,7 @@ func NewCreatePrometheusTempResponse() (response *CreatePrometheusTempResponse) // 可能返回的错误码: // INTERNALERROR = "InternalError" // INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" func (c *Client) CreatePrometheusTemp(request *CreatePrometheusTempRequest) (response *CreatePrometheusTempResponse, err error) { return c.CreatePrometheusTempWithContext(context.Background(), request) @@ -2140,6 +2151,7 @@ func (c *Client) CreatePrometheusTemp(request *CreatePrometheusTempRequest) (res // 可能返回的错误码: // INTERNALERROR = "InternalError" // INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" func (c *Client) CreatePrometheusTempWithContext(ctx context.Context, request *CreatePrometheusTempRequest) (response *CreatePrometheusTempResponse, err error) { if request == nil { @@ -2721,6 +2733,7 @@ func NewDeleteClusterNodePoolResponse() (response *DeleteClusterNodePoolResponse // 删除节点池 // // 可能返回的错误码: +// FAILEDOPERATION_RECORDNOTFOUND = "FailedOperation.RecordNotFound" // INTERNALERROR_DB = "InternalError.Db" // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" @@ -2734,6 +2747,7 @@ func (c *Client) DeleteClusterNodePool(request *DeleteClusterNodePoolRequest) (r // 删除节点池 // // 可能返回的错误码: +// FAILEDOPERATION_RECORDNOTFOUND = "FailedOperation.RecordNotFound" // INTERNALERROR_DB = "InternalError.Db" // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" @@ -4526,6 +4540,7 @@ func NewDescribeClusterEndpointsResponse() (response *DescribeClusterEndpointsRe // // 可能返回的错误码: // FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" +// FAILEDOPERATION_KUBECOMMON = "FailedOperation.KubeCommon" // FAILEDOPERATION_KUBERNETESCLIENTBUILDERROR = "FailedOperation.KubernetesClientBuildError" // INTERNALERROR = "InternalError" // INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp" @@ -4545,6 +4560,7 @@ func (c *Client) DescribeClusterEndpoints(request *DescribeClusterEndpointsReque // // 可能返回的错误码: // FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" +// FAILEDOPERATION_KUBECOMMON = "FailedOperation.KubeCommon" // FAILEDOPERATION_KUBERNETESCLIENTBUILDERROR = "FailedOperation.KubernetesClientBuildError" // INTERNALERROR = "InternalError" // INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp" @@ -4664,6 +4680,7 @@ func NewDescribeClusterKubeconfigResponse() (response *DescribeClusterKubeconfig // // 可能返回的错误码: // FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" +// FAILEDOPERATION_KUBECOMMON = "FailedOperation.KubeCommon" // FAILEDOPERATION_KUBERNETESCLIENTBUILDERROR = "FailedOperation.KubernetesClientBuildError" // INTERNALERROR = "InternalError" // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" @@ -4692,6 +4709,7 @@ func (c *Client) DescribeClusterKubeconfig(request *DescribeClusterKubeconfigReq // // 可能返回的错误码: // FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" +// FAILEDOPERATION_KUBECOMMON = "FailedOperation.KubeCommon" // FAILEDOPERATION_KUBERNETESCLIENTBUILDERROR = "FailedOperation.KubernetesClientBuildError" // INTERNALERROR = "InternalError" // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" @@ -5074,6 +5092,7 @@ func NewDescribeClusterSecurityResponse() (response *DescribeClusterSecurityResp // FAILEDOPERATION = "FailedOperation" // FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" // FAILEDOPERATION_COMPONENTCLIENTUNPACK = "FailedOperation.ComponentClientUnpack" +// FAILEDOPERATION_DB = "FailedOperation.Db" // FAILEDOPERATION_DBRECORDNOTFOUND = "FailedOperation.DbRecordNotFound" // FAILEDOPERATION_KUBECOMMON = "FailedOperation.KubeCommon" // FAILEDOPERATION_LBCOMMON = "FailedOperation.LbCommon" @@ -5096,6 +5115,7 @@ func NewDescribeClusterSecurityResponse() (response *DescribeClusterSecurityResp // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" // RESOURCENOTFOUND_KUBERESOURCENOTFOUND = "ResourceNotFound.KubeResourceNotFound" // RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCEUNAVAILABLE_CLUSTERINABNORMALSTAT = "ResourceUnavailable.ClusterInAbnormalStat" // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" // UNAUTHORIZEDOPERATION = "UnauthorizedOperation" // UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" @@ -5112,6 +5132,7 @@ func (c *Client) DescribeClusterSecurity(request *DescribeClusterSecurityRequest // FAILEDOPERATION = "FailedOperation" // FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" // FAILEDOPERATION_COMPONENTCLIENTUNPACK = "FailedOperation.ComponentClientUnpack" +// FAILEDOPERATION_DB = "FailedOperation.Db" // FAILEDOPERATION_DBRECORDNOTFOUND = "FailedOperation.DbRecordNotFound" // FAILEDOPERATION_KUBECOMMON = "FailedOperation.KubeCommon" // FAILEDOPERATION_LBCOMMON = "FailedOperation.LbCommon" @@ -5134,6 +5155,7 @@ func (c *Client) DescribeClusterSecurity(request *DescribeClusterSecurityRequest // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" // RESOURCENOTFOUND_KUBERESOURCENOTFOUND = "ResourceNotFound.KubeResourceNotFound" // RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCEUNAVAILABLE_CLUSTERINABNORMALSTAT = "ResourceUnavailable.ClusterInAbnormalStat" // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" // UNAUTHORIZEDOPERATION = "UnauthorizedOperation" // UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" @@ -5255,6 +5277,7 @@ func NewDescribeClustersResponse() (response *DescribeClustersResponse) { // 查询集群列表 // // 可能返回的错误码: +// FAILEDOPERATION_UNEXPECTEDERROR = "FailedOperation.UnexpectedError" // INTERNALERROR = "InternalError" // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" // INTERNALERROR_DB = "InternalError.Db" @@ -5278,6 +5301,7 @@ func (c *Client) DescribeClusters(request *DescribeClustersRequest) (response *D // 查询集群列表 // // 可能返回的错误码: +// FAILEDOPERATION_UNEXPECTEDERROR = "FailedOperation.UnexpectedError" // INTERNALERROR = "InternalError" // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" // INTERNALERROR_DB = "InternalError.Db" @@ -7280,6 +7304,7 @@ func NewDescribePrometheusOverviewsResponse() (response *DescribePrometheusOverv // // 可能返回的错误码: // FAILEDOPERATION_COMPONENTCLIENTUNPACK = "FailedOperation.ComponentClientUnpack" +// FAILEDOPERATION_DB = "FailedOperation.Db" // INTERNALERROR = "InternalError" // INTERNALERROR_DB = "InternalError.Db" // INTERNALERROR_PARAM = "InternalError.Param" @@ -7293,6 +7318,7 @@ func (c *Client) DescribePrometheusOverviews(request *DescribePrometheusOverview // // 可能返回的错误码: // FAILEDOPERATION_COMPONENTCLIENTUNPACK = "FailedOperation.ComponentClientUnpack" +// FAILEDOPERATION_DB = "FailedOperation.Db" // INTERNALERROR = "InternalError" // INTERNALERROR_DB = "InternalError.Db" // INTERNALERROR_PARAM = "InternalError.Param" @@ -7830,6 +7856,7 @@ func NewDescribeRouteTableConflictsResponse() (response *DescribeRouteTableConfl // // 可能返回的错误码: // FAILEDOPERATION_PARAM = "FailedOperation.Param" +// FAILEDOPERATION_VPCRECODRNOTFOUND = "FailedOperation.VpcRecodrNotFound" // INTERNALERROR = "InternalError" // INTERNALERROR_CIDRMASKSIZEOUTOFRANGE = "InternalError.CidrMaskSizeOutOfRange" // INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr" @@ -7846,6 +7873,7 @@ func (c *Client) DescribeRouteTableConflicts(request *DescribeRouteTableConflict // // 可能返回的错误码: // FAILEDOPERATION_PARAM = "FailedOperation.Param" +// FAILEDOPERATION_VPCRECODRNOTFOUND = "FailedOperation.VpcRecodrNotFound" // INTERNALERROR = "InternalError" // INTERNALERROR_CIDRMASKSIZEOUTOFRANGE = "InternalError.CidrMaskSizeOutOfRange" // INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr" @@ -8621,6 +8649,7 @@ func NewEnableClusterAuditResponse() (response *EnableClusterAuditResponse) { // 开启集群审计 // // 可能返回的错误码: +// FAILEDOPERATION_COMPONENTCLIENTUNPACK = "FailedOperation.ComponentClientUnpack" // FAILEDOPERATION_CREATECLSINDEX = "FailedOperation.CreateClsIndex" // FAILEDOPERATION_CREATECLSMACHINEGROUP = "FailedOperation.CreateClsMachineGroup" // FAILEDOPERATION_CREATECLSTOPIC = "FailedOperation.CreateClsTopic" @@ -8642,6 +8671,7 @@ func (c *Client) EnableClusterAudit(request *EnableClusterAuditRequest) (respons // 开启集群审计 // // 可能返回的错误码: +// FAILEDOPERATION_COMPONENTCLIENTUNPACK = "FailedOperation.ComponentClientUnpack" // FAILEDOPERATION_CREATECLSINDEX = "FailedOperation.CreateClsIndex" // FAILEDOPERATION_CREATECLSMACHINEGROUP = "FailedOperation.CreateClsMachineGroup" // FAILEDOPERATION_CREATECLSTOPIC = "FailedOperation.CreateClsTopic" @@ -8748,6 +8778,7 @@ func NewEnableEventPersistenceResponse() (response *EnableEventPersistenceRespon // FAILEDOPERATION = "FailedOperation" // FAILEDOPERATION_CLUSTERNOTFOUND = "FailedOperation.ClusterNotFound" // FAILEDOPERATION_COMPONENTCLIENTUNPACK = "FailedOperation.ComponentClientUnpack" +// FAILEDOPERATION_CREATECLSCLIENT = "FailedOperation.CreateClsClient" // FAILEDOPERATION_CREATECLSCONFIG = "FailedOperation.CreateClsConfig" // FAILEDOPERATION_CREATECLSINDEX = "FailedOperation.CreateClsIndex" // FAILEDOPERATION_CREATECLSLOGSET = "FailedOperation.CreateClsLogSet" @@ -8778,6 +8809,7 @@ func (c *Client) EnableEventPersistence(request *EnableEventPersistenceRequest) // FAILEDOPERATION = "FailedOperation" // FAILEDOPERATION_CLUSTERNOTFOUND = "FailedOperation.ClusterNotFound" // FAILEDOPERATION_COMPONENTCLIENTUNPACK = "FailedOperation.ComponentClientUnpack" +// FAILEDOPERATION_CREATECLSCLIENT = "FailedOperation.CreateClsClient" // FAILEDOPERATION_CREATECLSCONFIG = "FailedOperation.CreateClsConfig" // FAILEDOPERATION_CREATECLSINDEX = "FailedOperation.CreateClsIndex" // FAILEDOPERATION_CREATECLSLOGSET = "FailedOperation.CreateClsLogSet" @@ -9442,6 +9474,7 @@ func NewModifyClusterAsGroupOptionAttributeResponse() (response *ModifyClusterAs // // 可能返回的错误码: // FAILEDOPERATION_KUBERNETESINTERNAL = "FailedOperation.KubernetesInternal" +// FAILEDOPERATION_UNEXPECTEDERROR = "FailedOperation.UnexpectedError" // INTERNALERROR = "InternalError" // INTERNALERROR_ASCOMMON = "InternalError.AsCommon" // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" @@ -9468,6 +9501,7 @@ func (c *Client) ModifyClusterAsGroupOptionAttribute(request *ModifyClusterAsGro // // 可能返回的错误码: // FAILEDOPERATION_KUBERNETESINTERNAL = "FailedOperation.KubernetesInternal" +// FAILEDOPERATION_UNEXPECTEDERROR = "FailedOperation.UnexpectedError" // INTERNALERROR = "InternalError" // INTERNALERROR_ASCOMMON = "InternalError.AsCommon" // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" @@ -9525,6 +9559,7 @@ func NewModifyClusterAttributeResponse() (response *ModifyClusterAttributeRespon // 可能返回的错误码: // FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" // FAILEDOPERATION_TRADECOMMON = "FailedOperation.TradeCommon" +// FAILEDOPERATION_UNEXPECTEDERROR = "FailedOperation.UnexpectedError" // INTERNALERROR = "InternalError" // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" // INTERNALERROR_DB = "InternalError.Db" @@ -9550,6 +9585,7 @@ func (c *Client) ModifyClusterAttribute(request *ModifyClusterAttributeRequest) // 可能返回的错误码: // FAILEDOPERATION_COMPONENTCLIENTHTTP = "FailedOperation.ComponentClientHttp" // FAILEDOPERATION_TRADECOMMON = "FailedOperation.TradeCommon" +// FAILEDOPERATION_UNEXPECTEDERROR = "FailedOperation.UnexpectedError" // INTERNALERROR = "InternalError" // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" // INTERNALERROR_DB = "InternalError.Db" @@ -9603,6 +9639,7 @@ func NewModifyClusterAuthenticationOptionsResponse() (response *ModifyClusterAut // 修改集群认证配置 // // 可能返回的错误码: +// FAILEDOPERATION_KUBECOMMON = "FailedOperation.KubeCommon" // INTERNALERROR = "InternalError" // INVALIDPARAMETER = "InvalidParameter" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" @@ -9616,6 +9653,7 @@ func (c *Client) ModifyClusterAuthenticationOptions(request *ModifyClusterAuthen // 修改集群认证配置 // // 可能返回的错误码: +// FAILEDOPERATION_KUBECOMMON = "FailedOperation.KubeCommon" // INTERNALERROR = "InternalError" // INVALIDPARAMETER = "InvalidParameter" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" @@ -9807,6 +9845,7 @@ func NewModifyNodePoolDesiredCapacityAboutAsgResponse() (response *ModifyNodePoo // 修改节点池关联伸缩组的期望实例数 // // 可能返回的错误码: +// FAILEDOPERATION_RECORDNOTFOUND = "FailedOperation.RecordNotFound" // INTERNALERROR = "InternalError" // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" // INTERNALERROR_DB = "InternalError.Db" @@ -9826,6 +9865,7 @@ func (c *Client) ModifyNodePoolDesiredCapacityAboutAsg(request *ModifyNodePoolDe // 修改节点池关联伸缩组的期望实例数 // // 可能返回的错误码: +// FAILEDOPERATION_RECORDNOTFOUND = "FailedOperation.RecordNotFound" // INTERNALERROR = "InternalError" // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" // INTERNALERROR_DB = "InternalError.Db" @@ -10530,6 +10570,7 @@ func NewRunPrometheusInstanceResponse() (response *RunPrometheusInstanceResponse // FAILEDOPERATION_COMPONENTCLIENTCOMMON = "FailedOperation.ComponentClientCommon" // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" func (c *Client) RunPrometheusInstance(request *RunPrometheusInstanceRequest) (response *RunPrometheusInstanceResponse, err error) { return c.RunPrometheusInstanceWithContext(context.Background(), request) } @@ -10541,6 +10582,7 @@ func (c *Client) RunPrometheusInstance(request *RunPrometheusInstanceRequest) (r // FAILEDOPERATION_COMPONENTCLIENTCOMMON = "FailedOperation.ComponentClientCommon" // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" func (c *Client) RunPrometheusInstanceWithContext(ctx context.Context, request *RunPrometheusInstanceRequest) (response *RunPrometheusInstanceResponse, err error) { if request == nil { request = NewRunPrometheusInstanceRequest() 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 155c22b0df..76bcf32c65 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 @@ -59,6 +59,9 @@ const ( // 请求(http请求)其他云服务失败。 FAILEDOPERATION_COMPONENTCLINETHTTP = "FailedOperation.ComponentClinetHttp" + // 创建CLS客户端失败。 + FAILEDOPERATION_CREATECLSCLIENT = "FailedOperation.CreateClsClient" + // 创建CLS采集配置失败。 FAILEDOPERATION_CREATECLSCONFIG = "FailedOperation.CreateClsConfig" @@ -161,12 +164,18 @@ const ( // 子账户RBAC权限不足。 FAILEDOPERATION_RBACFORBIDDEN = "FailedOperation.RBACForbidden" + // 记录没有发现。 + FAILEDOPERATION_RECORDNOTFOUND = "FailedOperation.RecordNotFound" + // 已有相同任务执行中。 FAILEDOPERATION_TASKALREADYRUNNING = "FailedOperation.TaskAlreadyRunning" // 询价错误。 FAILEDOPERATION_TRADECOMMON = "FailedOperation.TradeCommon" + // 不可预知的错误。 + FAILEDOPERATION_UNEXPECTEDERROR = "FailedOperation.UnexpectedError" + // VPC未知错误。 FAILEDOPERATION_VPCUNEXPECTEDERROR = "FailedOperation.VPCUnexpectedError" @@ -464,6 +473,9 @@ const ( // 资源不足。 RESOURCEINSUFFICIENT = "ResourceInsufficient" + // CVM资源不足。 + RESOURCEINSUFFICIENT_SPECIFIEDINSTANCETYPE = "ResourceInsufficient.SpecifiedInstanceType" + // 资源不存在。 RESOURCENOTFOUND = "ResourceNotFound" 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 59c40c5d1d..347f9630a5 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 @@ -908,7 +908,7 @@ type ClusterAsGroupOption struct { } type ClusterBasicSettings struct { - // 集群操作系统,支持设置公共镜像(字段传相应镜像ID)和自定义镜像(字段传相应镜像Name),详情参考:https://cloud.tencent.com/document/product/457/68289 + // 集群操作系统,支持设置公共镜像(字段传相应镜像Name)和自定义镜像(字段传相应镜像ID),详情参考:https://cloud.tencent.com/document/product/457/68289 ClusterOs *string `json:"ClusterOs,omitempty" name:"ClusterOs"` // 集群版本,默认值为1.10.5 @@ -1596,10 +1596,10 @@ type CreateClusterNodePoolRequestParams struct { // cluster id ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - // AutoScalingGroupPara AS组参数 + // AutoScalingGroupPara AS组参数,参考 https://cloud.tencent.com/document/product/377/20440 AutoScalingGroupPara *string `json:"AutoScalingGroupPara,omitempty" name:"AutoScalingGroupPara"` - // LaunchConfigurePara 运行参数 + // LaunchConfigurePara 运行参数,参考 https://cloud.tencent.com/document/product/377/20447 LaunchConfigurePara *string `json:"LaunchConfigurePara,omitempty" name:"LaunchConfigurePara"` // InstanceAdvancedSettings 示例参数 @@ -1642,10 +1642,10 @@ type CreateClusterNodePoolRequest struct { // cluster id ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - // AutoScalingGroupPara AS组参数 + // AutoScalingGroupPara AS组参数,参考 https://cloud.tencent.com/document/product/377/20440 AutoScalingGroupPara *string `json:"AutoScalingGroupPara,omitempty" name:"AutoScalingGroupPara"` - // LaunchConfigurePara 运行参数 + // LaunchConfigurePara 运行参数,参考 https://cloud.tencent.com/document/product/377/20447 LaunchConfigurePara *string `json:"LaunchConfigurePara,omitempty" name:"LaunchConfigurePara"` // InstanceAdvancedSettings 示例参数 @@ -10174,6 +10174,9 @@ func (r *DescribeVpcCniPodLimitsResponse) FromJsonString(s string) error { type DisableClusterAuditRequestParams struct { // 集群ID ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 取值为true代表关闭集群审计时删除默认创建的日志集和主题,false代表不删除 + DeleteLogSetAndTopic *bool `json:"DeleteLogSetAndTopic,omitempty" name:"DeleteLogSetAndTopic"` } type DisableClusterAuditRequest struct { @@ -10181,6 +10184,9 @@ type DisableClusterAuditRequest struct { // 集群ID ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 取值为true代表关闭集群审计时删除默认创建的日志集和主题,false代表不删除 + DeleteLogSetAndTopic *bool `json:"DeleteLogSetAndTopic,omitempty" name:"DeleteLogSetAndTopic"` } func (r *DisableClusterAuditRequest) ToJsonString() string { @@ -10196,6 +10202,7 @@ func (r *DisableClusterAuditRequest) FromJsonString(s string) error { return err } delete(f, "ClusterId") + delete(f, "DeleteLogSetAndTopic") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DisableClusterAuditRequest has unknown keys!", "") } @@ -10282,6 +10289,9 @@ func (r *DisableClusterDeletionProtectionResponse) FromJsonString(s string) erro type DisableEventPersistenceRequestParams struct { // 集群ID ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 取值为true代表关闭集群审计时删除默认创建的日志集和主题,false代表不删除 + DeleteLogSetAndTopic *bool `json:"DeleteLogSetAndTopic,omitempty" name:"DeleteLogSetAndTopic"` } type DisableEventPersistenceRequest struct { @@ -10289,6 +10299,9 @@ type DisableEventPersistenceRequest struct { // 集群ID ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 取值为true代表关闭集群审计时删除默认创建的日志集和主题,false代表不删除 + DeleteLogSetAndTopic *bool `json:"DeleteLogSetAndTopic,omitempty" name:"DeleteLogSetAndTopic"` } func (r *DisableEventPersistenceRequest) ToJsonString() string { @@ -10304,6 +10317,7 @@ func (r *DisableEventPersistenceRequest) FromJsonString(s string) error { return err } delete(f, "ClusterId") + delete(f, "DeleteLogSetAndTopic") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DisableEventPersistenceRequest has unknown keys!", "") } @@ -11020,7 +11034,7 @@ type EnhancedService struct { // 开启云监控服务。若不指定该参数,则默认开启云监控服务。 MonitorService *RunMonitorServiceEnabled `json:"MonitorService,omitempty" name:"MonitorService"` - // 开启云自动化助手服务。若不指定该参数,则默认不开启云自动化助手服务。 + // 开启云自动化助手服务(TencentCloud Automation Tools,TAT)。若不指定该参数,则公共镜像默认开启云自动化助手服务,其他镜像默认不开启云自动化助手服务。 AutomationService *RunAutomationServiceEnabled `json:"AutomationService,omitempty" name:"AutomationService"` } @@ -12537,6 +12551,15 @@ type ModifyClusterNodePoolRequestParams struct { // 镜像版本,"DOCKER_CUSTOMIZE"(容器定制版),"GENERAL"(普通版本,默认值) OsCustomizeType *string `json:"OsCustomizeType,omitempty" name:"OsCustomizeType"` + // GPU驱动版本,CUDA版本,cuDNN版本以及是否启用MIG特性 + GPUArgs *GPUArgs `json:"GPUArgs,omitempty" name:"GPUArgs"` + + // base64编码后的自定义脚本 + UserScript *string `json:"UserScript,omitempty" name:"UserScript"` + + // 更新label和taint时忽略存量节点 + IgnoreExistedNode *bool `json:"IgnoreExistedNode,omitempty" name:"IgnoreExistedNode"` + // 节点自定义参数 ExtraArgs *InstanceExtraArgs `json:"ExtraArgs,omitempty" name:"ExtraArgs"` @@ -12548,6 +12571,9 @@ type ModifyClusterNodePoolRequestParams struct { // 删除保护开关 DeletionProtection *bool `json:"DeletionProtection,omitempty" name:"DeletionProtection"` + + // dockerd --graph 指定值, 默认为 /var/lib/docker + DockerGraphPath *string `json:"DockerGraphPath,omitempty" name:"DockerGraphPath"` } type ModifyClusterNodePoolRequest struct { @@ -12583,6 +12609,15 @@ type ModifyClusterNodePoolRequest struct { // 镜像版本,"DOCKER_CUSTOMIZE"(容器定制版),"GENERAL"(普通版本,默认值) OsCustomizeType *string `json:"OsCustomizeType,omitempty" name:"OsCustomizeType"` + // GPU驱动版本,CUDA版本,cuDNN版本以及是否启用MIG特性 + GPUArgs *GPUArgs `json:"GPUArgs,omitempty" name:"GPUArgs"` + + // base64编码后的自定义脚本 + UserScript *string `json:"UserScript,omitempty" name:"UserScript"` + + // 更新label和taint时忽略存量节点 + IgnoreExistedNode *bool `json:"IgnoreExistedNode,omitempty" name:"IgnoreExistedNode"` + // 节点自定义参数 ExtraArgs *InstanceExtraArgs `json:"ExtraArgs,omitempty" name:"ExtraArgs"` @@ -12594,6 +12629,9 @@ type ModifyClusterNodePoolRequest struct { // 删除保护开关 DeletionProtection *bool `json:"DeletionProtection,omitempty" name:"DeletionProtection"` + + // dockerd --graph 指定值, 默认为 /var/lib/docker + DockerGraphPath *string `json:"DockerGraphPath,omitempty" name:"DockerGraphPath"` } func (r *ModifyClusterNodePoolRequest) ToJsonString() string { @@ -12618,10 +12656,14 @@ func (r *ModifyClusterNodePoolRequest) FromJsonString(s string) error { delete(f, "EnableAutoscale") delete(f, "OsName") delete(f, "OsCustomizeType") + delete(f, "GPUArgs") + delete(f, "UserScript") + delete(f, "IgnoreExistedNode") delete(f, "ExtraArgs") delete(f, "Tags") delete(f, "Unschedulable") delete(f, "DeletionProtection") + delete(f, "DockerGraphPath") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyClusterNodePoolRequest has unknown keys!", "") } @@ -14779,6 +14821,12 @@ type SubnetInfos struct { // 安全组id SecurityGroups []*string `json:"SecurityGroups,omitempty" name:"SecurityGroups"` + + // 系统 + Os *string `json:"Os,omitempty" name:"Os"` + + // 硬件架构 + Arch *string `json:"Arch,omitempty" name:"Arch"` } // Predefined struct for user diff --git a/vendor/modules.txt b/vendor/modules.txt index 4ec28d4f74..7a61babe38 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -645,7 +645,7 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tdmq/v20200217 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tem/v20210701 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.0.529 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901 -# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.519 +# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.549 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/kubernetes_cluster.html.markdown b/website/docs/r/kubernetes_cluster.html.markdown index 4d2f1ab3a7..3de399f817 100644 --- a/website/docs/r/kubernetes_cluster.html.markdown +++ b/website/docs/r/kubernetes_cluster.html.markdown @@ -497,6 +497,7 @@ The `auth_options` object supports the following: The `cluster_audit` object supports the following: * `enabled` - (Required, Bool) Specify weather the Cluster Audit enabled. NOTE: Enable Cluster Audit will also auto install Log Agent. +* `delete_audit_log_and_topic` - (Optional, Bool) when you want to close the cluster audit log or delete the cluster, you can use this parameter to determine whether the audit log set and topic created by default will be deleted. * `log_set_id` - (Optional, String) Specify id of existing CLS log set, or auto create a new set by leave it empty. * `topic_id` - (Optional, String) Specify id of existing CLS log topic, or auto create a new topic by leave it empty. @@ -521,6 +522,7 @@ The `data_disk` object supports the following: The `event_persistence` object supports the following: * `enabled` - (Required, Bool) Specify weather the Event Persistence enabled. +* `delete_event_log_and_topic` - (Optional, Bool) when you want to close the cluster event persistence or delete the cluster, you can use this parameter to determine whether the event persistence log set and topic created by default will be deleted. * `log_set_id` - (Optional, String) Specify id of existing CLS log set, or auto create a new set by leave it empty. * `topic_id` - (Optional, String) Specify id of existing CLS log topic, or auto create a new topic by leave it empty.