From 8b544a7d14e4a5dd9f6ee5b337197f897ba96a33 Mon Sep 17 00:00:00 2001 From: devad Date: Fri, 20 May 2022 09:22:12 +0800 Subject: [PATCH] Add tencent SDK --- adaptor/pod/server/tencent/client.go | 6973 +++++++++++++++++++++ adaptor/pod/server/tencent/errors.go | 343 + adaptor/pod/server/tencent/models.go | 8695 ++++++++++++++++++++++++++ examples/pcm_tencent.go | 151 + examples/tencent.go | 70 + 5 files changed, 16232 insertions(+) create mode 100644 adaptor/pod/server/tencent/client.go create mode 100644 adaptor/pod/server/tencent/errors.go create mode 100644 adaptor/pod/server/tencent/models.go create mode 100644 examples/pcm_tencent.go create mode 100644 examples/tencent.go diff --git a/adaptor/pod/server/tencent/client.go b/adaptor/pod/server/tencent/client.go new file mode 100644 index 00000000..0629ca7f --- /dev/null +++ b/adaptor/pod/server/tencent/client.go @@ -0,0 +1,6973 @@ +// Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v20180525 + +import ( + "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pod/server" + "code.gitlink.org.cn/JCCE/PCM.git/common/tenanter" + "code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbpod" + "code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbtenant" + "context" + "errors" + "flag" + "github.com/golang/glog" + "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" + tchttp "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" + "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile" + "strconv" +) + +const APIVersion = "2018-05-25" + +type Client struct { + common.Client +} + +// Deprecated +func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error) { + cpf := profile.NewClientProfile() + client = &Client{} + client.Init(region).WithSecretId(secretId, secretKey).WithProfile(cpf) + return +} + +func NewClient(credential common.CredentialIface, region string, clientProfile *profile.ClientProfile) (client *Client, err error) { + client = &Client{} + client.Init(region). + WithCredential(credential). + WithProfile(clientProfile) + return +} + +func NewAcquireClusterAdminRoleRequest() (request *AcquireClusterAdminRoleRequest) { + request = &AcquireClusterAdminRoleRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "AcquireClusterAdminRole") + + return +} + +func NewAcquireClusterAdminRoleResponse() (response *AcquireClusterAdminRoleResponse) { + response = &AcquireClusterAdminRoleResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AcquireClusterAdminRole +// 通过此接口,可以获取集群的tke:admin的ClusterRole,即管理员角色,可以用于CAM侧高权限的用户,通过CAM策略给予子账户此接口权限,进而可以通过此接口直接获取到kubernetes集群内的管理员角色。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError" +// INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError" +// INTERNALERROR_KUBERNETESGETOPERATIONERROR = "InternalError.KubernetesGetOperationError" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" +// UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist" +func (c *Client) AcquireClusterAdminRole(request *AcquireClusterAdminRoleRequest) (response *AcquireClusterAdminRoleResponse, err error) { + return c.AcquireClusterAdminRoleWithContext(context.Background(), request) +} + +// AcquireClusterAdminRole +// 通过此接口,可以获取集群的tke:admin的ClusterRole,即管理员角色,可以用于CAM侧高权限的用户,通过CAM策略给予子账户此接口权限,进而可以通过此接口直接获取到kubernetes集群内的管理员角色。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError" +// INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError" +// INTERNALERROR_KUBERNETESGETOPERATIONERROR = "InternalError.KubernetesGetOperationError" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" +// UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist" +func (c *Client) AcquireClusterAdminRoleWithContext(ctx context.Context, request *AcquireClusterAdminRoleRequest) (response *AcquireClusterAdminRoleResponse, err error) { + if request == nil { + request = NewAcquireClusterAdminRoleRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("AcquireClusterAdminRole require credential") + } + + request.SetContext(ctx) + + response = NewAcquireClusterAdminRoleResponse() + err = c.Send(request, response) + return +} + +func NewAddClusterCIDRRequest() (request *AddClusterCIDRRequest) { + request = &AddClusterCIDRRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "AddClusterCIDR") + + return +} + +func NewAddClusterCIDRResponse() (response *AddClusterCIDRResponse) { + response = &AddClusterCIDRResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AddClusterCIDR +// 给GR集群增加可用的ClusterCIDR +// +// 可能返回的错误码: +// INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CIDRMASKSIZEOUTOFRANGE = "InvalidParameter.CIDRMaskSizeOutOfRange" +// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERCLUSTER = "InvalidParameter.CidrConflictWithOtherCluster" +// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute" +// INVALIDPARAMETER_CIDRCONFLICTWITHVPCCIDR = "InvalidParameter.CidrConflictWithVpcCidr" +// INVALIDPARAMETER_CIDRCONFLICTWITHVPCGLOBALROUTE = "InvalidParameter.CidrConflictWithVpcGlobalRoute" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) AddClusterCIDR(request *AddClusterCIDRRequest) (response *AddClusterCIDRResponse, err error) { + return c.AddClusterCIDRWithContext(context.Background(), request) +} + +// AddClusterCIDR +// 给GR集群增加可用的ClusterCIDR +// +// 可能返回的错误码: +// INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CIDRMASKSIZEOUTOFRANGE = "InvalidParameter.CIDRMaskSizeOutOfRange" +// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERCLUSTER = "InvalidParameter.CidrConflictWithOtherCluster" +// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute" +// INVALIDPARAMETER_CIDRCONFLICTWITHVPCCIDR = "InvalidParameter.CidrConflictWithVpcCidr" +// INVALIDPARAMETER_CIDRCONFLICTWITHVPCGLOBALROUTE = "InvalidParameter.CidrConflictWithVpcGlobalRoute" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) AddClusterCIDRWithContext(ctx context.Context, request *AddClusterCIDRRequest) (response *AddClusterCIDRResponse, err error) { + if request == nil { + request = NewAddClusterCIDRRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("AddClusterCIDR require credential") + } + + request.SetContext(ctx) + + response = NewAddClusterCIDRResponse() + err = c.Send(request, response) + return +} + +func NewAddExistedInstancesRequest() (request *AddExistedInstancesRequest) { + request = &AddExistedInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "AddExistedInstances") + + return +} + +func NewAddExistedInstancesResponse() (response *AddExistedInstancesResponse) { + response = &AddExistedInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AddExistedInstances +// 添加已经存在的实例到集群 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +func (c *Client) AddExistedInstances(request *AddExistedInstancesRequest) (response *AddExistedInstancesResponse, err error) { + return c.AddExistedInstancesWithContext(context.Background(), request) +} + +// AddExistedInstances +// 添加已经存在的实例到集群 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +func (c *Client) AddExistedInstancesWithContext(ctx context.Context, request *AddExistedInstancesRequest) (response *AddExistedInstancesResponse, err error) { + if request == nil { + request = NewAddExistedInstancesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("AddExistedInstances require credential") + } + + request.SetContext(ctx) + + response = NewAddExistedInstancesResponse() + err = c.Send(request, response) + return +} + +func NewAddNodeToNodePoolRequest() (request *AddNodeToNodePoolRequest) { + request = &AddNodeToNodePoolRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "AddNodeToNodePool") + + return +} + +func NewAddNodeToNodePoolResponse() (response *AddNodeToNodePoolResponse) { + response = &AddNodeToNodePoolResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AddNodeToNodePool +// 将集群内节点移入节点池 +// +// 可能返回的错误码: +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) AddNodeToNodePool(request *AddNodeToNodePoolRequest) (response *AddNodeToNodePoolResponse, err error) { + return c.AddNodeToNodePoolWithContext(context.Background(), request) +} + +// AddNodeToNodePool +// 将集群内节点移入节点池 +// +// 可能返回的错误码: +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) AddNodeToNodePoolWithContext(ctx context.Context, request *AddNodeToNodePoolRequest) (response *AddNodeToNodePoolResponse, err error) { + if request == nil { + request = NewAddNodeToNodePoolRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("AddNodeToNodePool require credential") + } + + request.SetContext(ctx) + + response = NewAddNodeToNodePoolResponse() + err = c.Send(request, response) + return +} + +func NewAddVpcCniSubnetsRequest() (request *AddVpcCniSubnetsRequest) { + request = &AddVpcCniSubnetsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "AddVpcCniSubnets") + + return +} + +func NewAddVpcCniSubnetsResponse() (response *AddVpcCniSubnetsResponse) { + response = &AddVpcCniSubnetsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// AddVpcCniSubnets +// 针对VPC-CNI模式的集群,增加集群容器网络可使用的子网 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" +// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) AddVpcCniSubnets(request *AddVpcCniSubnetsRequest) (response *AddVpcCniSubnetsResponse, err error) { + return c.AddVpcCniSubnetsWithContext(context.Background(), request) +} + +// AddVpcCniSubnets +// 针对VPC-CNI模式的集群,增加集群容器网络可使用的子网 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" +// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) AddVpcCniSubnetsWithContext(ctx context.Context, request *AddVpcCniSubnetsRequest) (response *AddVpcCniSubnetsResponse, err error) { + if request == nil { + request = NewAddVpcCniSubnetsRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("AddVpcCniSubnets require credential") + } + + request.SetContext(ctx) + + response = NewAddVpcCniSubnetsResponse() + err = c.Send(request, response) + return +} + +func NewCheckInstancesUpgradeAbleRequest() (request *CheckInstancesUpgradeAbleRequest) { + request = &CheckInstancesUpgradeAbleRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CheckInstancesUpgradeAble") + + return +} + +func NewCheckInstancesUpgradeAbleResponse() (response *CheckInstancesUpgradeAbleResponse) { + response = &CheckInstancesUpgradeAbleResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CheckInstancesUpgradeAble +// 检查给定节点列表中哪些是可升级的 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +func (c *Client) CheckInstancesUpgradeAble(request *CheckInstancesUpgradeAbleRequest) (response *CheckInstancesUpgradeAbleResponse, err error) { + return c.CheckInstancesUpgradeAbleWithContext(context.Background(), request) +} + +// CheckInstancesUpgradeAble +// 检查给定节点列表中哪些是可升级的 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +func (c *Client) CheckInstancesUpgradeAbleWithContext(ctx context.Context, request *CheckInstancesUpgradeAbleRequest) (response *CheckInstancesUpgradeAbleResponse, err error) { + if request == nil { + request = NewCheckInstancesUpgradeAbleRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("CheckInstancesUpgradeAble require credential") + } + + request.SetContext(ctx) + + response = NewCheckInstancesUpgradeAbleResponse() + err = c.Send(request, response) + return +} + +func NewCreateClusterRequest() (request *CreateClusterRequest) { + request = &CreateClusterRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CreateCluster") + + return +} + +func NewCreateClusterResponse() (response *CreateClusterResponse) { + response = &CreateClusterResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateCluster +// 创建集群 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTCOMMON = "InternalError.AccountCommon" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CIDRCONFLICTWITHOTHERCLUSTER = "InternalError.CidrConflictWithOtherCluster" +// INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute" +// INTERNALERROR_CIDRCONFLICTWITHVPCCIDR = "InternalError.CidrConflictWithVpcCidr" +// INTERNALERROR_CIDRCONFLICTWITHVPCGLOBALROUTE = "InternalError.CidrConflictWithVpcGlobalRoute" +// INTERNALERROR_CIDRINVALI = "InternalError.CidrInvali" +// INTERNALERROR_CIDRMASKSIZEOUTOFRANGE = "InternalError.CidrMaskSizeOutOfRange" +// INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" +// INTERNALERROR_CREATEMASTERFAILED = "InternalError.CreateMasterFailed" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_CVMNUMBERNOTMATCH = "InternalError.CvmNumberNotMatch" +// INTERNALERROR_CVMSTATUS = "InternalError.CvmStatus" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount" +// INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota" +// INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed" +// INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr" +// INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" +// INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit" +// INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit" +// INTERNALERROR_QUOTAUSGLIMIT = "InternalError.QuotaUSGLimit" +// INTERNALERROR_TASKCREATEFAILED = "InternalError.TaskCreateFailed" +// INTERNALERROR_TRADECOMMON = "InternalError.TradeCommon" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CIDRMASKSIZEOUTOFRANGE = "InvalidParameter.CIDRMaskSizeOutOfRange" +// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERCLUSTER = "InvalidParameter.CidrConflictWithOtherCluster" +// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute" +// INVALIDPARAMETER_CIDRCONFLICTWITHVPCCIDR = "InvalidParameter.CidrConflictWithVpcCidr" +// INVALIDPARAMETER_CIDRCONFLICTWITHVPCGLOBALROUTE = "InvalidParameter.CidrConflictWithVpcGlobalRoute" +// INVALIDPARAMETER_CIDRINVALID = "InvalidParameter.CidrInvalid" +// INVALIDPARAMETER_INVALIDPRIVATENETWORKCIDR = "InvalidParameter.InvalidPrivateNetworkCIDR" +// LIMITEXCEEDED = "LimitExceeded" +func (c *Client) CreateCluster(request *CreateClusterRequest) (response *CreateClusterResponse, err error) { + return c.CreateClusterWithContext(context.Background(), request) +} + +// CreateCluster +// 创建集群 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTCOMMON = "InternalError.AccountCommon" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CIDRCONFLICTWITHOTHERCLUSTER = "InternalError.CidrConflictWithOtherCluster" +// INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute" +// INTERNALERROR_CIDRCONFLICTWITHVPCCIDR = "InternalError.CidrConflictWithVpcCidr" +// INTERNALERROR_CIDRCONFLICTWITHVPCGLOBALROUTE = "InternalError.CidrConflictWithVpcGlobalRoute" +// INTERNALERROR_CIDRINVALI = "InternalError.CidrInvali" +// INTERNALERROR_CIDRMASKSIZEOUTOFRANGE = "InternalError.CidrMaskSizeOutOfRange" +// INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" +// INTERNALERROR_CREATEMASTERFAILED = "InternalError.CreateMasterFailed" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_CVMNUMBERNOTMATCH = "InternalError.CvmNumberNotMatch" +// INTERNALERROR_CVMSTATUS = "InternalError.CvmStatus" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount" +// INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota" +// INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed" +// INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr" +// INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" +// INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit" +// INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit" +// INTERNALERROR_QUOTAUSGLIMIT = "InternalError.QuotaUSGLimit" +// INTERNALERROR_TASKCREATEFAILED = "InternalError.TaskCreateFailed" +// INTERNALERROR_TRADECOMMON = "InternalError.TradeCommon" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CIDRMASKSIZEOUTOFRANGE = "InvalidParameter.CIDRMaskSizeOutOfRange" +// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERCLUSTER = "InvalidParameter.CidrConflictWithOtherCluster" +// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute" +// INVALIDPARAMETER_CIDRCONFLICTWITHVPCCIDR = "InvalidParameter.CidrConflictWithVpcCidr" +// INVALIDPARAMETER_CIDRCONFLICTWITHVPCGLOBALROUTE = "InvalidParameter.CidrConflictWithVpcGlobalRoute" +// INVALIDPARAMETER_CIDRINVALID = "InvalidParameter.CidrInvalid" +// INVALIDPARAMETER_INVALIDPRIVATENETWORKCIDR = "InvalidParameter.InvalidPrivateNetworkCIDR" +// LIMITEXCEEDED = "LimitExceeded" +func (c *Client) CreateClusterWithContext(ctx context.Context, request *CreateClusterRequest) (response *CreateClusterResponse, err error) { + if request == nil { + request = NewCreateClusterRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("CreateCluster require credential") + } + + request.SetContext(ctx) + + response = NewCreateClusterResponse() + err = c.Send(request, response) + return +} + +func NewCreateClusterAsGroupRequest() (request *CreateClusterAsGroupRequest) { + request = &CreateClusterAsGroupRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CreateClusterAsGroup") + + return +} + +func NewCreateClusterAsGroupResponse() (response *CreateClusterAsGroupResponse) { + response = &CreateClusterAsGroupResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateClusterAsGroup +// 为已经存在的集群创建伸缩组 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" +// INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) CreateClusterAsGroup(request *CreateClusterAsGroupRequest) (response *CreateClusterAsGroupResponse, err error) { + return c.CreateClusterAsGroupWithContext(context.Background(), request) +} + +// CreateClusterAsGroup +// 为已经存在的集群创建伸缩组 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" +// INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) CreateClusterAsGroupWithContext(ctx context.Context, request *CreateClusterAsGroupRequest) (response *CreateClusterAsGroupResponse, err error) { + if request == nil { + request = NewCreateClusterAsGroupRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("CreateClusterAsGroup require credential") + } + + request.SetContext(ctx) + + response = NewCreateClusterAsGroupResponse() + err = c.Send(request, response) + return +} + +func NewCreateClusterEndpointRequest() (request *CreateClusterEndpointRequest) { + request = &CreateClusterEndpointRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CreateClusterEndpoint") + + return +} + +func NewCreateClusterEndpointResponse() (response *CreateClusterEndpointResponse) { + response = &CreateClusterEndpointResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateClusterEndpoint +// 创建集群访问端口(独立集群开启内网/外网访问,托管集群支持开启内网访问) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_EMPTYCLUSTERNOTSUPPORT = "InternalError.EmptyClusterNotSupport" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) CreateClusterEndpoint(request *CreateClusterEndpointRequest) (response *CreateClusterEndpointResponse, err error) { + return c.CreateClusterEndpointWithContext(context.Background(), request) +} + +// CreateClusterEndpoint +// 创建集群访问端口(独立集群开启内网/外网访问,托管集群支持开启内网访问) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_EMPTYCLUSTERNOTSUPPORT = "InternalError.EmptyClusterNotSupport" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) CreateClusterEndpointWithContext(ctx context.Context, request *CreateClusterEndpointRequest) (response *CreateClusterEndpointResponse, err error) { + if request == nil { + request = NewCreateClusterEndpointRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("CreateClusterEndpoint require credential") + } + + request.SetContext(ctx) + + response = NewCreateClusterEndpointResponse() + err = c.Send(request, response) + return +} + +func NewCreateClusterEndpointVipRequest() (request *CreateClusterEndpointVipRequest) { + request = &CreateClusterEndpointVipRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CreateClusterEndpointVip") + + return +} + +func NewCreateClusterEndpointVipResponse() (response *CreateClusterEndpointVipResponse) { + response = &CreateClusterEndpointVipResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateClusterEndpointVip +// 创建托管集群外网访问端口(老的方式,仅支持托管集群外网端口) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) CreateClusterEndpointVip(request *CreateClusterEndpointVipRequest) (response *CreateClusterEndpointVipResponse, err error) { + return c.CreateClusterEndpointVipWithContext(context.Background(), request) +} + +// CreateClusterEndpointVip +// 创建托管集群外网访问端口(老的方式,仅支持托管集群外网端口) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) CreateClusterEndpointVipWithContext(ctx context.Context, request *CreateClusterEndpointVipRequest) (response *CreateClusterEndpointVipResponse, err error) { + if request == nil { + request = NewCreateClusterEndpointVipRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("CreateClusterEndpointVip require credential") + } + + request.SetContext(ctx) + + response = NewCreateClusterEndpointVipResponse() + err = c.Send(request, response) + return +} + +func NewCreateClusterInstancesRequest() (request *CreateClusterInstancesRequest) { + request = &CreateClusterInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CreateClusterInstances") + + return +} + +func NewCreateClusterInstancesResponse() (response *CreateClusterInstancesResponse) { + response = &CreateClusterInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateClusterInstances +// 扩展(新建)集群节点 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTCOMMON = "InternalError.AccountCommon" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" +// INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit" +// INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit" +// INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INTERNALERROR_VPCPEERNOTFOUND = "InternalError.VpcPeerNotFound" +// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" +// INVALIDPARAMETER = "InvalidParameter" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) CreateClusterInstances(request *CreateClusterInstancesRequest) (response *CreateClusterInstancesResponse, err error) { + return c.CreateClusterInstancesWithContext(context.Background(), request) +} + +// CreateClusterInstances +// 扩展(新建)集群节点 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTCOMMON = "InternalError.AccountCommon" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" +// INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit" +// INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit" +// INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INTERNALERROR_VPCPEERNOTFOUND = "InternalError.VpcPeerNotFound" +// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" +// INVALIDPARAMETER = "InvalidParameter" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) CreateClusterInstancesWithContext(ctx context.Context, request *CreateClusterInstancesRequest) (response *CreateClusterInstancesResponse, err error) { + if request == nil { + request = NewCreateClusterInstancesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("CreateClusterInstances require credential") + } + + request.SetContext(ctx) + + response = NewCreateClusterInstancesResponse() + err = c.Send(request, response) + return +} + +func NewCreateClusterNodePoolRequest() (request *CreateClusterNodePoolRequest) { + request = &CreateClusterNodePoolRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CreateClusterNodePool") + + return +} + +func NewCreateClusterNodePoolResponse() (response *CreateClusterNodePoolResponse) { + response = &CreateClusterNodePoolResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateClusterNodePool +// 创建节点池 +// +// 可能返回的错误码: +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_ASASGNOTEXIST = "ResourceNotFound.AsAsgNotExist" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +func (c *Client) CreateClusterNodePool(request *CreateClusterNodePoolRequest) (response *CreateClusterNodePoolResponse, err error) { + return c.CreateClusterNodePoolWithContext(context.Background(), request) +} + +// CreateClusterNodePool +// 创建节点池 +// +// 可能返回的错误码: +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_ASASGNOTEXIST = "ResourceNotFound.AsAsgNotExist" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +func (c *Client) CreateClusterNodePoolWithContext(ctx context.Context, request *CreateClusterNodePoolRequest) (response *CreateClusterNodePoolResponse, err error) { + if request == nil { + request = NewCreateClusterNodePoolRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("CreateClusterNodePool require credential") + } + + request.SetContext(ctx) + + response = NewCreateClusterNodePoolResponse() + err = c.Send(request, response) + return +} + +func NewCreateClusterNodePoolFromExistingAsgRequest() (request *CreateClusterNodePoolFromExistingAsgRequest) { + request = &CreateClusterNodePoolFromExistingAsgRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CreateClusterNodePoolFromExistingAsg") + + return +} + +func NewCreateClusterNodePoolFromExistingAsgResponse() (response *CreateClusterNodePoolFromExistingAsgResponse) { + response = &CreateClusterNodePoolFromExistingAsgResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateClusterNodePoolFromExistingAsg +// 从伸缩组创建节点池 +// +// 可能返回的错误码: +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +func (c *Client) CreateClusterNodePoolFromExistingAsg(request *CreateClusterNodePoolFromExistingAsgRequest) (response *CreateClusterNodePoolFromExistingAsgResponse, err error) { + return c.CreateClusterNodePoolFromExistingAsgWithContext(context.Background(), request) +} + +// CreateClusterNodePoolFromExistingAsg +// 从伸缩组创建节点池 +// +// 可能返回的错误码: +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +func (c *Client) CreateClusterNodePoolFromExistingAsgWithContext(ctx context.Context, request *CreateClusterNodePoolFromExistingAsgRequest) (response *CreateClusterNodePoolFromExistingAsgResponse, err error) { + if request == nil { + request = NewCreateClusterNodePoolFromExistingAsgRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("CreateClusterNodePoolFromExistingAsg require credential") + } + + request.SetContext(ctx) + + response = NewCreateClusterNodePoolFromExistingAsgResponse() + err = c.Send(request, response) + return +} + +func NewCreateClusterRouteRequest() (request *CreateClusterRouteRequest) { + request = &CreateClusterRouteRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CreateClusterRoute") + + return +} + +func NewCreateClusterRouteResponse() (response *CreateClusterRouteResponse) { + response = &CreateClusterRouteResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateClusterRoute +// 创建集群路由 +// +// 可能返回的错误码: +// INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute" +// INTERNALERROR_CIDROUTOFROUTETABLE = "InternalError.CidrOutOfRouteTable" +// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_GATEWAYALREADYASSOCIATEDCIDR = "InternalError.GatewayAlreadyAssociatedCidr" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_ROUTETABLENOTFOUND = "InternalError.RouteTableNotFound" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute" +// INVALIDPARAMETER_CIDROUTOFROUTETABLE = "InvalidParameter.CidrOutOfRouteTable" +// INVALIDPARAMETER_GATEWAYALREADYASSOCIATEDCIDR = "InvalidParameter.GatewayAlreadyAssociatedCidr" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_ROUTETABLENOTFOUND = "ResourceNotFound.RouteTableNotFound" +func (c *Client) CreateClusterRoute(request *CreateClusterRouteRequest) (response *CreateClusterRouteResponse, err error) { + return c.CreateClusterRouteWithContext(context.Background(), request) +} + +// CreateClusterRoute +// 创建集群路由 +// +// 可能返回的错误码: +// INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute" +// INTERNALERROR_CIDROUTOFROUTETABLE = "InternalError.CidrOutOfRouteTable" +// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_GATEWAYALREADYASSOCIATEDCIDR = "InternalError.GatewayAlreadyAssociatedCidr" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_ROUTETABLENOTFOUND = "InternalError.RouteTableNotFound" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute" +// INVALIDPARAMETER_CIDROUTOFROUTETABLE = "InvalidParameter.CidrOutOfRouteTable" +// INVALIDPARAMETER_GATEWAYALREADYASSOCIATEDCIDR = "InvalidParameter.GatewayAlreadyAssociatedCidr" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_ROUTETABLENOTFOUND = "ResourceNotFound.RouteTableNotFound" +func (c *Client) CreateClusterRouteWithContext(ctx context.Context, request *CreateClusterRouteRequest) (response *CreateClusterRouteResponse, err error) { + if request == nil { + request = NewCreateClusterRouteRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("CreateClusterRoute require credential") + } + + request.SetContext(ctx) + + response = NewCreateClusterRouteResponse() + err = c.Send(request, response) + return +} + +func NewCreateClusterRouteTableRequest() (request *CreateClusterRouteTableRequest) { + request = &CreateClusterRouteTableRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CreateClusterRouteTable") + + return +} + +func NewCreateClusterRouteTableResponse() (response *CreateClusterRouteTableResponse) { + response = &CreateClusterRouteTableResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateClusterRouteTable +// 创建集群路由表 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CIDRCONFLICTWITHOTHERCLUSTER = "InternalError.CidrConflictWithOtherCluster" +// INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute" +// INTERNALERROR_CIDRCONFLICTWITHVPCCIDR = "InternalError.CidrConflictWithVpcCidr" +// INTERNALERROR_CIDRCONFLICTWITHVPCGLOBALROUTE = "InternalError.CidrConflictWithVpcGlobalRoute" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit" +// INTERNALERROR_RESOURCEEXISTALREADY = "InternalError.ResourceExistAlready" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) CreateClusterRouteTable(request *CreateClusterRouteTableRequest) (response *CreateClusterRouteTableResponse, err error) { + return c.CreateClusterRouteTableWithContext(context.Background(), request) +} + +// CreateClusterRouteTable +// 创建集群路由表 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CIDRCONFLICTWITHOTHERCLUSTER = "InternalError.CidrConflictWithOtherCluster" +// INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute" +// INTERNALERROR_CIDRCONFLICTWITHVPCCIDR = "InternalError.CidrConflictWithVpcCidr" +// INTERNALERROR_CIDRCONFLICTWITHVPCGLOBALROUTE = "InternalError.CidrConflictWithVpcGlobalRoute" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit" +// INTERNALERROR_RESOURCEEXISTALREADY = "InternalError.ResourceExistAlready" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) CreateClusterRouteTableWithContext(ctx context.Context, request *CreateClusterRouteTableRequest) (response *CreateClusterRouteTableResponse, err error) { + if request == nil { + request = NewCreateClusterRouteTableRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("CreateClusterRouteTable require credential") + } + + request.SetContext(ctx) + + response = NewCreateClusterRouteTableResponse() + err = c.Send(request, response) + return +} + +func NewCreateEKSClusterRequest() (request *CreateEKSClusterRequest) { + request = &CreateEKSClusterRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CreateEKSCluster") + + return +} + +func NewCreateEKSClusterResponse() (response *CreateEKSClusterResponse) { + response = &CreateEKSClusterResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateEKSCluster +// 创建弹性集群 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) CreateEKSCluster(request *CreateEKSClusterRequest) (response *CreateEKSClusterResponse, err error) { + return c.CreateEKSClusterWithContext(context.Background(), request) +} + +// CreateEKSCluster +// 创建弹性集群 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) CreateEKSClusterWithContext(ctx context.Context, request *CreateEKSClusterRequest) (response *CreateEKSClusterResponse, err error) { + if request == nil { + request = NewCreateEKSClusterRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("CreateEKSCluster require credential") + } + + request.SetContext(ctx) + + response = NewCreateEKSClusterResponse() + err = c.Send(request, response) + return +} + +func NewCreateEKSContainerInstancesRequest() (request *CreateEKSContainerInstancesRequest) { + request = &CreateEKSContainerInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CreateEKSContainerInstances") + + return +} + +func NewCreateEKSContainerInstancesResponse() (response *CreateEKSContainerInstancesResponse) { + response = &CreateEKSContainerInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateEKSContainerInstances +// 创建容器实例 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CMDTIMEOUT = "InternalError.CmdTimeout" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER = "InvalidParameter" +func CreateEKSContainerInstances(request *CreateEKSContainerInstancesRequest) (response *CreateEKSContainerInstancesResponse, err error) { + provider := pbtenant.CloudProvider(request.ProviderId) + + var configFile string + flag.StringVar(&configFile, "conf", "configs/config.yaml", "config.yaml") + flag.Parse() + defer glog.Flush() + + if err := tenanter.LoadCloudConfigsFromFile(configFile); err != nil { + if !errors.Is(err, tenanter.ErrLoadTenanterFileEmpty) { + glog.Fatalf("tenanter.LoadCloudConfigsFromFile error %+v", err) + } + glog.Warningf("tenanter.LoadCloudConfigsFromFile empty file path %s", configFile) + } + + glog.Infof("load tenant from file finished") + tenanters, err := tenanter.GetTenanters(provider) + var regionId int32 + var cpuPod string + var memoryPod string + container := request.Containers + containerImage := container[0].Image + containerName := container[0].Name + cpuPodFloat := container[0].Cpu + memoryPodFloat := container[0].Memory + switch request.ProviderId { + case 0: + regionId, _ = tenanter.GetAliRegionId(request.RegionId) + cpuPod = strconv.FormatFloat(*cpuPodFloat, 'f', 0, 64) + memoryPod = strconv.FormatFloat(*memoryPodFloat, 'f', 0, 64) + case 1: + regionId, _ = tenanter.GetTencentRegionId(request.RegionId) + cpuPod = strconv.FormatFloat(*cpuPodFloat, 'f', 0, 64) + memoryPod = strconv.FormatFloat(*memoryPodFloat, 'f', 0, 64) + case 2: + //华为的CPU和内存数量要进行转换 + regionId, _ = tenanter.GetHuaweiRegionId(request.RegionId) + cpuPod = strconv.FormatFloat(*cpuPodFloat*1000, 'f', 0, 64) + "m" + memoryPod = strconv.FormatFloat(*memoryPodFloat, 'f', 0, 64) + "Gi" + case 3: + regionId, _ = tenanter.GetK8SRegionId(request.RegionId) + cpuPod = strconv.FormatFloat(*cpuPodFloat*1000, 'f', 0, 64) + "m" + memoryPod = strconv.FormatFloat(*memoryPodFloat, 'f', 0, 64) + "Gi" + } + + requestPCM := &pbpod.CreatePodReq{ + RequestSource: "tencent", + Provider: provider, + AccountName: tenanters[0].AccountName(), + PodName: *request.EksCiName, + RegionId: regionId, + ContainerImage: *containerImage, + ContainerName: *containerName, + CpuPod: cpuPod, + MemoryPod: memoryPod, + SecurityGroupId: "sg-6qlun7hd", + SubnetId: "subnet-mnwfg2fk", + VpcId: "vpc-rkwt40g5", + Namespace: "pcm", + } + + resp, err := server.CreatePod(nil, requestPCM) + if err != nil { + glog.Errorf("CreatePod error %+v", err) + return + } + glog.Infof("CreatePod response %+v", resp) + response = &CreateEKSContainerInstancesResponse{ + Response: (*struct { + EksCiIds []*string `json:"EksCiIds,omitempty" name:"EksCiIds"` + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + })(&struct { + EksCiIds []*string + RequestId *string + }{ + EksCiIds: []*string{&resp.PodId}, + RequestId: &resp.RequestId, + }), + BaseResponse: &tchttp.BaseResponse{}, + } + return response, nil +} + +// CreateEKSContainerInstances +// 创建容器实例 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CMDTIMEOUT = "InternalError.CmdTimeout" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) CreateEKSContainerInstancesWithContext(ctx context.Context, request *CreateEKSContainerInstancesRequest) (response *CreateEKSContainerInstancesResponse, err error) { + if request == nil { + request = NewCreateEKSContainerInstancesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("CreateEKSContainerInstances require credential") + } + + request.SetContext(ctx) + + response = NewCreateEKSContainerInstancesResponse() + err = c.Send(request, response) + return +} + +func NewCreateImageCacheRequest() (request *CreateImageCacheRequest) { + request = &CreateImageCacheRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CreateImageCache") + + return +} + +func NewCreateImageCacheResponse() (response *CreateImageCacheResponse) { + response = &CreateImageCacheResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateImageCache +// 创建镜像缓存的接口。创建过程中,请勿删除EKSCI实例和云盘,否则镜像缓存将创建失败。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) CreateImageCache(request *CreateImageCacheRequest) (response *CreateImageCacheResponse, err error) { + return c.CreateImageCacheWithContext(context.Background(), request) +} + +// CreateImageCache +// 创建镜像缓存的接口。创建过程中,请勿删除EKSCI实例和云盘,否则镜像缓存将创建失败。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) CreateImageCacheWithContext(ctx context.Context, request *CreateImageCacheRequest) (response *CreateImageCacheResponse, err error) { + if request == nil { + request = NewCreateImageCacheRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("CreateImageCache require credential") + } + + request.SetContext(ctx) + + response = NewCreateImageCacheResponse() + err = c.Send(request, response) + return +} + +func NewCreatePrometheusAlertRuleRequest() (request *CreatePrometheusAlertRuleRequest) { + request = &CreatePrometheusAlertRuleRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CreatePrometheusAlertRule") + + return +} + +func NewCreatePrometheusAlertRuleResponse() (response *CreatePrometheusAlertRuleResponse) { + response = &CreatePrometheusAlertRuleResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreatePrometheusAlertRule +// 创建告警规则 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CreatePrometheusAlertRule(request *CreatePrometheusAlertRuleRequest) (response *CreatePrometheusAlertRuleResponse, err error) { + return c.CreatePrometheusAlertRuleWithContext(context.Background(), request) +} + +// CreatePrometheusAlertRule +// 创建告警规则 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) CreatePrometheusAlertRuleWithContext(ctx context.Context, request *CreatePrometheusAlertRuleRequest) (response *CreatePrometheusAlertRuleResponse, err error) { + if request == nil { + request = NewCreatePrometheusAlertRuleRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("CreatePrometheusAlertRule require credential") + } + + request.SetContext(ctx) + + response = NewCreatePrometheusAlertRuleResponse() + err = c.Send(request, response) + return +} + +func NewCreatePrometheusDashboardRequest() (request *CreatePrometheusDashboardRequest) { + request = &CreatePrometheusDashboardRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CreatePrometheusDashboard") + + return +} + +func NewCreatePrometheusDashboardResponse() (response *CreatePrometheusDashboardResponse) { + response = &CreatePrometheusDashboardResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreatePrometheusDashboard +// 创建grafana监控面板 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" +func (c *Client) CreatePrometheusDashboard(request *CreatePrometheusDashboardRequest) (response *CreatePrometheusDashboardResponse, err error) { + return c.CreatePrometheusDashboardWithContext(context.Background(), request) +} + +// CreatePrometheusDashboard +// 创建grafana监控面板 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" +func (c *Client) CreatePrometheusDashboardWithContext(ctx context.Context, request *CreatePrometheusDashboardRequest) (response *CreatePrometheusDashboardResponse, err error) { + if request == nil { + request = NewCreatePrometheusDashboardRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("CreatePrometheusDashboard require credential") + } + + request.SetContext(ctx) + + response = NewCreatePrometheusDashboardResponse() + err = c.Send(request, response) + return +} + +func NewCreatePrometheusTemplateRequest() (request *CreatePrometheusTemplateRequest) { + request = &CreatePrometheusTemplateRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CreatePrometheusTemplate") + + return +} + +func NewCreatePrometheusTemplateResponse() (response *CreatePrometheusTemplateResponse) { + response = &CreatePrometheusTemplateResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreatePrometheusTemplate +// 创建一个云原生Prometheus模板实例 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_PARAM = "InternalError.Param" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) CreatePrometheusTemplate(request *CreatePrometheusTemplateRequest) (response *CreatePrometheusTemplateResponse, err error) { + return c.CreatePrometheusTemplateWithContext(context.Background(), request) +} + +// CreatePrometheusTemplate +// 创建一个云原生Prometheus模板实例 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_PARAM = "InternalError.Param" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) CreatePrometheusTemplateWithContext(ctx context.Context, request *CreatePrometheusTemplateRequest) (response *CreatePrometheusTemplateResponse, err error) { + if request == nil { + request = NewCreatePrometheusTemplateRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("CreatePrometheusTemplate require credential") + } + + request.SetContext(ctx) + + response = NewCreatePrometheusTemplateResponse() + err = c.Send(request, response) + return +} + +func NewDeleteClusterRequest() (request *DeleteClusterRequest) { + request = &DeleteClusterRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DeleteCluster") + + return +} + +func NewDeleteClusterResponse() (response *DeleteClusterResponse) { + response = &DeleteClusterResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteCluster +// 删除集群(YUNAPI V3版本) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// OPERATIONDENIED_CLUSTERINDELETIONPROTECTION = "OperationDenied.ClusterInDeletionProtection" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +func (c *Client) DeleteCluster(request *DeleteClusterRequest) (response *DeleteClusterResponse, err error) { + return c.DeleteClusterWithContext(context.Background(), request) +} + +// DeleteCluster +// 删除集群(YUNAPI V3版本) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// OPERATIONDENIED_CLUSTERINDELETIONPROTECTION = "OperationDenied.ClusterInDeletionProtection" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +func (c *Client) DeleteClusterWithContext(ctx context.Context, request *DeleteClusterRequest) (response *DeleteClusterResponse, err error) { + if request == nil { + request = NewDeleteClusterRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DeleteCluster require credential") + } + + request.SetContext(ctx) + + response = NewDeleteClusterResponse() + err = c.Send(request, response) + return +} + +func NewDeleteClusterAsGroupsRequest() (request *DeleteClusterAsGroupsRequest) { + request = &DeleteClusterAsGroupsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterAsGroups") + + return +} + +func NewDeleteClusterAsGroupsResponse() (response *DeleteClusterAsGroupsResponse) { + response = &DeleteClusterAsGroupsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteClusterAsGroups +// 删除集群伸缩组 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" +// INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit" +// INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit" +// INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNKNOWNPARAMETER = "UnknownParameter" +func (c *Client) DeleteClusterAsGroups(request *DeleteClusterAsGroupsRequest) (response *DeleteClusterAsGroupsResponse, err error) { + return c.DeleteClusterAsGroupsWithContext(context.Background(), request) +} + +// DeleteClusterAsGroups +// 删除集群伸缩组 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" +// INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit" +// INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit" +// INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNKNOWNPARAMETER = "UnknownParameter" +func (c *Client) DeleteClusterAsGroupsWithContext(ctx context.Context, request *DeleteClusterAsGroupsRequest) (response *DeleteClusterAsGroupsResponse, err error) { + if request == nil { + request = NewDeleteClusterAsGroupsRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DeleteClusterAsGroups require credential") + } + + request.SetContext(ctx) + + response = NewDeleteClusterAsGroupsResponse() + err = c.Send(request, response) + return +} + +func NewDeleteClusterEndpointRequest() (request *DeleteClusterEndpointRequest) { + request = &DeleteClusterEndpointRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterEndpoint") + + return +} + +func NewDeleteClusterEndpointResponse() (response *DeleteClusterEndpointResponse) { + response = &DeleteClusterEndpointResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteClusterEndpoint +// 删除集群访问端口(独立集群开启内网/外网访问,托管集群支持开启内网访问) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteClusterEndpoint(request *DeleteClusterEndpointRequest) (response *DeleteClusterEndpointResponse, err error) { + return c.DeleteClusterEndpointWithContext(context.Background(), request) +} + +// DeleteClusterEndpoint +// 删除集群访问端口(独立集群开启内网/外网访问,托管集群支持开启内网访问) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteClusterEndpointWithContext(ctx context.Context, request *DeleteClusterEndpointRequest) (response *DeleteClusterEndpointResponse, err error) { + if request == nil { + request = NewDeleteClusterEndpointRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DeleteClusterEndpoint require credential") + } + + request.SetContext(ctx) + + response = NewDeleteClusterEndpointResponse() + err = c.Send(request, response) + return +} + +func NewDeleteClusterEndpointVipRequest() (request *DeleteClusterEndpointVipRequest) { + request = &DeleteClusterEndpointVipRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterEndpointVip") + + return +} + +func NewDeleteClusterEndpointVipResponse() (response *DeleteClusterEndpointVipResponse) { + response = &DeleteClusterEndpointVipResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteClusterEndpointVip +// 删除托管集群外网访问端口(老的方式,仅支持托管集群外网端口) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount" +// INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteClusterEndpointVip(request *DeleteClusterEndpointVipRequest) (response *DeleteClusterEndpointVipResponse, err error) { + return c.DeleteClusterEndpointVipWithContext(context.Background(), request) +} + +// DeleteClusterEndpointVip +// 删除托管集群外网访问端口(老的方式,仅支持托管集群外网端口) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount" +// INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteClusterEndpointVipWithContext(ctx context.Context, request *DeleteClusterEndpointVipRequest) (response *DeleteClusterEndpointVipResponse, err error) { + if request == nil { + request = NewDeleteClusterEndpointVipRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DeleteClusterEndpointVip require credential") + } + + request.SetContext(ctx) + + response = NewDeleteClusterEndpointVipResponse() + err = c.Send(request, response) + return +} + +func NewDeleteClusterInstancesRequest() (request *DeleteClusterInstancesRequest) { + request = &DeleteClusterInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterInstances") + + return +} + +func NewDeleteClusterInstancesResponse() (response *DeleteClusterInstancesResponse) { + response = &DeleteClusterInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteClusterInstances +// 删除集群中的实例 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +func (c *Client) DeleteClusterInstances(request *DeleteClusterInstancesRequest) (response *DeleteClusterInstancesResponse, err error) { + return c.DeleteClusterInstancesWithContext(context.Background(), request) +} + +// DeleteClusterInstances +// 删除集群中的实例 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +func (c *Client) DeleteClusterInstancesWithContext(ctx context.Context, request *DeleteClusterInstancesRequest) (response *DeleteClusterInstancesResponse, err error) { + if request == nil { + request = NewDeleteClusterInstancesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DeleteClusterInstances require credential") + } + + request.SetContext(ctx) + + response = NewDeleteClusterInstancesResponse() + err = c.Send(request, response) + return +} + +func NewDeleteClusterNodePoolRequest() (request *DeleteClusterNodePoolRequest) { + request = &DeleteClusterNodePoolRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterNodePool") + + return +} + +func NewDeleteClusterNodePoolResponse() (response *DeleteClusterNodePoolResponse) { + response = &DeleteClusterNodePoolResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteClusterNodePool +// 删除节点池 +// +// 可能返回的错误码: +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) DeleteClusterNodePool(request *DeleteClusterNodePoolRequest) (response *DeleteClusterNodePoolResponse, err error) { + return c.DeleteClusterNodePoolWithContext(context.Background(), request) +} + +// DeleteClusterNodePool +// 删除节点池 +// +// 可能返回的错误码: +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) DeleteClusterNodePoolWithContext(ctx context.Context, request *DeleteClusterNodePoolRequest) (response *DeleteClusterNodePoolResponse, err error) { + if request == nil { + request = NewDeleteClusterNodePoolRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DeleteClusterNodePool require credential") + } + + request.SetContext(ctx) + + response = NewDeleteClusterNodePoolResponse() + err = c.Send(request, response) + return +} + +func NewDeleteClusterRouteRequest() (request *DeleteClusterRouteRequest) { + request = &DeleteClusterRouteRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterRoute") + + return +} + +func NewDeleteClusterRouteResponse() (response *DeleteClusterRouteResponse) { + response = &DeleteClusterRouteResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteClusterRoute +// 删除集群路由 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_ROUTETABLENOTFOUND = "InternalError.RouteTableNotFound" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) DeleteClusterRoute(request *DeleteClusterRouteRequest) (response *DeleteClusterRouteResponse, err error) { + return c.DeleteClusterRouteWithContext(context.Background(), request) +} + +// DeleteClusterRoute +// 删除集群路由 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_ROUTETABLENOTFOUND = "InternalError.RouteTableNotFound" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) DeleteClusterRouteWithContext(ctx context.Context, request *DeleteClusterRouteRequest) (response *DeleteClusterRouteResponse, err error) { + if request == nil { + request = NewDeleteClusterRouteRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DeleteClusterRoute require credential") + } + + request.SetContext(ctx) + + response = NewDeleteClusterRouteResponse() + err = c.Send(request, response) + return +} + +func NewDeleteClusterRouteTableRequest() (request *DeleteClusterRouteTableRequest) { + request = &DeleteClusterRouteTableRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterRouteTable") + + return +} + +func NewDeleteClusterRouteTableResponse() (response *DeleteClusterRouteTableResponse) { + response = &DeleteClusterRouteTableResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteClusterRouteTable +// 删除集群路由表 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_ROUTETABLENOTEMPTY = "InternalError.RouteTableNotEmpty" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty" +func (c *Client) DeleteClusterRouteTable(request *DeleteClusterRouteTableRequest) (response *DeleteClusterRouteTableResponse, err error) { + return c.DeleteClusterRouteTableWithContext(context.Background(), request) +} + +// DeleteClusterRouteTable +// 删除集群路由表 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_ROUTETABLENOTEMPTY = "InternalError.RouteTableNotEmpty" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty" +func (c *Client) DeleteClusterRouteTableWithContext(ctx context.Context, request *DeleteClusterRouteTableRequest) (response *DeleteClusterRouteTableResponse, err error) { + if request == nil { + request = NewDeleteClusterRouteTableRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DeleteClusterRouteTable require credential") + } + + request.SetContext(ctx) + + response = NewDeleteClusterRouteTableResponse() + err = c.Send(request, response) + return +} + +func NewDeleteEKSClusterRequest() (request *DeleteEKSClusterRequest) { + request = &DeleteEKSClusterRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DeleteEKSCluster") + + return +} + +func NewDeleteEKSClusterResponse() (response *DeleteEKSClusterResponse) { + response = &DeleteEKSClusterResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteEKSCluster +// 删除弹性集群(yunapiv3) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteEKSCluster(request *DeleteEKSClusterRequest) (response *DeleteEKSClusterResponse, err error) { + return c.DeleteEKSClusterWithContext(context.Background(), request) +} + +// DeleteEKSCluster +// 删除弹性集群(yunapiv3) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteEKSClusterWithContext(ctx context.Context, request *DeleteEKSClusterRequest) (response *DeleteEKSClusterResponse, err error) { + if request == nil { + request = NewDeleteEKSClusterRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DeleteEKSCluster require credential") + } + + request.SetContext(ctx) + + response = NewDeleteEKSClusterResponse() + err = c.Send(request, response) + return +} + +func NewDeleteEKSContainerInstancesRequest() (request *DeleteEKSContainerInstancesRequest) { + request = &DeleteEKSContainerInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DeleteEKSContainerInstances") + + return +} + +func NewDeleteEKSContainerInstancesResponse() (response *DeleteEKSContainerInstancesResponse) { + response = &DeleteEKSContainerInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteEKSContainerInstances +// 删除容器实例,可批量删除 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CONTAINERNOTFOUND = "InternalError.ContainerNotFound" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func DeleteEKSContainerInstances(request *DeleteEKSContainerInstancesRequest) (response *DeleteEKSContainerInstancesResponse, err error) { + provider := pbtenant.CloudProvider(request.ProviderId) + var configFile string + flag.StringVar(&configFile, "conf-tencent", "configs/config.yaml", "config.yaml") + flag.Parse() + defer glog.Flush() + + if err := tenanter.LoadCloudConfigsFromFile(configFile); err != nil { + if !errors.Is(err, tenanter.ErrLoadTenanterFileEmpty) { + glog.Fatalf("tenanter.LoadCloudConfigsFromFile error %+v", err) + } + glog.Warningf("tenanter.LoadCloudConfigsFromFile empty file path %s", configFile) + } + + glog.Infof("load tenant from file finished") + var regionId int32 + var pcmId string + podId := request.EksCiIds[0] + podName := request.ContainerGroupName + switch request.ProviderId { + case 0: + regionId, _ = tenanter.GetAliRegionId(request.RegionId) + pcmId = *podId + case 1: + regionId, _ = tenanter.GetTencentRegionId(request.RegionId) + pcmId = *podId + case 2: + regionId, _ = tenanter.GetHuaweiRegionId(request.RegionId) + pcmId = podName + case 3: + regionId, _ = tenanter.GetK8SRegionId(request.RegionId) + pcmId = podName + } + + requestPCM := &pbpod.DeletePodReq{ + RequestSource: "tencent", + Provider: provider, + AccountName: request.AccountName, + PcmId: pcmId, + PodId: *podId, + PodName: podName, + Namespace: request.Namespace, + RegionId: regionId, + } + + resp, err := server.DeletePod(nil, requestPCM) + glog.Infof("CreatePod response %+v", resp) + response = &DeleteEKSContainerInstancesResponse{ + Response: (*struct { + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + })(&struct { + RequestId *string + }{ + RequestId: &resp.RequestId, + }), + BaseResponse: &tchttp.BaseResponse{}, + } + return response, nil +} + +// DeleteEKSContainerInstances +// 删除容器实例,可批量删除 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CONTAINERNOTFOUND = "InternalError.ContainerNotFound" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteEKSContainerInstancesWithContext(ctx context.Context, request *DeleteEKSContainerInstancesRequest) (response *DeleteEKSContainerInstancesResponse, err error) { + if request == nil { + request = NewDeleteEKSContainerInstancesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DeleteEKSContainerInstances require credential") + } + + request.SetContext(ctx) + + response = NewDeleteEKSContainerInstancesResponse() + err = c.Send(request, response) + return +} + +func NewDeleteImageCachesRequest() (request *DeleteImageCachesRequest) { + request = &DeleteImageCachesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DeleteImageCaches") + + return +} + +func NewDeleteImageCachesResponse() (response *DeleteImageCachesResponse) { + response = &DeleteImageCachesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteImageCaches +// 批量删除镜像缓存 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DeleteImageCaches(request *DeleteImageCachesRequest) (response *DeleteImageCachesResponse, err error) { + return c.DeleteImageCachesWithContext(context.Background(), request) +} + +// DeleteImageCaches +// 批量删除镜像缓存 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DeleteImageCachesWithContext(ctx context.Context, request *DeleteImageCachesRequest) (response *DeleteImageCachesResponse, err error) { + if request == nil { + request = NewDeleteImageCachesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DeleteImageCaches require credential") + } + + request.SetContext(ctx) + + response = NewDeleteImageCachesResponse() + err = c.Send(request, response) + return +} + +func NewDeletePrometheusAlertRuleRequest() (request *DeletePrometheusAlertRuleRequest) { + request = &DeletePrometheusAlertRuleRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DeletePrometheusAlertRule") + + return +} + +func NewDeletePrometheusAlertRuleResponse() (response *DeletePrometheusAlertRuleResponse) { + response = &DeletePrometheusAlertRuleResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeletePrometheusAlertRule +// 删除告警规则 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_PARAM = "InternalError.Param" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" +func (c *Client) DeletePrometheusAlertRule(request *DeletePrometheusAlertRuleRequest) (response *DeletePrometheusAlertRuleResponse, err error) { + return c.DeletePrometheusAlertRuleWithContext(context.Background(), request) +} + +// DeletePrometheusAlertRule +// 删除告警规则 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_PARAM = "InternalError.Param" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" +func (c *Client) DeletePrometheusAlertRuleWithContext(ctx context.Context, request *DeletePrometheusAlertRuleRequest) (response *DeletePrometheusAlertRuleResponse, err error) { + if request == nil { + request = NewDeletePrometheusAlertRuleRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DeletePrometheusAlertRule require credential") + } + + request.SetContext(ctx) + + response = NewDeletePrometheusAlertRuleResponse() + err = c.Send(request, response) + return +} + +func NewDeletePrometheusTemplateRequest() (request *DeletePrometheusTemplateRequest) { + request = &DeletePrometheusTemplateRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DeletePrometheusTemplate") + + return +} + +func NewDeletePrometheusTemplateResponse() (response *DeletePrometheusTemplateResponse) { + response = &DeletePrometheusTemplateResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeletePrometheusTemplate +// 删除一个云原生Prometheus配置模板 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" +func (c *Client) DeletePrometheusTemplate(request *DeletePrometheusTemplateRequest) (response *DeletePrometheusTemplateResponse, err error) { + return c.DeletePrometheusTemplateWithContext(context.Background(), request) +} + +// DeletePrometheusTemplate +// 删除一个云原生Prometheus配置模板 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" +func (c *Client) DeletePrometheusTemplateWithContext(ctx context.Context, request *DeletePrometheusTemplateRequest) (response *DeletePrometheusTemplateResponse, err error) { + if request == nil { + request = NewDeletePrometheusTemplateRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DeletePrometheusTemplate require credential") + } + + request.SetContext(ctx) + + response = NewDeletePrometheusTemplateResponse() + err = c.Send(request, response) + return +} + +func NewDeletePrometheusTemplateSyncRequest() (request *DeletePrometheusTemplateSyncRequest) { + request = &DeletePrometheusTemplateSyncRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DeletePrometheusTemplateSync") + + return +} + +func NewDeletePrometheusTemplateSyncResponse() (response *DeletePrometheusTemplateSyncResponse) { + response = &DeletePrometheusTemplateSyncResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeletePrometheusTemplateSync +// 取消模板同步,这将会删除目标中该模板所生产的配置 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" +func (c *Client) DeletePrometheusTemplateSync(request *DeletePrometheusTemplateSyncRequest) (response *DeletePrometheusTemplateSyncResponse, err error) { + return c.DeletePrometheusTemplateSyncWithContext(context.Background(), request) +} + +// DeletePrometheusTemplateSync +// 取消模板同步,这将会删除目标中该模板所生产的配置 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" +func (c *Client) DeletePrometheusTemplateSyncWithContext(ctx context.Context, request *DeletePrometheusTemplateSyncRequest) (response *DeletePrometheusTemplateSyncResponse, err error) { + if request == nil { + request = NewDeletePrometheusTemplateSyncRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DeletePrometheusTemplateSync require credential") + } + + request.SetContext(ctx) + + response = NewDeletePrometheusTemplateSyncResponse() + err = c.Send(request, response) + return +} + +func NewDescribeAvailableClusterVersionRequest() (request *DescribeAvailableClusterVersionRequest) { + request = &DescribeAvailableClusterVersionRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeAvailableClusterVersion") + + return +} + +func NewDescribeAvailableClusterVersionResponse() (response *DescribeAvailableClusterVersionResponse) { + response = &DescribeAvailableClusterVersionResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeAvailableClusterVersion +// 获取集群可以升级的所有版本 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +func (c *Client) DescribeAvailableClusterVersion(request *DescribeAvailableClusterVersionRequest) (response *DescribeAvailableClusterVersionResponse, err error) { + return c.DescribeAvailableClusterVersionWithContext(context.Background(), request) +} + +// DescribeAvailableClusterVersion +// 获取集群可以升级的所有版本 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +func (c *Client) DescribeAvailableClusterVersionWithContext(ctx context.Context, request *DescribeAvailableClusterVersionRequest) (response *DescribeAvailableClusterVersionResponse, err error) { + if request == nil { + request = NewDescribeAvailableClusterVersionRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeAvailableClusterVersion require credential") + } + + request.SetContext(ctx) + + response = NewDescribeAvailableClusterVersionResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClusterAsGroupOptionRequest() (request *DescribeClusterAsGroupOptionRequest) { + request = &DescribeClusterAsGroupOptionRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterAsGroupOption") + + return +} + +func NewDescribeClusterAsGroupOptionResponse() (response *DescribeClusterAsGroupOptionResponse) { + response = &DescribeClusterAsGroupOptionResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterAsGroupOption +// 集群弹性伸缩配置 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeClusterAsGroupOption(request *DescribeClusterAsGroupOptionRequest) (response *DescribeClusterAsGroupOptionResponse, err error) { + return c.DescribeClusterAsGroupOptionWithContext(context.Background(), request) +} + +// DescribeClusterAsGroupOption +// 集群弹性伸缩配置 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeClusterAsGroupOptionWithContext(ctx context.Context, request *DescribeClusterAsGroupOptionRequest) (response *DescribeClusterAsGroupOptionResponse, err error) { + if request == nil { + request = NewDescribeClusterAsGroupOptionRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeClusterAsGroupOption require credential") + } + + request.SetContext(ctx) + + response = NewDescribeClusterAsGroupOptionResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClusterAsGroupsRequest() (request *DescribeClusterAsGroupsRequest) { + request = &DescribeClusterAsGroupsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterAsGroups") + + return +} + +func NewDescribeClusterAsGroupsResponse() (response *DescribeClusterAsGroupsResponse) { + response = &DescribeClusterAsGroupsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterAsGroups +// 集群关联的伸缩组列表 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_PODNOTFOUND = "InternalError.PodNotFound" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INTERNALERROR_VPCPEERNOTFOUND = "InternalError.VpcPeerNotFound" +// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" +func (c *Client) DescribeClusterAsGroups(request *DescribeClusterAsGroupsRequest) (response *DescribeClusterAsGroupsResponse, err error) { + return c.DescribeClusterAsGroupsWithContext(context.Background(), request) +} + +// DescribeClusterAsGroups +// 集群关联的伸缩组列表 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_PODNOTFOUND = "InternalError.PodNotFound" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INTERNALERROR_VPCPEERNOTFOUND = "InternalError.VpcPeerNotFound" +// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" +func (c *Client) DescribeClusterAsGroupsWithContext(ctx context.Context, request *DescribeClusterAsGroupsRequest) (response *DescribeClusterAsGroupsResponse, err error) { + if request == nil { + request = NewDescribeClusterAsGroupsRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeClusterAsGroups require credential") + } + + request.SetContext(ctx) + + response = NewDescribeClusterAsGroupsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClusterAuthenticationOptionsRequest() (request *DescribeClusterAuthenticationOptionsRequest) { + request = &DescribeClusterAuthenticationOptionsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterAuthenticationOptions") + + return +} + +func NewDescribeClusterAuthenticationOptionsResponse() (response *DescribeClusterAuthenticationOptionsResponse) { + response = &DescribeClusterAuthenticationOptionsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterAuthenticationOptions +// 查看集群认证配置 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +func (c *Client) DescribeClusterAuthenticationOptions(request *DescribeClusterAuthenticationOptionsRequest) (response *DescribeClusterAuthenticationOptionsResponse, err error) { + return c.DescribeClusterAuthenticationOptionsWithContext(context.Background(), request) +} + +// DescribeClusterAuthenticationOptions +// 查看集群认证配置 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +func (c *Client) DescribeClusterAuthenticationOptionsWithContext(ctx context.Context, request *DescribeClusterAuthenticationOptionsRequest) (response *DescribeClusterAuthenticationOptionsResponse, err error) { + if request == nil { + request = NewDescribeClusterAuthenticationOptionsRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeClusterAuthenticationOptions require credential") + } + + request.SetContext(ctx) + + response = NewDescribeClusterAuthenticationOptionsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClusterCommonNamesRequest() (request *DescribeClusterCommonNamesRequest) { + request = &DescribeClusterCommonNamesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterCommonNames") + + return +} + +func NewDescribeClusterCommonNamesResponse() (response *DescribeClusterCommonNamesResponse) { + response = &DescribeClusterCommonNamesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterCommonNames +// 获取指定子账户在RBAC授权模式中对应kube-apiserver客户端证书的CommonName字段,如果没有客户端证书,将会签发一个,此接口有最大传入子账户数量上限,当前为50 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" +// UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist" +func (c *Client) DescribeClusterCommonNames(request *DescribeClusterCommonNamesRequest) (response *DescribeClusterCommonNamesResponse, err error) { + return c.DescribeClusterCommonNamesWithContext(context.Background(), request) +} + +// DescribeClusterCommonNames +// 获取指定子账户在RBAC授权模式中对应kube-apiserver客户端证书的CommonName字段,如果没有客户端证书,将会签发一个,此接口有最大传入子账户数量上限,当前为50 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" +// UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist" +func (c *Client) DescribeClusterCommonNamesWithContext(ctx context.Context, request *DescribeClusterCommonNamesRequest) (response *DescribeClusterCommonNamesResponse, err error) { + if request == nil { + request = NewDescribeClusterCommonNamesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeClusterCommonNames require credential") + } + + request.SetContext(ctx) + + response = NewDescribeClusterCommonNamesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClusterControllersRequest() (request *DescribeClusterControllersRequest) { + request = &DescribeClusterControllersRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterControllers") + + return +} + +func NewDescribeClusterControllersResponse() (response *DescribeClusterControllersResponse) { + response = &DescribeClusterControllersResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterControllers +// 用于查询Kubernetes的各个原生控制器是否开启 +// +// 可能返回的错误码: +// INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) DescribeClusterControllers(request *DescribeClusterControllersRequest) (response *DescribeClusterControllersResponse, err error) { + return c.DescribeClusterControllersWithContext(context.Background(), request) +} + +// DescribeClusterControllers +// 用于查询Kubernetes的各个原生控制器是否开启 +// +// 可能返回的错误码: +// INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) DescribeClusterControllersWithContext(ctx context.Context, request *DescribeClusterControllersRequest) (response *DescribeClusterControllersResponse, err error) { + if request == nil { + request = NewDescribeClusterControllersRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeClusterControllers require credential") + } + + request.SetContext(ctx) + + response = NewDescribeClusterControllersResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClusterEndpointStatusRequest() (request *DescribeClusterEndpointStatusRequest) { + request = &DescribeClusterEndpointStatusRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterEndpointStatus") + + return +} + +func NewDescribeClusterEndpointStatusResponse() (response *DescribeClusterEndpointStatusResponse) { + response = &DescribeClusterEndpointStatusResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterEndpointStatus +// 查询集群访问端口状态(独立集群开启内网/外网访问,托管集群支持开启内网访问) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_KUBERNETESINTERNAL = "InternalError.KubernetesInternal" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeClusterEndpointStatus(request *DescribeClusterEndpointStatusRequest) (response *DescribeClusterEndpointStatusResponse, err error) { + return c.DescribeClusterEndpointStatusWithContext(context.Background(), request) +} + +// DescribeClusterEndpointStatus +// 查询集群访问端口状态(独立集群开启内网/外网访问,托管集群支持开启内网访问) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_KUBERNETESINTERNAL = "InternalError.KubernetesInternal" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeClusterEndpointStatusWithContext(ctx context.Context, request *DescribeClusterEndpointStatusRequest) (response *DescribeClusterEndpointStatusResponse, err error) { + if request == nil { + request = NewDescribeClusterEndpointStatusRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeClusterEndpointStatus require credential") + } + + request.SetContext(ctx) + + response = NewDescribeClusterEndpointStatusResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClusterEndpointVipStatusRequest() (request *DescribeClusterEndpointVipStatusRequest) { + request = &DescribeClusterEndpointVipStatusRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterEndpointVipStatus") + + return +} + +func NewDescribeClusterEndpointVipStatusResponse() (response *DescribeClusterEndpointVipStatusResponse) { + response = &DescribeClusterEndpointVipStatusResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterEndpointVipStatus +// 查询集群开启端口流程状态(仅支持托管集群外网端口) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount" +// INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota" +// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeClusterEndpointVipStatus(request *DescribeClusterEndpointVipStatusRequest) (response *DescribeClusterEndpointVipStatusResponse, err error) { + return c.DescribeClusterEndpointVipStatusWithContext(context.Background(), request) +} + +// DescribeClusterEndpointVipStatus +// 查询集群开启端口流程状态(仅支持托管集群外网端口) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount" +// INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota" +// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeClusterEndpointVipStatusWithContext(ctx context.Context, request *DescribeClusterEndpointVipStatusRequest) (response *DescribeClusterEndpointVipStatusResponse, err error) { + if request == nil { + request = NewDescribeClusterEndpointVipStatusRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeClusterEndpointVipStatus require credential") + } + + request.SetContext(ctx) + + response = NewDescribeClusterEndpointVipStatusResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClusterInstancesRequest() (request *DescribeClusterInstancesRequest) { + request = &DescribeClusterInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterInstances") + + return +} + +func NewDescribeClusterInstancesResponse() (response *DescribeClusterInstancesResponse) { + response = &DescribeClusterInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterInstances +// 查询集群下节点实例信息 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +func (c *Client) DescribeClusterInstances(request *DescribeClusterInstancesRequest) (response *DescribeClusterInstancesResponse, err error) { + return c.DescribeClusterInstancesWithContext(context.Background(), request) +} + +// DescribeClusterInstances +// 查询集群下节点实例信息 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +func (c *Client) DescribeClusterInstancesWithContext(ctx context.Context, request *DescribeClusterInstancesRequest) (response *DescribeClusterInstancesResponse, err error) { + if request == nil { + request = NewDescribeClusterInstancesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeClusterInstances require credential") + } + + request.SetContext(ctx) + + response = NewDescribeClusterInstancesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClusterKubeconfigRequest() (request *DescribeClusterKubeconfigRequest) { + request = &DescribeClusterKubeconfigRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterKubeconfig") + + return +} + +func NewDescribeClusterKubeconfigResponse() (response *DescribeClusterKubeconfigResponse) { + response = &DescribeClusterKubeconfigResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterKubeconfig +// 获取集群的kubeconfig文件,不同子账户获取自己的kubeconfig文件,该文件中有每个子账户自己的kube-apiserver的客户端证书,默认首次调此接口时候创建客户端证书,时效20年,未授予任何权限,如果是集群所有者或者主账户,则默认是cluster-admin权限。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection" +// INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError" +// INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError" +// INTERNALERROR_KUBERNETESDELETEOPERATIONERROR = "InternalError.KubernetesDeleteOperationError" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +// RESOURCENOTFOUND_KUBERNETESRESOURCENOTFOUND = "ResourceNotFound.KubernetesResourceNotFound" +// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" +func (c *Client) DescribeClusterKubeconfig(request *DescribeClusterKubeconfigRequest) (response *DescribeClusterKubeconfigResponse, err error) { + return c.DescribeClusterKubeconfigWithContext(context.Background(), request) +} + +// DescribeClusterKubeconfig +// 获取集群的kubeconfig文件,不同子账户获取自己的kubeconfig文件,该文件中有每个子账户自己的kube-apiserver的客户端证书,默认首次调此接口时候创建客户端证书,时效20年,未授予任何权限,如果是集群所有者或者主账户,则默认是cluster-admin权限。 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection" +// INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError" +// INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError" +// INTERNALERROR_KUBERNETESDELETEOPERATIONERROR = "InternalError.KubernetesDeleteOperationError" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +// RESOURCENOTFOUND_KUBERNETESRESOURCENOTFOUND = "ResourceNotFound.KubernetesResourceNotFound" +// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" +func (c *Client) DescribeClusterKubeconfigWithContext(ctx context.Context, request *DescribeClusterKubeconfigRequest) (response *DescribeClusterKubeconfigResponse, err error) { + if request == nil { + request = NewDescribeClusterKubeconfigRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeClusterKubeconfig require credential") + } + + request.SetContext(ctx) + + response = NewDescribeClusterKubeconfigResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClusterNodePoolDetailRequest() (request *DescribeClusterNodePoolDetailRequest) { + request = &DescribeClusterNodePoolDetailRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterNodePoolDetail") + + return +} + +func NewDescribeClusterNodePoolDetailResponse() (response *DescribeClusterNodePoolDetailResponse) { + response = &DescribeClusterNodePoolDetailResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterNodePoolDetail +// 查询节点池详情 +// +// 可能返回的错误码: +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +func (c *Client) DescribeClusterNodePoolDetail(request *DescribeClusterNodePoolDetailRequest) (response *DescribeClusterNodePoolDetailResponse, err error) { + return c.DescribeClusterNodePoolDetailWithContext(context.Background(), request) +} + +// DescribeClusterNodePoolDetail +// 查询节点池详情 +// +// 可能返回的错误码: +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +func (c *Client) DescribeClusterNodePoolDetailWithContext(ctx context.Context, request *DescribeClusterNodePoolDetailRequest) (response *DescribeClusterNodePoolDetailResponse, err error) { + if request == nil { + request = NewDescribeClusterNodePoolDetailRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeClusterNodePoolDetail require credential") + } + + request.SetContext(ctx) + + response = NewDescribeClusterNodePoolDetailResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClusterNodePoolsRequest() (request *DescribeClusterNodePoolsRequest) { + request = &DescribeClusterNodePoolsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterNodePools") + + return +} + +func NewDescribeClusterNodePoolsResponse() (response *DescribeClusterNodePoolsResponse) { + response = &DescribeClusterNodePoolsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterNodePools +// 查询节点池列表 +// +// 可能返回的错误码: +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +func (c *Client) DescribeClusterNodePools(request *DescribeClusterNodePoolsRequest) (response *DescribeClusterNodePoolsResponse, err error) { + return c.DescribeClusterNodePoolsWithContext(context.Background(), request) +} + +// DescribeClusterNodePools +// 查询节点池列表 +// +// 可能返回的错误码: +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +func (c *Client) DescribeClusterNodePoolsWithContext(ctx context.Context, request *DescribeClusterNodePoolsRequest) (response *DescribeClusterNodePoolsResponse, err error) { + if request == nil { + request = NewDescribeClusterNodePoolsRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeClusterNodePools require credential") + } + + request.SetContext(ctx) + + response = NewDescribeClusterNodePoolsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClusterRouteTablesRequest() (request *DescribeClusterRouteTablesRequest) { + request = &DescribeClusterRouteTablesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterRouteTables") + + return +} + +func NewDescribeClusterRouteTablesResponse() (response *DescribeClusterRouteTablesResponse) { + response = &DescribeClusterRouteTablesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterRouteTables +// 查询集群路由表 +// +// 可能返回的错误码: +// INTERNALERROR_DB = "InternalError.Db" +func (c *Client) DescribeClusterRouteTables(request *DescribeClusterRouteTablesRequest) (response *DescribeClusterRouteTablesResponse, err error) { + return c.DescribeClusterRouteTablesWithContext(context.Background(), request) +} + +// DescribeClusterRouteTables +// 查询集群路由表 +// +// 可能返回的错误码: +// INTERNALERROR_DB = "InternalError.Db" +func (c *Client) DescribeClusterRouteTablesWithContext(ctx context.Context, request *DescribeClusterRouteTablesRequest) (response *DescribeClusterRouteTablesResponse, err error) { + if request == nil { + request = NewDescribeClusterRouteTablesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeClusterRouteTables require credential") + } + + request.SetContext(ctx) + + response = NewDescribeClusterRouteTablesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClusterRoutesRequest() (request *DescribeClusterRoutesRequest) { + request = &DescribeClusterRoutesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterRoutes") + + return +} + +func NewDescribeClusterRoutesResponse() (response *DescribeClusterRoutesResponse) { + response = &DescribeClusterRoutesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterRoutes +// 查询集群路由 +// +// 可能返回的错误码: +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) DescribeClusterRoutes(request *DescribeClusterRoutesRequest) (response *DescribeClusterRoutesResponse, err error) { + return c.DescribeClusterRoutesWithContext(context.Background(), request) +} + +// DescribeClusterRoutes +// 查询集群路由 +// +// 可能返回的错误码: +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) DescribeClusterRoutesWithContext(ctx context.Context, request *DescribeClusterRoutesRequest) (response *DescribeClusterRoutesResponse, err error) { + if request == nil { + request = NewDescribeClusterRoutesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeClusterRoutes require credential") + } + + request.SetContext(ctx) + + response = NewDescribeClusterRoutesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClusterSecurityRequest() (request *DescribeClusterSecurityRequest) { + request = &DescribeClusterSecurityRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterSecurity") + + return +} + +func NewDescribeClusterSecurityResponse() (response *DescribeClusterSecurityResponse) { + response = &DescribeClusterSecurityResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterSecurity +// 集群的密钥信息 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_LBCOMMON = "InternalError.LbCommon" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_CIDRINVALID = "InvalidParameter.CidrInvalid" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +// RESOURCENOTFOUND_KUBERESOURCENOTFOUND = "ResourceNotFound.KubeResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeClusterSecurity(request *DescribeClusterSecurityRequest) (response *DescribeClusterSecurityResponse, err error) { + return c.DescribeClusterSecurityWithContext(context.Background(), request) +} + +// DescribeClusterSecurity +// 集群的密钥信息 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_LBCOMMON = "InternalError.LbCommon" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_CIDRINVALID = "InvalidParameter.CidrInvalid" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +// RESOURCENOTFOUND_KUBERESOURCENOTFOUND = "ResourceNotFound.KubeResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeClusterSecurityWithContext(ctx context.Context, request *DescribeClusterSecurityRequest) (response *DescribeClusterSecurityResponse, err error) { + if request == nil { + request = NewDescribeClusterSecurityRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeClusterSecurity require credential") + } + + request.SetContext(ctx) + + response = NewDescribeClusterSecurityResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClusterStatusRequest() (request *DescribeClusterStatusRequest) { + request = &DescribeClusterStatusRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterStatus") + + return +} + +func NewDescribeClusterStatusResponse() (response *DescribeClusterStatusResponse) { + response = &DescribeClusterStatusResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterStatus +// 查看集群状态列表 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// MISSINGPARAMETER = "MissingParameter" +// UNKNOWNPARAMETER = "UnknownParameter" +func (c *Client) DescribeClusterStatus(request *DescribeClusterStatusRequest) (response *DescribeClusterStatusResponse, err error) { + return c.DescribeClusterStatusWithContext(context.Background(), request) +} + +// DescribeClusterStatus +// 查看集群状态列表 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// MISSINGPARAMETER = "MissingParameter" +// UNKNOWNPARAMETER = "UnknownParameter" +func (c *Client) DescribeClusterStatusWithContext(ctx context.Context, request *DescribeClusterStatusRequest) (response *DescribeClusterStatusResponse, err error) { + if request == nil { + request = NewDescribeClusterStatusRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeClusterStatus require credential") + } + + request.SetContext(ctx) + + response = NewDescribeClusterStatusResponse() + err = c.Send(request, response) + return +} + +func NewDescribeClustersRequest() (request *DescribeClustersRequest) { + request = &DescribeClustersRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusters") + + return +} + +func NewDescribeClustersResponse() (response *DescribeClustersResponse) { + response = &DescribeClustersResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusters +// 查询集群列表 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" +// INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit" +// INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" +func (c *Client) DescribeClusters(request *DescribeClustersRequest) (response *DescribeClustersResponse, err error) { + return c.DescribeClustersWithContext(context.Background(), request) +} + +// DescribeClusters +// 查询集群列表 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" +// INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit" +// INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" +func (c *Client) DescribeClustersWithContext(ctx context.Context, request *DescribeClustersRequest) (response *DescribeClustersResponse, err error) { + if request == nil { + request = NewDescribeClustersRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeClusters require credential") + } + + request.SetContext(ctx) + + response = NewDescribeClustersResponse() + err = c.Send(request, response) + return +} + +func NewDescribeEKSClusterCredentialRequest() (request *DescribeEKSClusterCredentialRequest) { + request = &DescribeEKSClusterCredentialRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSClusterCredential") + + return +} + +func NewDescribeEKSClusterCredentialResponse() (response *DescribeEKSClusterCredentialResponse) { + response = &DescribeEKSClusterCredentialResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeEKSClusterCredential +// 获取弹性容器集群的接入认证信息 +// +// 可能返回的错误码: +// 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) DescribeEKSClusterCredential(request *DescribeEKSClusterCredentialRequest) (response *DescribeEKSClusterCredentialResponse, err error) { + return c.DescribeEKSClusterCredentialWithContext(context.Background(), request) +} + +// DescribeEKSClusterCredential +// 获取弹性容器集群的接入认证信息 +// +// 可能返回的错误码: +// 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) DescribeEKSClusterCredentialWithContext(ctx context.Context, request *DescribeEKSClusterCredentialRequest) (response *DescribeEKSClusterCredentialResponse, err error) { + if request == nil { + request = NewDescribeEKSClusterCredentialRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeEKSClusterCredential require credential") + } + + request.SetContext(ctx) + + response = NewDescribeEKSClusterCredentialResponse() + err = c.Send(request, response) + return +} + +func NewDescribeEKSClustersRequest() (request *DescribeEKSClustersRequest) { + request = &DescribeEKSClustersRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSClusters") + + return +} + +func NewDescribeEKSClustersResponse() (response *DescribeEKSClustersResponse) { + response = &DescribeEKSClustersResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeEKSClusters +// 查询弹性集群列表 +// +// 可能返回的错误码: +// 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) DescribeEKSClusters(request *DescribeEKSClustersRequest) (response *DescribeEKSClustersResponse, err error) { + return c.DescribeEKSClustersWithContext(context.Background(), request) +} + +// DescribeEKSClusters +// 查询弹性集群列表 +// +// 可能返回的错误码: +// 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) DescribeEKSClustersWithContext(ctx context.Context, request *DescribeEKSClustersRequest) (response *DescribeEKSClustersResponse, err error) { + if request == nil { + request = NewDescribeEKSClustersRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeEKSClusters require credential") + } + + request.SetContext(ctx) + + response = NewDescribeEKSClustersResponse() + err = c.Send(request, response) + return +} + +func NewDescribeEKSContainerInstanceEventRequest() (request *DescribeEKSContainerInstanceEventRequest) { + request = &DescribeEKSContainerInstanceEventRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSContainerInstanceEvent") + + return +} + +func NewDescribeEKSContainerInstanceEventResponse() (response *DescribeEKSContainerInstanceEventResponse) { + response = &DescribeEKSContainerInstanceEventResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeEKSContainerInstanceEvent +// 查询容器实例的事件 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCESSOLDOUT = "ResourcesSoldOut" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeEKSContainerInstanceEvent(request *DescribeEKSContainerInstanceEventRequest) (response *DescribeEKSContainerInstanceEventResponse, err error) { + return c.DescribeEKSContainerInstanceEventWithContext(context.Background(), request) +} + +// DescribeEKSContainerInstanceEvent +// 查询容器实例的事件 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCESSOLDOUT = "ResourcesSoldOut" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeEKSContainerInstanceEventWithContext(ctx context.Context, request *DescribeEKSContainerInstanceEventRequest) (response *DescribeEKSContainerInstanceEventResponse, err error) { + if request == nil { + request = NewDescribeEKSContainerInstanceEventRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeEKSContainerInstanceEvent require credential") + } + + request.SetContext(ctx) + + response = NewDescribeEKSContainerInstanceEventResponse() + err = c.Send(request, response) + return +} + +func NewDescribeEKSContainerInstanceRegionsRequest() (request *DescribeEKSContainerInstanceRegionsRequest) { + request = &DescribeEKSContainerInstanceRegionsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSContainerInstanceRegions") + + return +} + +func NewDescribeEKSContainerInstanceRegionsResponse() (response *DescribeEKSContainerInstanceRegionsResponse) { + response = &DescribeEKSContainerInstanceRegionsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeEKSContainerInstanceRegions +// 查询容器实例支持的地域 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) DescribeEKSContainerInstanceRegions(request *DescribeEKSContainerInstanceRegionsRequest) (response *DescribeEKSContainerInstanceRegionsResponse, err error) { + return c.DescribeEKSContainerInstanceRegionsWithContext(context.Background(), request) +} + +// DescribeEKSContainerInstanceRegions +// 查询容器实例支持的地域 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) DescribeEKSContainerInstanceRegionsWithContext(ctx context.Context, request *DescribeEKSContainerInstanceRegionsRequest) (response *DescribeEKSContainerInstanceRegionsResponse, err error) { + if request == nil { + request = NewDescribeEKSContainerInstanceRegionsRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeEKSContainerInstanceRegions require credential") + } + + request.SetContext(ctx) + + response = NewDescribeEKSContainerInstanceRegionsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeEKSContainerInstancesRequest() (request *DescribeEKSContainerInstancesRequest) { + request = &DescribeEKSContainerInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSContainerInstances") + + return +} + +func NewDescribeEKSContainerInstancesResponse() (response *DescribeEKSContainerInstancesResponse) { + response = &DescribeEKSContainerInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeEKSContainerInstances +// 查询容器实例 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_RBACFORBIDDEN = "FailedOperation.RBACForbidden" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +func DescribeEKSContainerInstances(request *DescribeEKSContainerInstancesRequest) (response *DescribeEKSContainerInstancesResponse, err error) { + provider := pbtenant.CloudProvider(request.ProviderId) + EksCis := make([]*EksCi, 0) + //trans Tencent request to PCM request + requestPCM := &pbpod.ListPodReq{ + RequestSource: "tencent", + Provider: provider, + Namespace: "pcm", + } + + resp, err := server.ListPod(nil, requestPCM) + if err != nil { + return nil, err + } + //trans PCM response pod set to Tencent EksCis set + for k := range resp.Pods { + EksCi := new(EksCi) + EksCi.EksCiId = &resp.Pods[k].PodId + EksCi.EksCiName = &resp.Pods[k].PodName + EksCis = append(EksCis, EksCi) + } + _totalCount := uint64(len(resp.Pods)) + _requestId := "" + response = &DescribeEKSContainerInstancesResponse{ + Response: (*struct { + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + EksCis []*EksCi `json:"EksCis,omitempty" name:"EksCis"` + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + })(&struct { + TotalCount *uint64 + EksCis []*EksCi + RequestId *string + }{ + TotalCount: &_totalCount, + EksCis: EksCis, + RequestId: &_requestId, + }), + BaseResponse: &tchttp.BaseResponse{}, + } + return response, nil +} + +// DescribeEKSContainerInstances +// 查询容器实例 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_RBACFORBIDDEN = "FailedOperation.RBACForbidden" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeEKSContainerInstancesWithContext(ctx context.Context, request *DescribeEKSContainerInstancesRequest) (response *DescribeEKSContainerInstancesResponse, err error) { + if request == nil { + request = NewDescribeEKSContainerInstancesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeEKSContainerInstances require credential") + } + + request.SetContext(ctx) + + response = NewDescribeEKSContainerInstancesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeEksContainerInstanceLogRequest() (request *DescribeEksContainerInstanceLogRequest) { + request = &DescribeEksContainerInstanceLogRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeEksContainerInstanceLog") + + return +} + +func NewDescribeEksContainerInstanceLogResponse() (response *DescribeEksContainerInstanceLogResponse) { + response = &DescribeEksContainerInstanceLogResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeEksContainerInstanceLog +// 查询容器实例中容器日志 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CONTAINERNOTFOUND = "InternalError.ContainerNotFound" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCEUNAVAILABLE_EKSCONTAINERSTATUS = "ResourceUnavailable.EksContainerStatus" +func (c *Client) DescribeEksContainerInstanceLog(request *DescribeEksContainerInstanceLogRequest) (response *DescribeEksContainerInstanceLogResponse, err error) { + return c.DescribeEksContainerInstanceLogWithContext(context.Background(), request) +} + +// DescribeEksContainerInstanceLog +// 查询容器实例中容器日志 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CONTAINERNOTFOUND = "InternalError.ContainerNotFound" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCEUNAVAILABLE_EKSCONTAINERSTATUS = "ResourceUnavailable.EksContainerStatus" +func (c *Client) DescribeEksContainerInstanceLogWithContext(ctx context.Context, request *DescribeEksContainerInstanceLogRequest) (response *DescribeEksContainerInstanceLogResponse, err error) { + if request == nil { + request = NewDescribeEksContainerInstanceLogRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeEksContainerInstanceLog require credential") + } + + request.SetContext(ctx) + + response = NewDescribeEksContainerInstanceLogResponse() + err = c.Send(request, response) + return +} + +func NewDescribeEnableVpcCniProgressRequest() (request *DescribeEnableVpcCniProgressRequest) { + request = &DescribeEnableVpcCniProgressRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeEnableVpcCniProgress") + + return +} + +func NewDescribeEnableVpcCniProgressResponse() (response *DescribeEnableVpcCniProgressResponse) { + response = &DescribeEnableVpcCniProgressResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeEnableVpcCniProgress +// 本接口用于查询开启vpc-cni模式的任务进度 +// +// 可能返回的错误码: +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +func (c *Client) DescribeEnableVpcCniProgress(request *DescribeEnableVpcCniProgressRequest) (response *DescribeEnableVpcCniProgressResponse, err error) { + return c.DescribeEnableVpcCniProgressWithContext(context.Background(), request) +} + +// DescribeEnableVpcCniProgress +// 本接口用于查询开启vpc-cni模式的任务进度 +// +// 可能返回的错误码: +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +func (c *Client) DescribeEnableVpcCniProgressWithContext(ctx context.Context, request *DescribeEnableVpcCniProgressRequest) (response *DescribeEnableVpcCniProgressResponse, err error) { + if request == nil { + request = NewDescribeEnableVpcCniProgressRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeEnableVpcCniProgress require credential") + } + + request.SetContext(ctx) + + response = NewDescribeEnableVpcCniProgressResponse() + err = c.Send(request, response) + return +} + +func NewDescribeExistedInstancesRequest() (request *DescribeExistedInstancesRequest) { + request = &DescribeExistedInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeExistedInstances") + + return +} + +func NewDescribeExistedInstancesResponse() (response *DescribeExistedInstancesResponse) { + response = &DescribeExistedInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeExistedInstances +// 查询已经存在的节点,判断是否可以加入集群 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_CREATEMASTERFAILED = "InternalError.CreateMasterFailed" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" +// INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed" +// INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr" +// INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeExistedInstances(request *DescribeExistedInstancesRequest) (response *DescribeExistedInstancesResponse, err error) { + return c.DescribeExistedInstancesWithContext(context.Background(), request) +} + +// DescribeExistedInstances +// 查询已经存在的节点,判断是否可以加入集群 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_CREATEMASTERFAILED = "InternalError.CreateMasterFailed" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" +// INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed" +// INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr" +// INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" +// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeExistedInstancesWithContext(ctx context.Context, request *DescribeExistedInstancesRequest) (response *DescribeExistedInstancesResponse, err error) { + if request == nil { + request = NewDescribeExistedInstancesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeExistedInstances require credential") + } + + request.SetContext(ctx) + + response = NewDescribeExistedInstancesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeExternalClusterSpecRequest() (request *DescribeExternalClusterSpecRequest) { + request = &DescribeExternalClusterSpecRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeExternalClusterSpec") + + return +} + +func NewDescribeExternalClusterSpecResponse() (response *DescribeExternalClusterSpecResponse) { + response = &DescribeExternalClusterSpecResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeExternalClusterSpec +// 获取导入第三方集群YAML定义 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError" +// INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError" +// INTERNALERROR_KUBERNETESDELETEOPERATIONERROR = "InternalError.KubernetesDeleteOperationError" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +// RESOURCENOTFOUND_KUBERNETESRESOURCENOTFOUND = "ResourceNotFound.KubernetesResourceNotFound" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" +func (c *Client) DescribeExternalClusterSpec(request *DescribeExternalClusterSpecRequest) (response *DescribeExternalClusterSpecResponse, err error) { + return c.DescribeExternalClusterSpecWithContext(context.Background(), request) +} + +// DescribeExternalClusterSpec +// 获取导入第三方集群YAML定义 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError" +// INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError" +// INTERNALERROR_KUBERNETESDELETEOPERATIONERROR = "InternalError.KubernetesDeleteOperationError" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +// RESOURCENOTFOUND_KUBERNETESRESOURCENOTFOUND = "ResourceNotFound.KubernetesResourceNotFound" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" +func (c *Client) DescribeExternalClusterSpecWithContext(ctx context.Context, request *DescribeExternalClusterSpecRequest) (response *DescribeExternalClusterSpecResponse, err error) { + if request == nil { + request = NewDescribeExternalClusterSpecRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeExternalClusterSpec require credential") + } + + request.SetContext(ctx) + + response = NewDescribeExternalClusterSpecResponse() + err = c.Send(request, response) + return +} + +func NewDescribeImageCachesRequest() (request *DescribeImageCachesRequest) { + request = &DescribeImageCachesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeImageCaches") + + return +} + +func NewDescribeImageCachesResponse() (response *DescribeImageCachesResponse) { + response = &DescribeImageCachesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeImageCaches +// 查询镜像缓存信息接口 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) DescribeImageCaches(request *DescribeImageCachesRequest) (response *DescribeImageCachesResponse, err error) { + return c.DescribeImageCachesWithContext(context.Background(), request) +} + +// DescribeImageCaches +// 查询镜像缓存信息接口 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) DescribeImageCachesWithContext(ctx context.Context, request *DescribeImageCachesRequest) (response *DescribeImageCachesResponse, err error) { + if request == nil { + request = NewDescribeImageCachesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeImageCaches require credential") + } + + request.SetContext(ctx) + + response = NewDescribeImageCachesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeImagesRequest() (request *DescribeImagesRequest) { + request = &DescribeImagesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeImages") + + return +} + +func NewDescribeImagesResponse() (response *DescribeImagesResponse) { + response = &DescribeImagesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeImages +// 获取镜像信息 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeImages(request *DescribeImagesRequest) (response *DescribeImagesResponse, err error) { + return c.DescribeImagesWithContext(context.Background(), request) +} + +// DescribeImages +// 获取镜像信息 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeImagesWithContext(ctx context.Context, request *DescribeImagesRequest) (response *DescribeImagesResponse, err error) { + if request == nil { + request = NewDescribeImagesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeImages require credential") + } + + request.SetContext(ctx) + + response = NewDescribeImagesResponse() + err = c.Send(request, response) + return +} + +func NewDescribePrometheusAgentInstancesRequest() (request *DescribePrometheusAgentInstancesRequest) { + request = &DescribePrometheusAgentInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusAgentInstances") + + return +} + +func NewDescribePrometheusAgentInstancesResponse() (response *DescribePrometheusAgentInstancesResponse) { + response = &DescribePrometheusAgentInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribePrometheusAgentInstances +// 获取关联目标集群的实例列表 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) DescribePrometheusAgentInstances(request *DescribePrometheusAgentInstancesRequest) (response *DescribePrometheusAgentInstancesResponse, err error) { + return c.DescribePrometheusAgentInstancesWithContext(context.Background(), request) +} + +// DescribePrometheusAgentInstances +// 获取关联目标集群的实例列表 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) DescribePrometheusAgentInstancesWithContext(ctx context.Context, request *DescribePrometheusAgentInstancesRequest) (response *DescribePrometheusAgentInstancesResponse, err error) { + if request == nil { + request = NewDescribePrometheusAgentInstancesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribePrometheusAgentInstances require credential") + } + + request.SetContext(ctx) + + response = NewDescribePrometheusAgentInstancesResponse() + err = c.Send(request, response) + return +} + +func NewDescribePrometheusAgentsRequest() (request *DescribePrometheusAgentsRequest) { + request = &DescribePrometheusAgentsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusAgents") + + return +} + +func NewDescribePrometheusAgentsResponse() (response *DescribePrometheusAgentsResponse) { + response = &DescribePrometheusAgentsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribePrometheusAgents +// 获取被关联集群列表 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) DescribePrometheusAgents(request *DescribePrometheusAgentsRequest) (response *DescribePrometheusAgentsResponse, err error) { + return c.DescribePrometheusAgentsWithContext(context.Background(), request) +} + +// DescribePrometheusAgents +// 获取被关联集群列表 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) DescribePrometheusAgentsWithContext(ctx context.Context, request *DescribePrometheusAgentsRequest) (response *DescribePrometheusAgentsResponse, err error) { + if request == nil { + request = NewDescribePrometheusAgentsRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribePrometheusAgents require credential") + } + + request.SetContext(ctx) + + response = NewDescribePrometheusAgentsResponse() + err = c.Send(request, response) + return +} + +func NewDescribePrometheusAlertHistoryRequest() (request *DescribePrometheusAlertHistoryRequest) { + request = &DescribePrometheusAlertHistoryRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusAlertHistory") + + return +} + +func NewDescribePrometheusAlertHistoryResponse() (response *DescribePrometheusAlertHistoryResponse) { + response = &DescribePrometheusAlertHistoryResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribePrometheusAlertHistory +// 获取告警历史 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// 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) DescribePrometheusAlertHistory(request *DescribePrometheusAlertHistoryRequest) (response *DescribePrometheusAlertHistoryResponse, err error) { + return c.DescribePrometheusAlertHistoryWithContext(context.Background(), request) +} + +// DescribePrometheusAlertHistory +// 获取告警历史 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// 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) DescribePrometheusAlertHistoryWithContext(ctx context.Context, request *DescribePrometheusAlertHistoryRequest) (response *DescribePrometheusAlertHistoryResponse, err error) { + if request == nil { + request = NewDescribePrometheusAlertHistoryRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribePrometheusAlertHistory require credential") + } + + request.SetContext(ctx) + + response = NewDescribePrometheusAlertHistoryResponse() + err = c.Send(request, response) + return +} + +func NewDescribePrometheusAlertRuleRequest() (request *DescribePrometheusAlertRuleRequest) { + request = &DescribePrometheusAlertRuleRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusAlertRule") + + return +} + +func NewDescribePrometheusAlertRuleResponse() (response *DescribePrometheusAlertRuleResponse) { + response = &DescribePrometheusAlertRuleResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribePrometheusAlertRule +// 获取告警规则列表 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// 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) DescribePrometheusAlertRule(request *DescribePrometheusAlertRuleRequest) (response *DescribePrometheusAlertRuleResponse, err error) { + return c.DescribePrometheusAlertRuleWithContext(context.Background(), request) +} + +// DescribePrometheusAlertRule +// 获取告警规则列表 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// 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) DescribePrometheusAlertRuleWithContext(ctx context.Context, request *DescribePrometheusAlertRuleRequest) (response *DescribePrometheusAlertRuleResponse, err error) { + if request == nil { + request = NewDescribePrometheusAlertRuleRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribePrometheusAlertRule require credential") + } + + request.SetContext(ctx) + + response = NewDescribePrometheusAlertRuleResponse() + err = c.Send(request, response) + return +} + +func NewDescribePrometheusInstanceRequest() (request *DescribePrometheusInstanceRequest) { + request = &DescribePrometheusInstanceRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusInstance") + + return +} + +func NewDescribePrometheusInstanceResponse() (response *DescribePrometheusInstanceResponse) { + response = &DescribePrometheusInstanceResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribePrometheusInstance +// 获取实例详细信息 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" +// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" +func (c *Client) DescribePrometheusInstance(request *DescribePrometheusInstanceRequest) (response *DescribePrometheusInstanceResponse, err error) { + return c.DescribePrometheusInstanceWithContext(context.Background(), request) +} + +// DescribePrometheusInstance +// 获取实例详细信息 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" +// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" +func (c *Client) DescribePrometheusInstanceWithContext(ctx context.Context, request *DescribePrometheusInstanceRequest) (response *DescribePrometheusInstanceResponse, err error) { + if request == nil { + request = NewDescribePrometheusInstanceRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribePrometheusInstance require credential") + } + + request.SetContext(ctx) + + response = NewDescribePrometheusInstanceResponse() + err = c.Send(request, response) + return +} + +func NewDescribePrometheusOverviewsRequest() (request *DescribePrometheusOverviewsRequest) { + request = &DescribePrometheusOverviewsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusOverviews") + + return +} + +func NewDescribePrometheusOverviewsResponse() (response *DescribePrometheusOverviewsResponse) { + response = &DescribePrometheusOverviewsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribePrometheusOverviews +// 获取实例列表 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +func (c *Client) DescribePrometheusOverviews(request *DescribePrometheusOverviewsRequest) (response *DescribePrometheusOverviewsResponse, err error) { + return c.DescribePrometheusOverviewsWithContext(context.Background(), request) +} + +// DescribePrometheusOverviews +// 获取实例列表 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +func (c *Client) DescribePrometheusOverviewsWithContext(ctx context.Context, request *DescribePrometheusOverviewsRequest) (response *DescribePrometheusOverviewsResponse, err error) { + if request == nil { + request = NewDescribePrometheusOverviewsRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribePrometheusOverviews require credential") + } + + request.SetContext(ctx) + + response = NewDescribePrometheusOverviewsResponse() + err = c.Send(request, response) + return +} + +func NewDescribePrometheusTargetsRequest() (request *DescribePrometheusTargetsRequest) { + request = &DescribePrometheusTargetsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusTargets") + + return +} + +func NewDescribePrometheusTargetsResponse() (response *DescribePrometheusTargetsResponse) { + response = &DescribePrometheusTargetsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribePrometheusTargets +// 获取targets信息 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" +// INVALIDPARAMETER_PROMCLUSTERNOTFOUND = "InvalidParameter.PromClusterNotFound" +// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" +func (c *Client) DescribePrometheusTargets(request *DescribePrometheusTargetsRequest) (response *DescribePrometheusTargetsResponse, err error) { + return c.DescribePrometheusTargetsWithContext(context.Background(), request) +} + +// DescribePrometheusTargets +// 获取targets信息 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" +// INVALIDPARAMETER_PROMCLUSTERNOTFOUND = "InvalidParameter.PromClusterNotFound" +// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" +func (c *Client) DescribePrometheusTargetsWithContext(ctx context.Context, request *DescribePrometheusTargetsRequest) (response *DescribePrometheusTargetsResponse, err error) { + if request == nil { + request = NewDescribePrometheusTargetsRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribePrometheusTargets require credential") + } + + request.SetContext(ctx) + + response = NewDescribePrometheusTargetsResponse() + err = c.Send(request, response) + return +} + +func NewDescribePrometheusTemplateSyncRequest() (request *DescribePrometheusTemplateSyncRequest) { + request = &DescribePrometheusTemplateSyncRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusTemplateSync") + + return +} + +func NewDescribePrometheusTemplateSyncResponse() (response *DescribePrometheusTemplateSyncResponse) { + response = &DescribePrometheusTemplateSyncResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribePrometheusTemplateSync +// 获取模板同步信息 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" +func (c *Client) DescribePrometheusTemplateSync(request *DescribePrometheusTemplateSyncRequest) (response *DescribePrometheusTemplateSyncResponse, err error) { + return c.DescribePrometheusTemplateSyncWithContext(context.Background(), request) +} + +// DescribePrometheusTemplateSync +// 获取模板同步信息 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" +func (c *Client) DescribePrometheusTemplateSyncWithContext(ctx context.Context, request *DescribePrometheusTemplateSyncRequest) (response *DescribePrometheusTemplateSyncResponse, err error) { + if request == nil { + request = NewDescribePrometheusTemplateSyncRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribePrometheusTemplateSync require credential") + } + + request.SetContext(ctx) + + response = NewDescribePrometheusTemplateSyncResponse() + err = c.Send(request, response) + return +} + +func NewDescribePrometheusTemplatesRequest() (request *DescribePrometheusTemplatesRequest) { + request = &DescribePrometheusTemplatesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusTemplates") + + return +} + +func NewDescribePrometheusTemplatesResponse() (response *DescribePrometheusTemplatesResponse) { + response = &DescribePrometheusTemplatesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribePrometheusTemplates +// 拉取模板列表,默认模板将总是在最前面 +// +// 可能返回的错误码: +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +func (c *Client) DescribePrometheusTemplates(request *DescribePrometheusTemplatesRequest) (response *DescribePrometheusTemplatesResponse, err error) { + return c.DescribePrometheusTemplatesWithContext(context.Background(), request) +} + +// DescribePrometheusTemplates +// 拉取模板列表,默认模板将总是在最前面 +// +// 可能返回的错误码: +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +func (c *Client) DescribePrometheusTemplatesWithContext(ctx context.Context, request *DescribePrometheusTemplatesRequest) (response *DescribePrometheusTemplatesResponse, err error) { + if request == nil { + request = NewDescribePrometheusTemplatesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribePrometheusTemplates require credential") + } + + request.SetContext(ctx) + + response = NewDescribePrometheusTemplatesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeRegionsRequest() (request *DescribeRegionsRequest) { + request = &DescribeRegionsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeRegions") + + return +} + +func NewDescribeRegionsResponse() (response *DescribeRegionsResponse) { + response = &DescribeRegionsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeRegions +// 获取容器服务支持的所有地域 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeRegions(request *DescribeRegionsRequest) (response *DescribeRegionsResponse, err error) { + return c.DescribeRegionsWithContext(context.Background(), request) +} + +// DescribeRegions +// 获取容器服务支持的所有地域 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeRegionsWithContext(ctx context.Context, request *DescribeRegionsRequest) (response *DescribeRegionsResponse, err error) { + if request == nil { + request = NewDescribeRegionsRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeRegions require credential") + } + + request.SetContext(ctx) + + response = NewDescribeRegionsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeRouteTableConflictsRequest() (request *DescribeRouteTableConflictsRequest) { + request = &DescribeRouteTableConflictsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeRouteTableConflicts") + + return +} + +func NewDescribeRouteTableConflictsResponse() (response *DescribeRouteTableConflictsResponse) { + response = &DescribeRouteTableConflictsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeRouteTableConflicts +// 查询路由表冲突列表 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CIDRMASKSIZEOUTOFRANGE = "InternalError.CidrMaskSizeOutOfRange" +// INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) DescribeRouteTableConflicts(request *DescribeRouteTableConflictsRequest) (response *DescribeRouteTableConflictsResponse, err error) { + return c.DescribeRouteTableConflictsWithContext(context.Background(), request) +} + +// DescribeRouteTableConflicts +// 查询路由表冲突列表 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CIDRMASKSIZEOUTOFRANGE = "InternalError.CidrMaskSizeOutOfRange" +// INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) DescribeRouteTableConflictsWithContext(ctx context.Context, request *DescribeRouteTableConflictsRequest) (response *DescribeRouteTableConflictsResponse, err error) { + if request == nil { + request = NewDescribeRouteTableConflictsRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeRouteTableConflicts require credential") + } + + request.SetContext(ctx) + + response = NewDescribeRouteTableConflictsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeTKEEdgeScriptRequest() (request *DescribeTKEEdgeScriptRequest) { + request = &DescribeTKEEdgeScriptRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeTKEEdgeScript") + + return +} + +func NewDescribeTKEEdgeScriptResponse() (response *DescribeTKEEdgeScriptResponse) { + response = &DescribeTKEEdgeScriptResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeTKEEdgeScript +// 获取边缘脚本链接 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeTKEEdgeScript(request *DescribeTKEEdgeScriptRequest) (response *DescribeTKEEdgeScriptResponse, err error) { + return c.DescribeTKEEdgeScriptWithContext(context.Background(), request) +} + +// DescribeTKEEdgeScript +// 获取边缘脚本链接 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeTKEEdgeScriptWithContext(ctx context.Context, request *DescribeTKEEdgeScriptRequest) (response *DescribeTKEEdgeScriptResponse, err error) { + if request == nil { + request = NewDescribeTKEEdgeScriptRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeTKEEdgeScript require credential") + } + + request.SetContext(ctx) + + response = NewDescribeTKEEdgeScriptResponse() + err = c.Send(request, response) + return +} + +func NewDescribeVersionsRequest() (request *DescribeVersionsRequest) { + request = &DescribeVersionsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeVersions") + + return +} + +func NewDescribeVersionsResponse() (response *DescribeVersionsResponse) { + response = &DescribeVersionsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeVersions +// 获取集群版本信息 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeVersions(request *DescribeVersionsRequest) (response *DescribeVersionsResponse, err error) { + return c.DescribeVersionsWithContext(context.Background(), request) +} + +// DescribeVersions +// 获取集群版本信息 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeVersionsWithContext(ctx context.Context, request *DescribeVersionsRequest) (response *DescribeVersionsResponse, err error) { + if request == nil { + request = NewDescribeVersionsRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeVersions require credential") + } + + request.SetContext(ctx) + + response = NewDescribeVersionsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeVpcCniPodLimitsRequest() (request *DescribeVpcCniPodLimitsRequest) { + request = &DescribeVpcCniPodLimitsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeVpcCniPodLimits") + + return +} + +func NewDescribeVpcCniPodLimitsResponse() (response *DescribeVpcCniPodLimitsResponse) { + response = &DescribeVpcCniPodLimitsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeVpcCniPodLimits +// 本接口查询当前用户和地域在指定可用区下的机型可支持的最大 TKE VPC-CNI 网络模式的 Pod 数量 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// MISSINGPARAMETER = "MissingParameter" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeVpcCniPodLimits(request *DescribeVpcCniPodLimitsRequest) (response *DescribeVpcCniPodLimitsResponse, err error) { + return c.DescribeVpcCniPodLimitsWithContext(context.Background(), request) +} + +// DescribeVpcCniPodLimits +// 本接口查询当前用户和地域在指定可用区下的机型可支持的最大 TKE VPC-CNI 网络模式的 Pod 数量 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// MISSINGPARAMETER = "MissingParameter" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeVpcCniPodLimitsWithContext(ctx context.Context, request *DescribeVpcCniPodLimitsRequest) (response *DescribeVpcCniPodLimitsResponse, err error) { + if request == nil { + request = NewDescribeVpcCniPodLimitsRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeVpcCniPodLimits require credential") + } + + request.SetContext(ctx) + + response = NewDescribeVpcCniPodLimitsResponse() + err = c.Send(request, response) + return +} + +func NewDisableClusterDeletionProtectionRequest() (request *DisableClusterDeletionProtectionRequest) { + request = &DisableClusterDeletionProtectionRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DisableClusterDeletionProtection") + + return +} + +func NewDisableClusterDeletionProtectionResponse() (response *DisableClusterDeletionProtectionResponse) { + response = &DisableClusterDeletionProtectionResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DisableClusterDeletionProtection +// 关闭集群删除保护 +// +// 可能返回的错误码: +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) DisableClusterDeletionProtection(request *DisableClusterDeletionProtectionRequest) (response *DisableClusterDeletionProtectionResponse, err error) { + return c.DisableClusterDeletionProtectionWithContext(context.Background(), request) +} + +// DisableClusterDeletionProtection +// 关闭集群删除保护 +// +// 可能返回的错误码: +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) DisableClusterDeletionProtectionWithContext(ctx context.Context, request *DisableClusterDeletionProtectionRequest) (response *DisableClusterDeletionProtectionResponse, err error) { + if request == nil { + request = NewDisableClusterDeletionProtectionRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DisableClusterDeletionProtection require credential") + } + + request.SetContext(ctx) + + response = NewDisableClusterDeletionProtectionResponse() + err = c.Send(request, response) + return +} + +func NewDisableVpcCniNetworkTypeRequest() (request *DisableVpcCniNetworkTypeRequest) { + request = &DisableVpcCniNetworkTypeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DisableVpcCniNetworkType") + + return +} + +func NewDisableVpcCniNetworkTypeResponse() (response *DisableVpcCniNetworkTypeResponse) { + response = &DisableVpcCniNetworkTypeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DisableVpcCniNetworkType +// 提供给附加了VPC-CNI能力的Global-Route集群关闭VPC-CNI +// +// 可能返回的错误码: +// INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) DisableVpcCniNetworkType(request *DisableVpcCniNetworkTypeRequest) (response *DisableVpcCniNetworkTypeResponse, err error) { + return c.DisableVpcCniNetworkTypeWithContext(context.Background(), request) +} + +// DisableVpcCniNetworkType +// 提供给附加了VPC-CNI能力的Global-Route集群关闭VPC-CNI +// +// 可能返回的错误码: +// INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate" +// INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) DisableVpcCniNetworkTypeWithContext(ctx context.Context, request *DisableVpcCniNetworkTypeRequest) (response *DisableVpcCniNetworkTypeResponse, err error) { + if request == nil { + request = NewDisableVpcCniNetworkTypeRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DisableVpcCniNetworkType require credential") + } + + request.SetContext(ctx) + + response = NewDisableVpcCniNetworkTypeResponse() + err = c.Send(request, response) + return +} + +func NewEnableClusterDeletionProtectionRequest() (request *EnableClusterDeletionProtectionRequest) { + request = &EnableClusterDeletionProtectionRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "EnableClusterDeletionProtection") + + return +} + +func NewEnableClusterDeletionProtectionResponse() (response *EnableClusterDeletionProtectionResponse) { + response = &EnableClusterDeletionProtectionResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// EnableClusterDeletionProtection +// 启用集群删除保护 +// +// 可能返回的错误码: +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) EnableClusterDeletionProtection(request *EnableClusterDeletionProtectionRequest) (response *EnableClusterDeletionProtectionResponse, err error) { + return c.EnableClusterDeletionProtectionWithContext(context.Background(), request) +} + +// EnableClusterDeletionProtection +// 启用集群删除保护 +// +// 可能返回的错误码: +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) EnableClusterDeletionProtectionWithContext(ctx context.Context, request *EnableClusterDeletionProtectionRequest) (response *EnableClusterDeletionProtectionResponse, err error) { + if request == nil { + request = NewEnableClusterDeletionProtectionRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("EnableClusterDeletionProtection require credential") + } + + request.SetContext(ctx) + + response = NewEnableClusterDeletionProtectionResponse() + err = c.Send(request, response) + return +} + +func NewEnableVpcCniNetworkTypeRequest() (request *EnableVpcCniNetworkTypeRequest) { + request = &EnableVpcCniNetworkTypeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "EnableVpcCniNetworkType") + + return +} + +func NewEnableVpcCniNetworkTypeResponse() (response *EnableVpcCniNetworkTypeResponse) { + response = &EnableVpcCniNetworkTypeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// EnableVpcCniNetworkType +// GR集群可以通过本接口附加vpc-cni容器网络插件,开启vpc-cni容器网络能力 +// +// 可能返回的错误码: +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) EnableVpcCniNetworkType(request *EnableVpcCniNetworkTypeRequest) (response *EnableVpcCniNetworkTypeResponse, err error) { + return c.EnableVpcCniNetworkTypeWithContext(context.Background(), request) +} + +// EnableVpcCniNetworkType +// GR集群可以通过本接口附加vpc-cni容器网络插件,开启vpc-cni容器网络能力 +// +// 可能返回的错误码: +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) EnableVpcCniNetworkTypeWithContext(ctx context.Context, request *EnableVpcCniNetworkTypeRequest) (response *EnableVpcCniNetworkTypeResponse, err error) { + if request == nil { + request = NewEnableVpcCniNetworkTypeRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("EnableVpcCniNetworkType require credential") + } + + request.SetContext(ctx) + + response = NewEnableVpcCniNetworkTypeResponse() + err = c.Send(request, response) + return +} + +func NewForwardApplicationRequestV3Request() (request *ForwardApplicationRequestV3Request) { + request = &ForwardApplicationRequestV3Request{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "ForwardApplicationRequestV3") + + return +} + +func NewForwardApplicationRequestV3Response() (response *ForwardApplicationRequestV3Response) { + response = &ForwardApplicationRequestV3Response{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ForwardApplicationRequestV3 +// 操作TKE集群的addon +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_RBACFORBIDDEN = "FailedOperation.RBACForbidden" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist" +func (c *Client) ForwardApplicationRequestV3(request *ForwardApplicationRequestV3Request) (response *ForwardApplicationRequestV3Response, err error) { + return c.ForwardApplicationRequestV3WithContext(context.Background(), request) +} + +// ForwardApplicationRequestV3 +// 操作TKE集群的addon +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_RBACFORBIDDEN = "FailedOperation.RBACForbidden" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist" +func (c *Client) ForwardApplicationRequestV3WithContext(ctx context.Context, request *ForwardApplicationRequestV3Request) (response *ForwardApplicationRequestV3Response, err error) { + if request == nil { + request = NewForwardApplicationRequestV3Request() + } + + if c.GetCredential() == nil { + return nil, errors.New("ForwardApplicationRequestV3 require credential") + } + + request.SetContext(ctx) + + response = NewForwardApplicationRequestV3Response() + err = c.Send(request, response) + return +} + +func NewGetMostSuitableImageCacheRequest() (request *GetMostSuitableImageCacheRequest) { + request = &GetMostSuitableImageCacheRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "GetMostSuitableImageCache") + + return +} + +func NewGetMostSuitableImageCacheResponse() (response *GetMostSuitableImageCacheResponse) { + response = &GetMostSuitableImageCacheResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// GetMostSuitableImageCache +// 根据镜像列表,查询匹配的镜像缓存 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) GetMostSuitableImageCache(request *GetMostSuitableImageCacheRequest) (response *GetMostSuitableImageCacheResponse, err error) { + return c.GetMostSuitableImageCacheWithContext(context.Background(), request) +} + +// GetMostSuitableImageCache +// 根据镜像列表,查询匹配的镜像缓存 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) GetMostSuitableImageCacheWithContext(ctx context.Context, request *GetMostSuitableImageCacheRequest) (response *GetMostSuitableImageCacheResponse, err error) { + if request == nil { + request = NewGetMostSuitableImageCacheRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("GetMostSuitableImageCache require credential") + } + + request.SetContext(ctx) + + response = NewGetMostSuitableImageCacheResponse() + err = c.Send(request, response) + return +} + +func NewGetTkeAppChartListRequest() (request *GetTkeAppChartListRequest) { + request = &GetTkeAppChartListRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "GetTkeAppChartList") + + return +} + +func NewGetTkeAppChartListResponse() (response *GetTkeAppChartListResponse) { + response = &GetTkeAppChartListResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// GetTkeAppChartList +// 获取TKE支持的App列表 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) GetTkeAppChartList(request *GetTkeAppChartListRequest) (response *GetTkeAppChartListResponse, err error) { + return c.GetTkeAppChartListWithContext(context.Background(), request) +} + +// GetTkeAppChartList +// 获取TKE支持的App列表 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) GetTkeAppChartListWithContext(ctx context.Context, request *GetTkeAppChartListRequest) (response *GetTkeAppChartListResponse, err error) { + if request == nil { + request = NewGetTkeAppChartListRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("GetTkeAppChartList require credential") + } + + request.SetContext(ctx) + + response = NewGetTkeAppChartListResponse() + err = c.Send(request, response) + return +} + +func NewGetUpgradeInstanceProgressRequest() (request *GetUpgradeInstanceProgressRequest) { + request = &GetUpgradeInstanceProgressRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "GetUpgradeInstanceProgress") + + return +} + +func NewGetUpgradeInstanceProgressResponse() (response *GetUpgradeInstanceProgressResponse) { + response = &GetUpgradeInstanceProgressResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// GetUpgradeInstanceProgress +// 获得节点升级当前的进度 +// +// 可能返回的错误码: +// INTERNALERROR_TASKNOTFOUND = "InternalError.TaskNotFound" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) GetUpgradeInstanceProgress(request *GetUpgradeInstanceProgressRequest) (response *GetUpgradeInstanceProgressResponse, err error) { + return c.GetUpgradeInstanceProgressWithContext(context.Background(), request) +} + +// GetUpgradeInstanceProgress +// 获得节点升级当前的进度 +// +// 可能返回的错误码: +// INTERNALERROR_TASKNOTFOUND = "InternalError.TaskNotFound" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) GetUpgradeInstanceProgressWithContext(ctx context.Context, request *GetUpgradeInstanceProgressRequest) (response *GetUpgradeInstanceProgressResponse, err error) { + if request == nil { + request = NewGetUpgradeInstanceProgressRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("GetUpgradeInstanceProgress require credential") + } + + request.SetContext(ctx) + + response = NewGetUpgradeInstanceProgressResponse() + err = c.Send(request, response) + return +} + +func NewModifyClusterAsGroupAttributeRequest() (request *ModifyClusterAsGroupAttributeRequest) { + request = &ModifyClusterAsGroupAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterAsGroupAttribute") + + return +} + +func NewModifyClusterAsGroupAttributeResponse() (response *ModifyClusterAsGroupAttributeResponse) { + response = &ModifyClusterAsGroupAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyClusterAsGroupAttribute +// 修改集群伸缩组属性 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError" +// INVALIDPARAMETER_CIDROUTOFROUTETABLE = "InvalidParameter.CidrOutOfRouteTable" +// INVALIDPARAMETER_GATEWAYALREADYASSOCIATEDCIDR = "InvalidParameter.GatewayAlreadyAssociatedCidr" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ModifyClusterAsGroupAttribute(request *ModifyClusterAsGroupAttributeRequest) (response *ModifyClusterAsGroupAttributeResponse, err error) { + return c.ModifyClusterAsGroupAttributeWithContext(context.Background(), request) +} + +// ModifyClusterAsGroupAttribute +// 修改集群伸缩组属性 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError" +// INVALIDPARAMETER_CIDROUTOFROUTETABLE = "InvalidParameter.CidrOutOfRouteTable" +// INVALIDPARAMETER_GATEWAYALREADYASSOCIATEDCIDR = "InvalidParameter.GatewayAlreadyAssociatedCidr" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ModifyClusterAsGroupAttributeWithContext(ctx context.Context, request *ModifyClusterAsGroupAttributeRequest) (response *ModifyClusterAsGroupAttributeResponse, err error) { + if request == nil { + request = NewModifyClusterAsGroupAttributeRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("ModifyClusterAsGroupAttribute require credential") + } + + request.SetContext(ctx) + + response = NewModifyClusterAsGroupAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyClusterAsGroupOptionAttributeRequest() (request *ModifyClusterAsGroupOptionAttributeRequest) { + request = &ModifyClusterAsGroupOptionAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterAsGroupOptionAttribute") + + return +} + +func NewModifyClusterAsGroupOptionAttributeResponse() (response *ModifyClusterAsGroupOptionAttributeResponse) { + response = &ModifyClusterAsGroupOptionAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyClusterAsGroupOptionAttribute +// 修改集群弹性伸缩属性 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ModifyClusterAsGroupOptionAttribute(request *ModifyClusterAsGroupOptionAttributeRequest) (response *ModifyClusterAsGroupOptionAttributeResponse, err error) { + return c.ModifyClusterAsGroupOptionAttributeWithContext(context.Background(), request) +} + +// ModifyClusterAsGroupOptionAttribute +// 修改集群弹性伸缩属性 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_ASCOMMON = "InternalError.AsCommon" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNAUTHORIZEDOPERATION = "UnauthorizedOperation" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ModifyClusterAsGroupOptionAttributeWithContext(ctx context.Context, request *ModifyClusterAsGroupOptionAttributeRequest) (response *ModifyClusterAsGroupOptionAttributeResponse, err error) { + if request == nil { + request = NewModifyClusterAsGroupOptionAttributeRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("ModifyClusterAsGroupOptionAttribute require credential") + } + + request.SetContext(ctx) + + response = NewModifyClusterAsGroupOptionAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyClusterAttributeRequest() (request *ModifyClusterAttributeRequest) { + request = &ModifyClusterAttributeRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterAttribute") + + return +} + +func NewModifyClusterAttributeResponse() (response *ModifyClusterAttributeResponse) { + response = &ModifyClusterAttributeResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyClusterAttribute +// 修改集群属性 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_TRADECOMMON = "InternalError.TradeCommon" +// INTERNALERROR_TRADEINSUFFICIENTBALANCE = "InternalError.TradeInsufficientBalance" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +func (c *Client) ModifyClusterAttribute(request *ModifyClusterAttributeRequest) (response *ModifyClusterAttributeResponse, err error) { + return c.ModifyClusterAttributeWithContext(context.Background(), request) +} + +// ModifyClusterAttribute +// 修改集群属性 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_TRADECOMMON = "InternalError.TradeCommon" +// INTERNALERROR_TRADEINSUFFICIENTBALANCE = "InternalError.TradeInsufficientBalance" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// MISSINGPARAMETER = "MissingParameter" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +func (c *Client) ModifyClusterAttributeWithContext(ctx context.Context, request *ModifyClusterAttributeRequest) (response *ModifyClusterAttributeResponse, err error) { + if request == nil { + request = NewModifyClusterAttributeRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("ModifyClusterAttribute require credential") + } + + request.SetContext(ctx) + + response = NewModifyClusterAttributeResponse() + err = c.Send(request, response) + return +} + +func NewModifyClusterAuthenticationOptionsRequest() (request *ModifyClusterAuthenticationOptionsRequest) { + request = &ModifyClusterAuthenticationOptionsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterAuthenticationOptions") + + return +} + +func NewModifyClusterAuthenticationOptionsResponse() (response *ModifyClusterAuthenticationOptionsResponse) { + response = &ModifyClusterAuthenticationOptionsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyClusterAuthenticationOptions +// 修改集群认证配置 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +func (c *Client) ModifyClusterAuthenticationOptions(request *ModifyClusterAuthenticationOptionsRequest) (response *ModifyClusterAuthenticationOptionsResponse, err error) { + return c.ModifyClusterAuthenticationOptionsWithContext(context.Background(), request) +} + +// ModifyClusterAuthenticationOptions +// 修改集群认证配置 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +func (c *Client) ModifyClusterAuthenticationOptionsWithContext(ctx context.Context, request *ModifyClusterAuthenticationOptionsRequest) (response *ModifyClusterAuthenticationOptionsResponse, err error) { + if request == nil { + request = NewModifyClusterAuthenticationOptionsRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("ModifyClusterAuthenticationOptions require credential") + } + + request.SetContext(ctx) + + response = NewModifyClusterAuthenticationOptionsResponse() + err = c.Send(request, response) + return +} + +func NewModifyClusterEndpointSPRequest() (request *ModifyClusterEndpointSPRequest) { + request = &ModifyClusterEndpointSPRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterEndpointSP") + + return +} + +func NewModifyClusterEndpointSPResponse() (response *ModifyClusterEndpointSPResponse) { + response = &ModifyClusterEndpointSPResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyClusterEndpointSP +// 修改托管集群外网端口的安全策略(老的方式,仅支持托管集群外网端口) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_VPCUNEXPECTEDERROR = "InternalError.VPCUnexpectedError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ModifyClusterEndpointSP(request *ModifyClusterEndpointSPRequest) (response *ModifyClusterEndpointSPResponse, err error) { + return c.ModifyClusterEndpointSPWithContext(context.Background(), request) +} + +// ModifyClusterEndpointSP +// 修改托管集群外网端口的安全策略(老的方式,仅支持托管集群外网端口) +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_VPCUNEXPECTEDERROR = "InternalError.VPCUnexpectedError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// LIMITEXCEEDED = "LimitExceeded" +// MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEINUSE = "ResourceInUse" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) ModifyClusterEndpointSPWithContext(ctx context.Context, request *ModifyClusterEndpointSPRequest) (response *ModifyClusterEndpointSPResponse, err error) { + if request == nil { + request = NewModifyClusterEndpointSPRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("ModifyClusterEndpointSP require credential") + } + + request.SetContext(ctx) + + response = NewModifyClusterEndpointSPResponse() + err = c.Send(request, response) + return +} + +func NewModifyClusterNodePoolRequest() (request *ModifyClusterNodePoolRequest) { + request = &ModifyClusterNodePoolRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterNodePool") + + return +} + +func NewModifyClusterNodePoolResponse() (response *ModifyClusterNodePoolResponse) { + response = &ModifyClusterNodePoolResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyClusterNodePool +// 编辑节点池 +// +// 可能返回的错误码: +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// OPERATIONDENIED = "OperationDenied" +// UNSUPPORTEDOPERATION_CAENABLEFAILED = "UnsupportedOperation.CaEnableFailed" +func (c *Client) ModifyClusterNodePool(request *ModifyClusterNodePoolRequest) (response *ModifyClusterNodePoolResponse, err error) { + return c.ModifyClusterNodePoolWithContext(context.Background(), request) +} + +// ModifyClusterNodePool +// 编辑节点池 +// +// 可能返回的错误码: +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// OPERATIONDENIED = "OperationDenied" +// UNSUPPORTEDOPERATION_CAENABLEFAILED = "UnsupportedOperation.CaEnableFailed" +func (c *Client) ModifyClusterNodePoolWithContext(ctx context.Context, request *ModifyClusterNodePoolRequest) (response *ModifyClusterNodePoolResponse, err error) { + if request == nil { + request = NewModifyClusterNodePoolRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("ModifyClusterNodePool require credential") + } + + request.SetContext(ctx) + + response = NewModifyClusterNodePoolResponse() + err = c.Send(request, response) + return +} + +func NewModifyNodePoolDesiredCapacityAboutAsgRequest() (request *ModifyNodePoolDesiredCapacityAboutAsgRequest) { + request = &ModifyNodePoolDesiredCapacityAboutAsgRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "ModifyNodePoolDesiredCapacityAboutAsg") + + return +} + +func NewModifyNodePoolDesiredCapacityAboutAsgResponse() (response *ModifyNodePoolDesiredCapacityAboutAsgResponse) { + response = &ModifyNodePoolDesiredCapacityAboutAsgResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyNodePoolDesiredCapacityAboutAsg +// 修改节点池关联伸缩组的期望实例数 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_ASASGNOTEXIST = "ResourceNotFound.AsAsgNotExist" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +// UNKNOWNPARAMETER = "UnknownParameter" +func (c *Client) ModifyNodePoolDesiredCapacityAboutAsg(request *ModifyNodePoolDesiredCapacityAboutAsgRequest) (response *ModifyNodePoolDesiredCapacityAboutAsgResponse, err error) { + return c.ModifyNodePoolDesiredCapacityAboutAsgWithContext(context.Background(), request) +} + +// ModifyNodePoolDesiredCapacityAboutAsg +// 修改节点池关联伸缩组的期望实例数 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_ASASGNOTEXIST = "ResourceNotFound.AsAsgNotExist" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +// UNKNOWNPARAMETER = "UnknownParameter" +func (c *Client) ModifyNodePoolDesiredCapacityAboutAsgWithContext(ctx context.Context, request *ModifyNodePoolDesiredCapacityAboutAsgRequest) (response *ModifyNodePoolDesiredCapacityAboutAsgResponse, err error) { + if request == nil { + request = NewModifyNodePoolDesiredCapacityAboutAsgRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("ModifyNodePoolDesiredCapacityAboutAsg require credential") + } + + request.SetContext(ctx) + + response = NewModifyNodePoolDesiredCapacityAboutAsgResponse() + err = c.Send(request, response) + return +} + +func NewModifyNodePoolInstanceTypesRequest() (request *ModifyNodePoolInstanceTypesRequest) { + request = &ModifyNodePoolInstanceTypesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "ModifyNodePoolInstanceTypes") + + return +} + +func NewModifyNodePoolInstanceTypesResponse() (response *ModifyNodePoolInstanceTypesResponse) { + response = &ModifyNodePoolInstanceTypesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyNodePoolInstanceTypes +// 修改节点池的机型配置 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) ModifyNodePoolInstanceTypes(request *ModifyNodePoolInstanceTypesRequest) (response *ModifyNodePoolInstanceTypesResponse, err error) { + return c.ModifyNodePoolInstanceTypesWithContext(context.Background(), request) +} + +// ModifyNodePoolInstanceTypes +// 修改节点池的机型配置 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) ModifyNodePoolInstanceTypesWithContext(ctx context.Context, request *ModifyNodePoolInstanceTypesRequest) (response *ModifyNodePoolInstanceTypesResponse, err error) { + if request == nil { + request = NewModifyNodePoolInstanceTypesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("ModifyNodePoolInstanceTypes require credential") + } + + request.SetContext(ctx) + + response = NewModifyNodePoolInstanceTypesResponse() + err = c.Send(request, response) + return +} + +func NewModifyPrometheusAlertRuleRequest() (request *ModifyPrometheusAlertRuleRequest) { + request = &ModifyPrometheusAlertRuleRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "ModifyPrometheusAlertRule") + + return +} + +func NewModifyPrometheusAlertRuleResponse() (response *ModifyPrometheusAlertRuleResponse) { + response = &ModifyPrometheusAlertRuleResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyPrometheusAlertRule +// 修改告警规则 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) ModifyPrometheusAlertRule(request *ModifyPrometheusAlertRuleRequest) (response *ModifyPrometheusAlertRuleResponse, err error) { + return c.ModifyPrometheusAlertRuleWithContext(context.Background(), request) +} + +// ModifyPrometheusAlertRule +// 修改告警规则 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) ModifyPrometheusAlertRuleWithContext(ctx context.Context, request *ModifyPrometheusAlertRuleRequest) (response *ModifyPrometheusAlertRuleResponse, err error) { + if request == nil { + request = NewModifyPrometheusAlertRuleRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("ModifyPrometheusAlertRule require credential") + } + + request.SetContext(ctx) + + response = NewModifyPrometheusAlertRuleResponse() + err = c.Send(request, response) + return +} + +func NewModifyPrometheusTemplateRequest() (request *ModifyPrometheusTemplateRequest) { + request = &ModifyPrometheusTemplateRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "ModifyPrometheusTemplate") + + return +} + +func NewModifyPrometheusTemplateResponse() (response *ModifyPrometheusTemplateResponse) { + response = &ModifyPrometheusTemplateResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyPrometheusTemplate +// 修改模板内容 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" +func (c *Client) ModifyPrometheusTemplate(request *ModifyPrometheusTemplateRequest) (response *ModifyPrometheusTemplateResponse, err error) { + return c.ModifyPrometheusTemplateWithContext(context.Background(), request) +} + +// ModifyPrometheusTemplate +// 修改模板内容 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" +func (c *Client) ModifyPrometheusTemplateWithContext(ctx context.Context, request *ModifyPrometheusTemplateRequest) (response *ModifyPrometheusTemplateResponse, err error) { + if request == nil { + request = NewModifyPrometheusTemplateRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("ModifyPrometheusTemplate require credential") + } + + request.SetContext(ctx) + + response = NewModifyPrometheusTemplateResponse() + err = c.Send(request, response) + return +} + +func NewRemoveNodeFromNodePoolRequest() (request *RemoveNodeFromNodePoolRequest) { + request = &RemoveNodeFromNodePoolRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "RemoveNodeFromNodePool") + + return +} + +func NewRemoveNodeFromNodePoolResponse() (response *RemoveNodeFromNodePoolResponse) { + response = &RemoveNodeFromNodePoolResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// RemoveNodeFromNodePool +// 移出节点池节点,但保留在集群内 +// +// 可能返回的错误码: +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) RemoveNodeFromNodePool(request *RemoveNodeFromNodePoolRequest) (response *RemoveNodeFromNodePoolResponse, err error) { + return c.RemoveNodeFromNodePoolWithContext(context.Background(), request) +} + +// RemoveNodeFromNodePool +// 移出节点池节点,但保留在集群内 +// +// 可能返回的错误码: +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) RemoveNodeFromNodePoolWithContext(ctx context.Context, request *RemoveNodeFromNodePoolRequest) (response *RemoveNodeFromNodePoolResponse, err error) { + if request == nil { + request = NewRemoveNodeFromNodePoolRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("RemoveNodeFromNodePool require credential") + } + + request.SetContext(ctx) + + response = NewRemoveNodeFromNodePoolResponse() + err = c.Send(request, response) + return +} + +func NewRestartEKSContainerInstancesRequest() (request *RestartEKSContainerInstancesRequest) { + request = &RestartEKSContainerInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "RestartEKSContainerInstances") + + return +} + +func NewRestartEKSContainerInstancesResponse() (response *RestartEKSContainerInstancesResponse) { + response = &RestartEKSContainerInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// RestartEKSContainerInstances +// 重启弹性容器实例,支持批量操作 +// +// 可能返回的错误码: +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) RestartEKSContainerInstances(request *RestartEKSContainerInstancesRequest) (response *RestartEKSContainerInstancesResponse, err error) { + return c.RestartEKSContainerInstancesWithContext(context.Background(), request) +} + +// RestartEKSContainerInstances +// 重启弹性容器实例,支持批量操作 +// +// 可能返回的错误码: +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) RestartEKSContainerInstancesWithContext(ctx context.Context, request *RestartEKSContainerInstancesRequest) (response *RestartEKSContainerInstancesResponse, err error) { + if request == nil { + request = NewRestartEKSContainerInstancesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("RestartEKSContainerInstances require credential") + } + + request.SetContext(ctx) + + response = NewRestartEKSContainerInstancesResponse() + err = c.Send(request, response) + return +} + +func NewScaleInClusterMasterRequest() (request *ScaleInClusterMasterRequest) { + request = &ScaleInClusterMasterRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "ScaleInClusterMaster") + + return +} + +func NewScaleInClusterMasterResponse() (response *ScaleInClusterMasterResponse) { + response = &ScaleInClusterMasterResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ScaleInClusterMaster +// 缩容独立集群master节点 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// OPERATIONDENIED = "OperationDenied" +func (c *Client) ScaleInClusterMaster(request *ScaleInClusterMasterRequest) (response *ScaleInClusterMasterResponse, err error) { + return c.ScaleInClusterMasterWithContext(context.Background(), request) +} + +// ScaleInClusterMaster +// 缩容独立集群master节点 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// OPERATIONDENIED = "OperationDenied" +func (c *Client) ScaleInClusterMasterWithContext(ctx context.Context, request *ScaleInClusterMasterRequest) (response *ScaleInClusterMasterResponse, err error) { + if request == nil { + request = NewScaleInClusterMasterRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("ScaleInClusterMaster require credential") + } + + request.SetContext(ctx) + + response = NewScaleInClusterMasterResponse() + err = c.Send(request, response) + return +} + +func NewScaleOutClusterMasterRequest() (request *ScaleOutClusterMasterRequest) { + request = &ScaleOutClusterMasterRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "ScaleOutClusterMaster") + + return +} + +func NewScaleOutClusterMasterResponse() (response *ScaleOutClusterMasterResponse) { + response = &ScaleOutClusterMasterResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ScaleOutClusterMaster +// 扩容独立集群master节点 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// OPERATIONDENIED = "OperationDenied" +func (c *Client) ScaleOutClusterMaster(request *ScaleOutClusterMasterRequest) (response *ScaleOutClusterMasterResponse, err error) { + return c.ScaleOutClusterMasterWithContext(context.Background(), request) +} + +// ScaleOutClusterMaster +// 扩容独立集群master节点 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// OPERATIONDENIED = "OperationDenied" +func (c *Client) ScaleOutClusterMasterWithContext(ctx context.Context, request *ScaleOutClusterMasterRequest) (response *ScaleOutClusterMasterResponse, err error) { + if request == nil { + request = NewScaleOutClusterMasterRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("ScaleOutClusterMaster require credential") + } + + request.SetContext(ctx) + + response = NewScaleOutClusterMasterResponse() + err = c.Send(request, response) + return +} + +func NewSetNodePoolNodeProtectionRequest() (request *SetNodePoolNodeProtectionRequest) { + request = &SetNodePoolNodeProtectionRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "SetNodePoolNodeProtection") + + return +} + +func NewSetNodePoolNodeProtectionResponse() (response *SetNodePoolNodeProtectionResponse) { + response = &SetNodePoolNodeProtectionResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// SetNodePoolNodeProtection +// 仅能设置节点池中处于伸缩组的节点 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) SetNodePoolNodeProtection(request *SetNodePoolNodeProtectionRequest) (response *SetNodePoolNodeProtectionResponse, err error) { + return c.SetNodePoolNodeProtectionWithContext(context.Background(), request) +} + +// SetNodePoolNodeProtection +// 仅能设置节点池中处于伸缩组的节点 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +func (c *Client) SetNodePoolNodeProtectionWithContext(ctx context.Context, request *SetNodePoolNodeProtectionRequest) (response *SetNodePoolNodeProtectionResponse, err error) { + if request == nil { + request = NewSetNodePoolNodeProtectionRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("SetNodePoolNodeProtection require credential") + } + + request.SetContext(ctx) + + response = NewSetNodePoolNodeProtectionResponse() + err = c.Send(request, response) + return +} + +func NewSyncPrometheusTemplateRequest() (request *SyncPrometheusTemplateRequest) { + request = &SyncPrometheusTemplateRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "SyncPrometheusTemplate") + + return +} + +func NewSyncPrometheusTemplateResponse() (response *SyncPrometheusTemplateResponse) { + response = &SyncPrometheusTemplateResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// SyncPrometheusTemplate +// 同步模板到实例或者集群 +// +// 可能返回的错误码: +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_PROMCLUSTERNOTFOUND = "InvalidParameter.PromClusterNotFound" +// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" +// INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" +func (c *Client) SyncPrometheusTemplate(request *SyncPrometheusTemplateRequest) (response *SyncPrometheusTemplateResponse, err error) { + return c.SyncPrometheusTemplateWithContext(context.Background(), request) +} + +// SyncPrometheusTemplate +// 同步模板到实例或者集群 +// +// 可能返回的错误码: +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_PROMCLUSTERNOTFOUND = "InvalidParameter.PromClusterNotFound" +// INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" +// INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" +func (c *Client) SyncPrometheusTemplateWithContext(ctx context.Context, request *SyncPrometheusTemplateRequest) (response *SyncPrometheusTemplateResponse, err error) { + if request == nil { + request = NewSyncPrometheusTemplateRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("SyncPrometheusTemplate require credential") + } + + request.SetContext(ctx) + + response = NewSyncPrometheusTemplateResponse() + err = c.Send(request, response) + return +} + +func NewUpdateClusterVersionRequest() (request *UpdateClusterVersionRequest) { + request = &UpdateClusterVersionRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "UpdateClusterVersion") + + return +} + +func NewUpdateClusterVersionResponse() (response *UpdateClusterVersionResponse) { + response = &UpdateClusterVersionResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// UpdateClusterVersion +// 升级集群 Master 组件到指定版本 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CLUSTERUPGRADENODEVERSION = "InternalError.ClusterUpgradeNodeVersion" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +func (c *Client) UpdateClusterVersion(request *UpdateClusterVersionRequest) (response *UpdateClusterVersionResponse, err error) { + return c.UpdateClusterVersionWithContext(context.Background(), request) +} + +// UpdateClusterVersion +// 升级集群 Master 组件到指定版本 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CLUSTERUPGRADENODEVERSION = "InternalError.ClusterUpgradeNodeVersion" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +func (c *Client) UpdateClusterVersionWithContext(ctx context.Context, request *UpdateClusterVersionRequest) (response *UpdateClusterVersionResponse, err error) { + if request == nil { + request = NewUpdateClusterVersionRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("UpdateClusterVersion require credential") + } + + request.SetContext(ctx) + + response = NewUpdateClusterVersionResponse() + err = c.Send(request, response) + return +} + +func NewUpdateEKSClusterRequest() (request *UpdateEKSClusterRequest) { + request = &UpdateEKSClusterRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "UpdateEKSCluster") + + return +} + +func NewUpdateEKSClusterResponse() (response *UpdateEKSClusterResponse) { + response = &UpdateEKSClusterResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// UpdateEKSCluster +// 修改弹性集群名称等属性 +// +// 可能返回的错误码: +// 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) UpdateEKSCluster(request *UpdateEKSClusterRequest) (response *UpdateEKSClusterResponse, err error) { + return c.UpdateEKSClusterWithContext(context.Background(), request) +} + +// UpdateEKSCluster +// 修改弹性集群名称等属性 +// +// 可能返回的错误码: +// 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) UpdateEKSClusterWithContext(ctx context.Context, request *UpdateEKSClusterRequest) (response *UpdateEKSClusterResponse, err error) { + if request == nil { + request = NewUpdateEKSClusterRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("UpdateEKSCluster require credential") + } + + request.SetContext(ctx) + + response = NewUpdateEKSClusterResponse() + err = c.Send(request, response) + return +} + +func NewUpdateEKSContainerInstanceRequest() (request *UpdateEKSContainerInstanceRequest) { + request = &UpdateEKSContainerInstanceRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "UpdateEKSContainerInstance") + + return +} + +func NewUpdateEKSContainerInstanceResponse() (response *UpdateEKSContainerInstanceResponse) { + response = &UpdateEKSContainerInstanceResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// UpdateEKSContainerInstance +// 更新容器实例 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func UpdateEKSContainerInstance(request *UpdateEKSContainerInstanceRequest) (response *UpdateEKSContainerInstanceResponse, err error) { + provider := pbtenant.CloudProvider(request.ProviderId) + var configFile string + flag.StringVar(&configFile, "conf-tencent", "configs/config.yaml", "config.yaml") + flag.Parse() + defer glog.Flush() + + if err := tenanter.LoadCloudConfigsFromFile(configFile); err != nil { + if !errors.Is(err, tenanter.ErrLoadTenanterFileEmpty) { + glog.Fatalf("tenanter.LoadCloudConfigsFromFile error %+v", err) + } + glog.Warningf("tenanter.LoadCloudConfigsFromFile empty file path %s", configFile) + } + + glog.Infof("load tenant from file finished") + var regionId int32 + switch request.ProviderId { + case 0: + regionId, _ = tenanter.GetAliRegionId(request.RegionId) + case 1: + regionId, _ = tenanter.GetTencentRegionId(request.RegionId) + case 2: + regionId, _ = tenanter.GetHuaweiRegionId(request.RegionId) + case 3: + regionId, _ = tenanter.GetK8SRegionId(request.RegionId) + } + containers := request.Containers + requestPCM := &pbpod.UpdatePodReq{ + RequestSource: "tencent", + Provider: provider, + AccountName: request.AccountName, + PcmId: *request.EksCiId, + PodId: *request.EksCiId, + PodName: *request.Name, + Namespace: request.Namespace, + RegionId: regionId, + ContainerImage: *containers[0].Image, + ContainerName: *containers[0].Name, + CpuPod: strconv.FormatFloat(*containers[0].Cpu, 'E', -1, 64), + MemoryPod: strconv.FormatFloat(*containers[0].Memory, 'E', -1, 64), + RestartPolicy: *request.RestartPolicy, + Labels: "", + } + + resp, err := server.UpdatePod(nil, requestPCM) + if err != nil { + glog.Errorf("CreatePod error %+v", err) + return + } + glog.Infof("CreatePod response %+v", resp) + response = &UpdateEKSContainerInstanceResponse{ + Response: (*struct { + EksCiId *string `json:"EksCiId,omitempty" name:"EksCiId"` + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + })(&struct { + EksCiId *string + RequestId *string + }{ + EksCiId: &resp.PodId, + RequestId: &resp.RequestId, + }), + BaseResponse: &tchttp.BaseResponse{}, + } + return response, nil +} + +// UpdateEKSContainerInstance +// 更新容器实例 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) UpdateEKSContainerInstanceWithContext(ctx context.Context, request *UpdateEKSContainerInstanceRequest) (response *UpdateEKSContainerInstanceResponse, err error) { + if request == nil { + request = NewUpdateEKSContainerInstanceRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("UpdateEKSContainerInstance require credential") + } + + request.SetContext(ctx) + + response = NewUpdateEKSContainerInstanceResponse() + err = c.Send(request, response) + return +} + +func NewUpdateImageCacheRequest() (request *UpdateImageCacheRequest) { + request = &UpdateImageCacheRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "UpdateImageCache") + + return +} + +func NewUpdateImageCacheResponse() (response *UpdateImageCacheResponse) { + response = &UpdateImageCacheResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// UpdateImageCache +// 更新镜像缓存接口 +// +// 可能返回的错误码: +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) UpdateImageCache(request *UpdateImageCacheRequest) (response *UpdateImageCacheResponse, err error) { + return c.UpdateImageCacheWithContext(context.Background(), request) +} + +// UpdateImageCache +// 更新镜像缓存接口 +// +// 可能返回的错误码: +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) UpdateImageCacheWithContext(ctx context.Context, request *UpdateImageCacheRequest) (response *UpdateImageCacheResponse, err error) { + if request == nil { + request = NewUpdateImageCacheRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("UpdateImageCache require credential") + } + + request.SetContext(ctx) + + response = NewUpdateImageCacheResponse() + err = c.Send(request, response) + return +} + +func NewUpgradeClusterInstancesRequest() (request *UpgradeClusterInstancesRequest) { + request = &UpgradeClusterInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "UpgradeClusterInstances") + + return +} + +func NewUpgradeClusterInstancesResponse() (response *UpgradeClusterInstancesResponse) { + response = &UpgradeClusterInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// UpgradeClusterInstances +// 给集群的一批work节点进行升级 +// +// 可能返回的错误码: +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_TASKALREADYRUNNING = "InternalError.TaskAlreadyRunning" +// INTERNALERROR_TASKLIFESTATEERROR = "InternalError.TaskLifeStateError" +// INTERNALERROR_TASKNOTFOUND = "InternalError.TaskNotFound" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +func (c *Client) UpgradeClusterInstances(request *UpgradeClusterInstancesRequest) (response *UpgradeClusterInstancesResponse, err error) { + return c.UpgradeClusterInstancesWithContext(context.Background(), request) +} + +// UpgradeClusterInstances +// 给集群的一批work节点进行升级 +// +// 可能返回的错误码: +// INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_TASKALREADYRUNNING = "InternalError.TaskAlreadyRunning" +// INTERNALERROR_TASKLIFESTATEERROR = "InternalError.TaskLifeStateError" +// INTERNALERROR_TASKNOTFOUND = "InternalError.TaskNotFound" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +func (c *Client) UpgradeClusterInstancesWithContext(ctx context.Context, request *UpgradeClusterInstancesRequest) (response *UpgradeClusterInstancesResponse, err error) { + if request == nil { + request = NewUpgradeClusterInstancesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("UpgradeClusterInstances require credential") + } + + request.SetContext(ctx) + + response = NewUpgradeClusterInstancesResponse() + err = c.Send(request, response) + return +} diff --git a/adaptor/pod/server/tencent/errors.go b/adaptor/pod/server/tencent/errors.go new file mode 100644 index 00000000..919bc6c9 --- /dev/null +++ b/adaptor/pod/server/tencent/errors.go @@ -0,0 +1,343 @@ +// Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v20180525 + +const ( + // 此产品的特有错误码 + + // 操作失败。 + FAILEDOPERATION = "FailedOperation" + + // 子账户RBAC权限不足。 + FAILEDOPERATION_RBACFORBIDDEN = "FailedOperation.RBACForbidden" + + // 内部错误。 + INTERNALERROR = "InternalError" + + // 获取用户认证信息失败。 + INTERNALERROR_ACCOUNTCOMMON = "InternalError.AccountCommon" + + // 账户未通过认证。 + INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" + + // 伸缩组资源创建报错。 + INTERNALERROR_ASCOMMON = "InternalError.AsCommon" + + // 没有权限。 + INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" + + // CIDR和其他集群CIDR冲突。 + INTERNALERROR_CIDRCONFLICTWITHOTHERCLUSTER = "InternalError.CidrConflictWithOtherCluster" + + // CIDR和其他路由冲突。 + INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute" + + // CIDR和vpc冲突。 + INTERNALERROR_CIDRCONFLICTWITHVPCCIDR = "InternalError.CidrConflictWithVpcCidr" + + // CIDR和全局路由冲突。 + INTERNALERROR_CIDRCONFLICTWITHVPCGLOBALROUTE = "InternalError.CidrConflictWithVpcGlobalRoute" + + // CIDR无效。 + INTERNALERROR_CIDRINVALI = "InternalError.CidrInvali" + + // CIDR掩码无效。 + INTERNALERROR_CIDRMASKSIZEOUTOFRANGE = "InternalError.CidrMaskSizeOutOfRange" + + // CIDR不在路由表之内。 + INTERNALERROR_CIDROUTOFROUTETABLE = "InternalError.CidrOutOfRouteTable" + + // 集群未找到。 + INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound" + + // 集群状态错误。 + INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState" + + // 集群节点版本过低。 + INTERNALERROR_CLUSTERUPGRADENODEVERSION = "InternalError.ClusterUpgradeNodeVersion" + + // 执行命令超时。 + INTERNALERROR_CMDTIMEOUT = "InternalError.CmdTimeout" + + // 内部HTTP客户端错误。 + INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp" + + // 请求(http请求)其他云服务失败。 + INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" + + // 容器未找到。 + INTERNALERROR_CONTAINERNOTFOUND = "InternalError.ContainerNotFound" + + // 创建集群失败。 + INTERNALERROR_CREATEMASTERFAILED = "InternalError.CreateMasterFailed" + + // cvm创建节点报错。 + INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" + + // cvm不存在。 + INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound" + + // 存在云服务器在CVM侧查询不到。 + INTERNALERROR_CVMNUMBERNOTMATCH = "InternalError.CvmNumberNotMatch" + + // cvm状态不正常。 + INTERNALERROR_CVMSTATUS = "InternalError.CvmStatus" + + // db错误。 + INTERNALERROR_DB = "InternalError.Db" + + // DB错误。 + INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows" + + // 记录未找到。 + INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" + + // 获得当前安全组总数失败。 + INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount" + + // 获得安全组配额失败。 + INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota" + + // 不支持空集群。 + INTERNALERROR_EMPTYCLUSTERNOTSUPPORT = "InternalError.EmptyClusterNotSupport" + + // 下一跳地址已关联CIDR。 + INTERNALERROR_GATEWAYALREADYASSOCIATEDCIDR = "InternalError.GatewayAlreadyAssociatedCidr" + + // 镜像未找到。 + INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" + + // 初始化master失败。 + INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed" + + // 无效CIDR。 + INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr" + + // 连接用户Kubernetes集群失败。 + INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection" + + // 创建集群Client出错。 + INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate" + + // KubernetesAPI错误。 + INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon" + + // kubernetes client建立失败。 + INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError" + + // 创建Kubernetes资源失败。 + INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError" + + // 删除Kubernetes资源失败。 + INTERNALERROR_KUBERNETESDELETEOPERATIONERROR = "InternalError.KubernetesDeleteOperationError" + + // 获取Kubernetes资源失败。 + INTERNALERROR_KUBERNETESGETOPERATIONERROR = "InternalError.KubernetesGetOperationError" + + // Kubernetes未知错误。 + INTERNALERROR_KUBERNETESINTERNAL = "InternalError.KubernetesInternal" + + // 底层调用CLB未知错误。 + INTERNALERROR_LBCOMMON = "InternalError.LbCommon" + + // 镜像OS不支持。 + INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport" + + // Param。 + INTERNALERROR_PARAM = "InternalError.Param" + + // Pod未找到。 + INTERNALERROR_PODNOTFOUND = "InternalError.PodNotFound" + + // 集群不支持当前操作。 + INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport" + + // 超过配额限制。 + INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit" + + // 超过配额限制。 + INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit" + + // 超过配额限制。 + INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit" + + // 安全组配额不足。 + INTERNALERROR_QUOTAUSGLIMIT = "InternalError.QuotaUSGLimit" + + // 资源已存在。 + INTERNALERROR_RESOURCEEXISTALREADY = "InternalError.ResourceExistAlready" + + // 路由表非空。 + INTERNALERROR_ROUTETABLENOTEMPTY = "InternalError.RouteTableNotEmpty" + + // 路由表不存在。 + INTERNALERROR_ROUTETABLENOTFOUND = "InternalError.RouteTableNotFound" + + // 已有相同任务执行中。 + INTERNALERROR_TASKALREADYRUNNING = "InternalError.TaskAlreadyRunning" + + // 创建任务失败。 + INTERNALERROR_TASKCREATEFAILED = "InternalError.TaskCreateFailed" + + // 任务当前所处状态不支持此操作。 + INTERNALERROR_TASKLIFESTATEERROR = "InternalError.TaskLifeStateError" + + // 任务未找到。 + INTERNALERROR_TASKNOTFOUND = "InternalError.TaskNotFound" + + // 询价错误。 + INTERNALERROR_TRADECOMMON = "InternalError.TradeCommon" + + // 账户余额不足。 + INTERNALERROR_TRADEINSUFFICIENTBALANCE = "InternalError.TradeInsufficientBalance" + + // 内部错误。 + INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" + + // 未知的内部错误。 + INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" + + // VPC未知错误。 + INTERNALERROR_VPCUNEXPECTEDERROR = "InternalError.VPCUnexpectedError" + + // VPC报错。 + INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon" + + // 对等连接不存在。 + INTERNALERROR_VPCPEERNOTFOUND = "InternalError.VpcPeerNotFound" + + // 未发现vpc记录。 + INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound" + + // 白名单未知错误。 + INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError" + + // 参数错误。 + INVALIDPARAMETER = "InvalidParameter" + + // 弹性伸缩组创建参数错误。 + INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError" + + // CIDR掩码超出范围(集群CIDR范围 最小值: 10 最大值: 24)。 + INVALIDPARAMETER_CIDRMASKSIZEOUTOFRANGE = "InvalidParameter.CIDRMaskSizeOutOfRange" + + // CIDR和其他集群CIDR冲突。 + INVALIDPARAMETER_CIDRCONFLICTWITHOTHERCLUSTER = "InvalidParameter.CidrConflictWithOtherCluster" + + // 创建的路由与已存在的其他路由产生冲突。 + INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute" + + // CIDR和vpc的CIDR冲突。 + INVALIDPARAMETER_CIDRCONFLICTWITHVPCCIDR = "InvalidParameter.CidrConflictWithVpcCidr" + + // 创建的路由与VPC下已存在的全局路由产生冲突。 + INVALIDPARAMETER_CIDRCONFLICTWITHVPCGLOBALROUTE = "InvalidParameter.CidrConflictWithVpcGlobalRoute" + + // 参数错误,CIDR不符合规范。 + INVALIDPARAMETER_CIDRINVALID = "InvalidParameter.CidrInvalid" + + // CIDR不在路由表之内。 + INVALIDPARAMETER_CIDROUTOFROUTETABLE = "InvalidParameter.CidrOutOfRouteTable" + + // 集群ID不存在。 + INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" + + // 下一跳地址已关联CIDR。 + INVALIDPARAMETER_GATEWAYALREADYASSOCIATEDCIDR = "InvalidParameter.GatewayAlreadyAssociatedCidr" + + // 无效的私有CIDR网段。 + INVALIDPARAMETER_INVALIDPRIVATENETWORKCIDR = "InvalidParameter.InvalidPrivateNetworkCIDR" + + // 参数错误。 + INVALIDPARAMETER_PARAM = "InvalidParameter.Param" + + // Prometheus未关联本集群。 + INVALIDPARAMETER_PROMCLUSTERNOTFOUND = "InvalidParameter.PromClusterNotFound" + + // Prometheus实例不存在。 + INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" + + // 资源未找到。 + INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" + + // 路由表非空。 + INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty" + + // 超过配额限制。 + LIMITEXCEEDED = "LimitExceeded" + + // 缺少参数错误。 + MISSINGPARAMETER = "MissingParameter" + + // 操作被拒绝。 + OPERATIONDENIED = "OperationDenied" + + // 集群处于删除保护中,禁止删除。 + OPERATIONDENIED_CLUSTERINDELETIONPROTECTION = "OperationDenied.ClusterInDeletionProtection" + + // 资源被占用。 + RESOURCEINUSE = "ResourceInUse" + + // 资源不足。 + RESOURCEINSUFFICIENT = "ResourceInsufficient" + + // 资源不存在。 + RESOURCENOTFOUND = "ResourceNotFound" + + // 伸缩组不存在。 + RESOURCENOTFOUND_ASASGNOTEXIST = "ResourceNotFound.AsAsgNotExist" + + // 集群不存在。 + RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" + + // 用户Kubernetes集群中未找到指定资源。 + RESOURCENOTFOUND_KUBERESOURCENOTFOUND = "ResourceNotFound.KubeResourceNotFound" + + // 未找到该kubernetes资源。 + RESOURCENOTFOUND_KUBERNETESRESOURCENOTFOUND = "ResourceNotFound.KubernetesResourceNotFound" + + // 找不到对应路由表。 + RESOURCENOTFOUND_ROUTETABLENOTFOUND = "ResourceNotFound.RouteTableNotFound" + + // 资源不可用。 + RESOURCEUNAVAILABLE = "ResourceUnavailable" + + // 集群状态不支持该操作。 + RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" + + // Eks Container Instance状态不支持改操作。 + RESOURCEUNAVAILABLE_EKSCONTAINERSTATUS = "ResourceUnavailable.EksContainerStatus" + + // 资源售罄。 + RESOURCESSOLDOUT = "ResourcesSoldOut" + + // 未授权操作。 + UNAUTHORIZEDOPERATION = "UnauthorizedOperation" + + // 无该接口CAM权限。 + UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" + + // 未知参数错误。 + UNKNOWNPARAMETER = "UnknownParameter" + + // 操作不支持。 + UNSUPPORTEDOPERATION = "UnsupportedOperation" + + // AS伸缩关闭导致无法开启CA。 + UNSUPPORTEDOPERATION_CAENABLEFAILED = "UnsupportedOperation.CaEnableFailed" + + // 非白名单用户。 + UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist" +) diff --git a/adaptor/pod/server/tencent/models.go b/adaptor/pod/server/tencent/models.go new file mode 100644 index 00000000..637f5462 --- /dev/null +++ b/adaptor/pod/server/tencent/models.go @@ -0,0 +1,8695 @@ +// Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v20180525 + +import ( + "encoding/json" + tcerr "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" + tchttp "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" +) + +type AcquireClusterAdminRoleRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *AcquireClusterAdminRoleRequest) 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 *AcquireClusterAdminRoleRequest) 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", "AcquireClusterAdminRoleRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AcquireClusterAdminRoleResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AcquireClusterAdminRoleResponse) 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 *AcquireClusterAdminRoleResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AddClusterCIDRRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 增加的ClusterCIDR + ClusterCIDRs []*string `json:"ClusterCIDRs,omitempty" name:"ClusterCIDRs"` + + // 是否忽略ClusterCIDR与VPC路由表的冲突 + IgnoreClusterCIDRConflict *bool `json:"IgnoreClusterCIDRConflict,omitempty" name:"IgnoreClusterCIDRConflict"` +} + +func (r *AddClusterCIDRRequest) 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 *AddClusterCIDRRequest) 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, "ClusterCIDRs") + delete(f, "IgnoreClusterCIDRConflict") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AddClusterCIDRRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AddClusterCIDRResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AddClusterCIDRResponse) 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 *AddClusterCIDRResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AddExistedInstancesRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 实例列表,不支持竞价实例 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 实例额外需要设置参数信息(默认值) + InstanceAdvancedSettings *InstanceAdvancedSettings `json:"InstanceAdvancedSettings,omitempty" name:"InstanceAdvancedSettings"` + + // 增强服务。通过该参数可以指定是否开启云安全、云监控等服务。若不指定该参数,则默认开启云监控、云安全服务。 + EnhancedService *EnhancedService `json:"EnhancedService,omitempty" name:"EnhancedService"` + + // 节点登录信息(目前仅支持使用Password或者单个KeyIds) + LoginSettings *LoginSettings `json:"LoginSettings,omitempty" name:"LoginSettings"` + + // 重装系统时,可以指定修改实例的HostName(集群为HostName模式时,此参数必传,规则名称除不支持大写字符外与[CVM创建实例](https://cloud.tencent.com/document/product/213/15730)接口HostName一致) + HostName *string `json:"HostName,omitempty" name:"HostName"` + + // 实例所属安全组。该参数可以通过调用 DescribeSecurityGroups 的返回值中的sgId字段来获取。若不指定该参数,则绑定默认安全组。(目前仅支持设置单个sgId) + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` + + // 节点池选项 + NodePool *NodePoolOption `json:"NodePool,omitempty" name:"NodePool"` + + // 校验规则相关选项,可配置跳过某些校验规则。目前支持GlobalRouteCIDRCheck(跳过GlobalRouter的相关校验),VpcCniCIDRCheck(跳过VpcCni相关校验) + SkipValidateOptions []*string `json:"SkipValidateOptions,omitempty" name:"SkipValidateOptions"` + + // 参数InstanceAdvancedSettingsOverride数组用于定制化地配置各台instance,与InstanceIds顺序对应。当传入InstanceAdvancedSettingsOverrides数组时,将覆盖默认参数InstanceAdvancedSettings;当没有传入参数InstanceAdvancedSettingsOverrides时,InstanceAdvancedSettings参数对每台instance生效。 + // + // 参数InstanceAdvancedSettingsOverride数组的长度应与InstanceIds数组一致;当长度大于InstanceIds数组长度时将报错;当长度小于InstanceIds数组时,没有对应配置的instace将使用默认配置。 + InstanceAdvancedSettingsOverrides []*InstanceAdvancedSettings `json:"InstanceAdvancedSettingsOverrides,omitempty" name:"InstanceAdvancedSettingsOverrides"` +} + +func (r *AddExistedInstancesRequest) 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 *AddExistedInstancesRequest) 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, "InstanceIds") + delete(f, "InstanceAdvancedSettings") + delete(f, "EnhancedService") + delete(f, "LoginSettings") + delete(f, "HostName") + delete(f, "SecurityGroupIds") + delete(f, "NodePool") + delete(f, "SkipValidateOptions") + delete(f, "InstanceAdvancedSettingsOverrides") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AddExistedInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AddExistedInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 失败的节点ID + // 注意:此字段可能返回 null,表示取不到有效值。 + FailedInstanceIds []*string `json:"FailedInstanceIds,omitempty" name:"FailedInstanceIds"` + + // 成功的节点ID + // 注意:此字段可能返回 null,表示取不到有效值。 + SuccInstanceIds []*string `json:"SuccInstanceIds,omitempty" name:"SuccInstanceIds"` + + // 超时未返回出来节点的ID(可能失败,也可能成功) + // 注意:此字段可能返回 null,表示取不到有效值。 + TimeoutInstanceIds []*string `json:"TimeoutInstanceIds,omitempty" name:"TimeoutInstanceIds"` + + // 失败的节点的失败原因 + // 注意:此字段可能返回 null,表示取不到有效值。 + FailedReasons []*string `json:"FailedReasons,omitempty" name:"FailedReasons"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AddExistedInstancesResponse) 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 *AddExistedInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AddNodeToNodePoolRequest struct { + *tchttp.BaseRequest + + // 集群id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 节点池id + NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` + + // 节点id + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` +} + +func (r *AddNodeToNodePoolRequest) 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 *AddNodeToNodePoolRequest) 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, "NodePoolId") + delete(f, "InstanceIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AddNodeToNodePoolRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AddNodeToNodePoolResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AddNodeToNodePoolResponse) 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 *AddNodeToNodePoolResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AddVpcCniSubnetsRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 为集群容器网络增加的子网列表 + SubnetIds []*string `json:"SubnetIds,omitempty" name:"SubnetIds"` + + // 集群所属的VPC的ID + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` +} + +func (r *AddVpcCniSubnetsRequest) 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 *AddVpcCniSubnetsRequest) 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, "SubnetIds") + delete(f, "VpcId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AddVpcCniSubnetsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type AddVpcCniSubnetsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *AddVpcCniSubnetsResponse) 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 *AddVpcCniSubnetsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type AppChart struct { + + // chart名称 + Name *string `json:"Name,omitempty" name:"Name"` + + // chart的标签 + // 注意:此字段可能返回 null,表示取不到有效值。 + Label *string `json:"Label,omitempty" name:"Label"` + + // chart的版本 + LatestVersion *string `json:"LatestVersion,omitempty" name:"LatestVersion"` +} + +type AutoScalingGroupRange struct { + + // 伸缩组最小实例数 + MinSize *int64 `json:"MinSize,omitempty" name:"MinSize"` + + // 伸缩组最大实例数 + MaxSize *int64 `json:"MaxSize,omitempty" name:"MaxSize"` +} + +type AutoUpgradeClusterLevel struct { + + // 是否开启自动变配集群等级 + IsAutoUpgrade *bool `json:"IsAutoUpgrade,omitempty" name:"IsAutoUpgrade"` +} + +type AutoscalingAdded struct { + + // 正在加入中的节点数量 + Joining *int64 `json:"Joining,omitempty" name:"Joining"` + + // 初始化中的节点数量 + Initializing *int64 `json:"Initializing,omitempty" name:"Initializing"` + + // 正常的节点数量 + Normal *int64 `json:"Normal,omitempty" name:"Normal"` + + // 节点总数 + Total *int64 `json:"Total,omitempty" name:"Total"` +} + +type Capabilities struct { + + // 启用安全能力项列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + Add []*string `json:"Add,omitempty" name:"Add"` + + // 禁用安全能力向列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + Drop []*string `json:"Drop,omitempty" name:"Drop"` +} + +type CbsVolume struct { + + // cbs volume 数据卷名称 + Name *string `json:"Name,omitempty" name:"Name"` + + // 腾讯云cbs盘Id + CbsDiskId *string `json:"CbsDiskId,omitempty" name:"CbsDiskId"` +} + +type CheckInstancesUpgradeAbleRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 节点列表,空为全部节点 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 升级类型 + UpgradeType *string `json:"UpgradeType,omitempty" name:"UpgradeType"` + + // 分页Offset + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 分页Limit + Limit *int64 `json:"Limit,omitempty" name:"Limit"` + + // 过滤 + Filter []*Filter `json:"Filter,omitempty" name:"Filter"` +} + +func (r *CheckInstancesUpgradeAbleRequest) 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 *CheckInstancesUpgradeAbleRequest) 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, "InstanceIds") + delete(f, "UpgradeType") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "Filter") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CheckInstancesUpgradeAbleRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CheckInstancesUpgradeAbleResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 集群master当前小版本 + ClusterVersion *string `json:"ClusterVersion,omitempty" name:"ClusterVersion"` + + // 集群master对应的大版本目前最新小版本 + LatestVersion *string `json:"LatestVersion,omitempty" name:"LatestVersion"` + + // 可升级节点列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + UpgradeAbleInstances []*UpgradeAbleInstancesItem `json:"UpgradeAbleInstances,omitempty" name:"UpgradeAbleInstances"` + + // 总数 + // 注意:此字段可能返回 null,表示取不到有效值。 + Total *int64 `json:"Total,omitempty" name:"Total"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CheckInstancesUpgradeAbleResponse) 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 *CheckInstancesUpgradeAbleResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type Cluster struct { + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 集群名称 + ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` + + // 集群描述 + ClusterDescription *string `json:"ClusterDescription,omitempty" name:"ClusterDescription"` + + // 集群版本(默认值为1.10.5) + ClusterVersion *string `json:"ClusterVersion,omitempty" name:"ClusterVersion"` + + // 集群系统。centos7.2x86_64 或者 ubuntu16.04.1 LTSx86_64,默认取值为ubuntu16.04.1 LTSx86_64 + ClusterOs *string `json:"ClusterOs,omitempty" name:"ClusterOs"` + + // 集群类型,托管集群:MANAGED_CLUSTER,独立集群:INDEPENDENT_CLUSTER。 + ClusterType *string `json:"ClusterType,omitempty" name:"ClusterType"` + + // 集群网络相关参数 + ClusterNetworkSettings *ClusterNetworkSettings `json:"ClusterNetworkSettings,omitempty" name:"ClusterNetworkSettings"` + + // 集群当前node数量 + ClusterNodeNum *uint64 `json:"ClusterNodeNum,omitempty" name:"ClusterNodeNum"` + + // 集群所属的项目ID + ProjectId *uint64 `json:"ProjectId,omitempty" name:"ProjectId"` + + // 标签描述列表。 + // 注意:此字段可能返回 null,表示取不到有效值。 + TagSpecification []*TagSpecification `json:"TagSpecification,omitempty" name:"TagSpecification"` + + // 集群状态 (Running 运行中 Creating 创建中 Idling 闲置中 Abnormal 异常 ) + ClusterStatus *string `json:"ClusterStatus,omitempty" name:"ClusterStatus"` + + // 集群属性(包括集群不同属性的MAP,属性字段包括NodeNameType (lan-ip模式和hostname 模式,默认无lan-ip模式)) + // 注意:此字段可能返回 null,表示取不到有效值。 + Property *string `json:"Property,omitempty" name:"Property"` + + // 集群当前master数量 + ClusterMaterNodeNum *uint64 `json:"ClusterMaterNodeNum,omitempty" name:"ClusterMaterNodeNum"` + + // 集群使用镜像id + // 注意:此字段可能返回 null,表示取不到有效值。 + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` + + // OsCustomizeType 系统定制类型 + // 注意:此字段可能返回 null,表示取不到有效值。 + OsCustomizeType *string `json:"OsCustomizeType,omitempty" name:"OsCustomizeType"` + + // 集群运行环境docker或container + // 注意:此字段可能返回 null,表示取不到有效值。 + ContainerRuntime *string `json:"ContainerRuntime,omitempty" name:"ContainerRuntime"` + + // 创建时间 + // 注意:此字段可能返回 null,表示取不到有效值。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 删除保护开关 + // 注意:此字段可能返回 null,表示取不到有效值。 + DeletionProtection *bool `json:"DeletionProtection,omitempty" name:"DeletionProtection"` + + // 集群是否开启第三方节点支持 + // 注意:此字段可能返回 null,表示取不到有效值。 + EnableExternalNode *bool `json:"EnableExternalNode,omitempty" name:"EnableExternalNode"` +} + +type ClusterAdvancedSettings struct { + + // 是否启用IPVS + IPVS *bool `json:"IPVS,omitempty" name:"IPVS"` + + // 是否启用集群节点自动扩缩容(创建集群流程不支持开启此功能) + AsEnabled *bool `json:"AsEnabled,omitempty" name:"AsEnabled"` + + // 集群使用的runtime类型,包括"docker"和"containerd"两种类型,默认为"docker" + ContainerRuntime *string `json:"ContainerRuntime,omitempty" name:"ContainerRuntime"` + + // 集群中节点NodeName类型(包括 hostname,lan-ip两种形式,默认为lan-ip。如果开启了hostname模式,创建节点时需要设置HostName参数,并且InstanceName需要和HostName一致) + NodeNameType *string `json:"NodeNameType,omitempty" name:"NodeNameType"` + + // 集群自定义参数 + ExtraArgs *ClusterExtraArgs `json:"ExtraArgs,omitempty" name:"ExtraArgs"` + + // 集群网络类型(包括GR(全局路由)和VPC-CNI两种模式,默认为GR。 + NetworkType *string `json:"NetworkType,omitempty" name:"NetworkType"` + + // 集群VPC-CNI模式是否为非固定IP,默认: FALSE 固定IP。 + IsNonStaticIpMode *bool `json:"IsNonStaticIpMode,omitempty" name:"IsNonStaticIpMode"` + + // 是否启用集群删除保护 + DeletionProtection *bool `json:"DeletionProtection,omitempty" name:"DeletionProtection"` + + // 集群的网络代理模型,目前tke集群支持的网络代理模式有三种:iptables,ipvs,ipvs-bpf,此参数仅在使用ipvs-bpf模式时使用,三种网络模式的参数设置关系如下: + // iptables模式:IPVS和KubeProxyMode都不设置 + // ipvs模式: 设置IPVS为true, KubeProxyMode不设置 + // ipvs-bpf模式: 设置KubeProxyMode为kube-proxy-bpf + // 使用ipvs-bpf的网络模式需要满足以下条件: + // 1. 集群版本必须为1.14及以上; + // 2. 系统镜像必须是: Tencent Linux 2.4; + KubeProxyMode *string `json:"KubeProxyMode,omitempty" name:"KubeProxyMode"` + + // 是否开启审计开关 + AuditEnabled *bool `json:"AuditEnabled,omitempty" name:"AuditEnabled"` + + // 审计日志上传到的logset日志集 + AuditLogsetId *string `json:"AuditLogsetId,omitempty" name:"AuditLogsetId"` + + // 审计日志上传到的topic + AuditLogTopicId *string `json:"AuditLogTopicId,omitempty" name:"AuditLogTopicId"` + + // 区分共享网卡多IP模式和独立网卡模式,共享网卡多 IP 模式填写"tke-route-eni",独立网卡模式填写"tke-direct-eni",默认为共享网卡模式 + VpcCniType *string `json:"VpcCniType,omitempty" name:"VpcCniType"` + + // 运行时版本 + RuntimeVersion *string `json:"RuntimeVersion,omitempty" name:"RuntimeVersion"` + + // 是否开节点podCIDR大小的自定义模式 + EnableCustomizedPodCIDR *bool `json:"EnableCustomizedPodCIDR,omitempty" name:"EnableCustomizedPodCIDR"` + + // 自定义模式下的基础pod数量 + BasePodNumber *int64 `json:"BasePodNumber,omitempty" name:"BasePodNumber"` + + // 启用 CiliumMode 的模式,空值表示不启用,“clusterIP” 表示启用 Cilium 支持 ClusterIP + CiliumMode *string `json:"CiliumMode,omitempty" name:"CiliumMode"` +} + +type ClusterAsGroup struct { + + // 伸缩组ID + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 伸缩组状态(开启 enabled 开启中 enabling 关闭 disabled 关闭中 disabling 更新中 updating 删除中 deleting 开启缩容中 scaleDownEnabling 关闭缩容中 scaleDownDisabling) + Status *string `json:"Status,omitempty" name:"Status"` + + // 节点是否设置成不可调度 + // 注意:此字段可能返回 null,表示取不到有效值。 + IsUnschedulable *bool `json:"IsUnschedulable,omitempty" name:"IsUnschedulable"` + + // 伸缩组的label列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + Labels []*Label `json:"Labels,omitempty" name:"Labels"` + + // 创建时间 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` +} + +type ClusterAsGroupAttribute struct { + + // 伸缩组ID + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 是否开启 + AutoScalingGroupEnabled *bool `json:"AutoScalingGroupEnabled,omitempty" name:"AutoScalingGroupEnabled"` + + // 伸缩组最大最小实例数 + AutoScalingGroupRange *AutoScalingGroupRange `json:"AutoScalingGroupRange,omitempty" name:"AutoScalingGroupRange"` +} + +type ClusterAsGroupOption struct { + + // 是否开启缩容 + // 注意:此字段可能返回 null,表示取不到有效值。 + IsScaleDownEnabled *bool `json:"IsScaleDownEnabled,omitempty" name:"IsScaleDownEnabled"` + + // 多伸缩组情况下扩容选择算法(random 随机选择,most-pods 最多类型的Pod least-waste 最少的资源浪费,默认为random) + // 注意:此字段可能返回 null,表示取不到有效值。 + Expander *string `json:"Expander,omitempty" name:"Expander"` + + // 最大并发缩容数 + // 注意:此字段可能返回 null,表示取不到有效值。 + MaxEmptyBulkDelete *int64 `json:"MaxEmptyBulkDelete,omitempty" name:"MaxEmptyBulkDelete"` + + // 集群扩容后多少分钟开始判断缩容(默认为10分钟) + // 注意:此字段可能返回 null,表示取不到有效值。 + ScaleDownDelay *int64 `json:"ScaleDownDelay,omitempty" name:"ScaleDownDelay"` + + // 节点连续空闲多少分钟后被缩容(默认为 10分钟) + // 注意:此字段可能返回 null,表示取不到有效值。 + ScaleDownUnneededTime *int64 `json:"ScaleDownUnneededTime,omitempty" name:"ScaleDownUnneededTime"` + + // 节点资源使用量低于多少(百分比)时认为空闲(默认: 50(百分比)) + // 注意:此字段可能返回 null,表示取不到有效值。 + ScaleDownUtilizationThreshold *int64 `json:"ScaleDownUtilizationThreshold,omitempty" name:"ScaleDownUtilizationThreshold"` + + // 含有本地存储Pod的节点是否不缩容(默认: FALSE) + // 注意:此字段可能返回 null,表示取不到有效值。 + SkipNodesWithLocalStorage *bool `json:"SkipNodesWithLocalStorage,omitempty" name:"SkipNodesWithLocalStorage"` + + // 含有kube-system namespace下非DaemonSet管理的Pod的节点是否不缩容 (默认: FALSE) + // 注意:此字段可能返回 null,表示取不到有效值。 + SkipNodesWithSystemPods *bool `json:"SkipNodesWithSystemPods,omitempty" name:"SkipNodesWithSystemPods"` + + // 计算资源使用量时是否默认忽略DaemonSet的实例(默认值: False,不忽略) + // 注意:此字段可能返回 null,表示取不到有效值。 + IgnoreDaemonSetsUtilization *bool `json:"IgnoreDaemonSetsUtilization,omitempty" name:"IgnoreDaemonSetsUtilization"` + + // CA做健康性判断的个数,默认3,即超过OkTotalUnreadyCount个数后,CA会进行健康性判断。 + // 注意:此字段可能返回 null,表示取不到有效值。 + OkTotalUnreadyCount *int64 `json:"OkTotalUnreadyCount,omitempty" name:"OkTotalUnreadyCount"` + + // 未就绪节点的最大百分比,此后CA会停止操作 + // 注意:此字段可能返回 null,表示取不到有效值。 + MaxTotalUnreadyPercentage *int64 `json:"MaxTotalUnreadyPercentage,omitempty" name:"MaxTotalUnreadyPercentage"` + + // 表示未准备就绪的节点在有资格进行缩减之前应该停留多长时间 + // 注意:此字段可能返回 null,表示取不到有效值。 + ScaleDownUnreadyTime *int64 `json:"ScaleDownUnreadyTime,omitempty" name:"ScaleDownUnreadyTime"` + + // CA删除未在Kubernetes中注册的节点之前等待的时间 + // 注意:此字段可能返回 null,表示取不到有效值。 + UnregisteredNodeRemovalTime *int64 `json:"UnregisteredNodeRemovalTime,omitempty" name:"UnregisteredNodeRemovalTime"` +} + +type ClusterBasicSettings struct { + + // 集群系统。centos7.2x86_64 或者 ubuntu16.04.1 LTSx86_64,默认取值为ubuntu16.04.1 LTSx86_64 + ClusterOs *string `json:"ClusterOs,omitempty" name:"ClusterOs"` + + // 集群版本,默认值为1.10.5 + ClusterVersion *string `json:"ClusterVersion,omitempty" name:"ClusterVersion"` + + // 集群名称 + ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` + + // 集群描述 + ClusterDescription *string `json:"ClusterDescription,omitempty" name:"ClusterDescription"` + + // 私有网络ID,形如vpc-xxx。创建托管空集群时必传。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 集群内新增资源所属项目ID。 + ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` + + // 标签描述列表。通过指定该参数可以同时绑定标签到相应的资源实例,当前仅支持绑定标签到集群实例。 + TagSpecification []*TagSpecification `json:"TagSpecification,omitempty" name:"TagSpecification"` + + // 容器的镜像版本,"DOCKER_CUSTOMIZE"(容器定制版),"GENERAL"(普通版本,默认值) + OsCustomizeType *string `json:"OsCustomizeType,omitempty" name:"OsCustomizeType"` + + // 是否开启节点的默认安全组(默认: 否,Aphla特性) + NeedWorkSecurityGroup *bool `json:"NeedWorkSecurityGroup,omitempty" name:"NeedWorkSecurityGroup"` + + // 当选择Cilium Overlay网络插件时,TKE会从该子网获取2个IP用来创建内网负载均衡 + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // 集群等级,针对托管集群生效 + ClusterLevel *string `json:"ClusterLevel,omitempty" name:"ClusterLevel"` + + // 自动变配集群等级,针对托管集群生效 + AutoUpgradeClusterLevel *AutoUpgradeClusterLevel `json:"AutoUpgradeClusterLevel,omitempty" name:"AutoUpgradeClusterLevel"` +} + +type ClusterCIDRSettings struct { + + // 用于分配集群容器和服务 IP 的 CIDR,不得与 VPC CIDR 冲突,也不得与同 VPC 内其他集群 CIDR 冲突。且网段范围必须在内网网段内,例如:10.1.0.0/14, 192.168.0.1/18,172.16.0.0/16。 + ClusterCIDR *string `json:"ClusterCIDR,omitempty" name:"ClusterCIDR"` + + // 是否忽略 ClusterCIDR 冲突错误, 默认不忽略 + IgnoreClusterCIDRConflict *bool `json:"IgnoreClusterCIDRConflict,omitempty" name:"IgnoreClusterCIDRConflict"` + + // 集群中每个Node上最大的Pod数量。取值范围4~256。不为2的幂值时会向上取最接近的2的幂值。 + MaxNodePodNum *uint64 `json:"MaxNodePodNum,omitempty" name:"MaxNodePodNum"` + + // 集群最大的service数量。取值范围32~32768,不为2的幂值时会向上取最接近的2的幂值。默认值256 + MaxClusterServiceNum *uint64 `json:"MaxClusterServiceNum,omitempty" name:"MaxClusterServiceNum"` + + // 用于分配集群服务 IP 的 CIDR,不得与 VPC CIDR 冲突,也不得与同 VPC 内其他集群 CIDR 冲突。且网段范围必须在内网网段内,例如:10.1.0.0/14, 192.168.0.1/18,172.16.0.0/16。 + ServiceCIDR *string `json:"ServiceCIDR,omitempty" name:"ServiceCIDR"` + + // VPC-CNI网络模式下,弹性网卡的子网Id。 + EniSubnetIds []*string `json:"EniSubnetIds,omitempty" name:"EniSubnetIds"` + + // VPC-CNI网络模式下,弹性网卡IP的回收时间,取值范围[300,15768000) + ClaimExpiredSeconds *int64 `json:"ClaimExpiredSeconds,omitempty" name:"ClaimExpiredSeconds"` +} + +type ClusterCredential struct { + + // CA 根证书 + CACert *string `json:"CACert,omitempty" name:"CACert"` + + // 认证用的Token + Token *string `json:"Token,omitempty" name:"Token"` +} + +type ClusterExtraArgs struct { + + // kube-apiserver自定义参数,参数格式为["k1=v1", "k1=v2"], 例如["max-requests-inflight=500","feature-gates=PodShareProcessNamespace=true,DynamicKubeletConfig=true"] + // 注意:此字段可能返回 null,表示取不到有效值。 + KubeAPIServer []*string `json:"KubeAPIServer,omitempty" name:"KubeAPIServer"` + + // kube-controller-manager自定义参数 + // 注意:此字段可能返回 null,表示取不到有效值。 + KubeControllerManager []*string `json:"KubeControllerManager,omitempty" name:"KubeControllerManager"` + + // kube-scheduler自定义参数 + // 注意:此字段可能返回 null,表示取不到有效值。 + KubeScheduler []*string `json:"KubeScheduler,omitempty" name:"KubeScheduler"` + + // etcd自定义参数,只支持独立集群 + // 注意:此字段可能返回 null,表示取不到有效值。 + Etcd []*string `json:"Etcd,omitempty" name:"Etcd"` +} + +type ClusterInternalLB struct { + + // 是否开启内网访问LB + Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` + + // 内网访问LB关联的子网Id + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` +} + +type ClusterNetworkSettings struct { + + // 用于分配集群容器和服务 IP 的 CIDR,不得与 VPC CIDR 冲突,也不得与同 VPC 内其他集群 CIDR 冲突 + ClusterCIDR *string `json:"ClusterCIDR,omitempty" name:"ClusterCIDR"` + + // 是否忽略 ClusterCIDR 冲突错误, 默认不忽略 + IgnoreClusterCIDRConflict *bool `json:"IgnoreClusterCIDRConflict,omitempty" name:"IgnoreClusterCIDRConflict"` + + // 集群中每个Node上最大的Pod数量(默认为256) + MaxNodePodNum *uint64 `json:"MaxNodePodNum,omitempty" name:"MaxNodePodNum"` + + // 集群最大的service数量(默认为256) + MaxClusterServiceNum *uint64 `json:"MaxClusterServiceNum,omitempty" name:"MaxClusterServiceNum"` + + // 是否启用IPVS(默认不开启) + Ipvs *bool `json:"Ipvs,omitempty" name:"Ipvs"` + + // 集群的VPCID(如果创建空集群,为必传值,否则自动设置为和集群的节点保持一致) + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 网络插件是否启用CNI(默认开启) + Cni *bool `json:"Cni,omitempty" name:"Cni"` + + // service的网络模式,当前参数只适用于ipvs+bpf模式 + // 注意:此字段可能返回 null,表示取不到有效值。 + KubeProxyMode *string `json:"KubeProxyMode,omitempty" name:"KubeProxyMode"` + + // 用于分配service的IP range,不得与 VPC CIDR 冲突,也不得与同 VPC 内其他集群 CIDR 冲突 + // 注意:此字段可能返回 null,表示取不到有效值。 + ServiceCIDR *string `json:"ServiceCIDR,omitempty" name:"ServiceCIDR"` + + // 集群关联的容器子网 + // 注意:此字段可能返回 null,表示取不到有效值。 + Subnets []*string `json:"Subnets,omitempty" name:"Subnets"` +} + +type ClusterPublicLB struct { + + // 是否开启公网访问LB + Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` + + // 允许访问的来源CIDR列表 + AllowFromCidrs []*string `json:"AllowFromCidrs,omitempty" name:"AllowFromCidrs"` + + // 安全策略放通单个IP或CIDR(例如: "192.168.1.0/24",默认为拒绝所有) + SecurityPolicies []*string `json:"SecurityPolicies,omitempty" name:"SecurityPolicies"` + + // 外网访问相关的扩展参数,格式为json + ExtraParam *string `json:"ExtraParam,omitempty" name:"ExtraParam"` + + // 新内外网功能,需要传递安全组 + SecurityGroup *string `json:"SecurityGroup,omitempty" name:"SecurityGroup"` +} + +type ClusterStatus struct { + + // 集群Id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 集群状态 + ClusterState *string `json:"ClusterState,omitempty" name:"ClusterState"` + + // 集群下机器实例的状态 + ClusterInstanceState *string `json:"ClusterInstanceState,omitempty" name:"ClusterInstanceState"` + + // 集群是否开启监控 + ClusterBMonitor *bool `json:"ClusterBMonitor,omitempty" name:"ClusterBMonitor"` + + // 集群创建中的节点数,-1表示获取节点状态超时,-2表示获取节点状态失败 + ClusterInitNodeNum *int64 `json:"ClusterInitNodeNum,omitempty" name:"ClusterInitNodeNum"` + + // 集群运行中的节点数,-1表示获取节点状态超时,-2表示获取节点状态失败 + ClusterRunningNodeNum *int64 `json:"ClusterRunningNodeNum,omitempty" name:"ClusterRunningNodeNum"` + + // 集群异常的节点数,-1表示获取节点状态超时,-2表示获取节点状态失败 + ClusterFailedNodeNum *int64 `json:"ClusterFailedNodeNum,omitempty" name:"ClusterFailedNodeNum"` + + // 集群已关机的节点数,-1表示获取节点状态超时,-2表示获取节点状态失败 + // 注意:此字段可能返回 null,表示取不到有效值。 + ClusterClosedNodeNum *int64 `json:"ClusterClosedNodeNum,omitempty" name:"ClusterClosedNodeNum"` + + // 集群关机中的节点数,-1表示获取节点状态超时,-2表示获取节点状态失败 + // 注意:此字段可能返回 null,表示取不到有效值。 + ClusterClosingNodeNum *int64 `json:"ClusterClosingNodeNum,omitempty" name:"ClusterClosingNodeNum"` + + // 集群是否开启删除保护 + // 注意:此字段可能返回 null,表示取不到有效值。 + ClusterDeletionProtection *bool `json:"ClusterDeletionProtection,omitempty" name:"ClusterDeletionProtection"` + + // 集群是否可审计 + // 注意:此字段可能返回 null,表示取不到有效值。 + ClusterAuditEnabled *bool `json:"ClusterAuditEnabled,omitempty" name:"ClusterAuditEnabled"` +} + +type ClusterVersion struct { + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 集群主版本号列表,例如1.18.4 + Versions []*string `json:"Versions,omitempty" name:"Versions"` +} + +type CommonName struct { + + // 子账户UIN + SubaccountUin *string `json:"SubaccountUin,omitempty" name:"SubaccountUin"` + + // 子账户客户端证书中的CommonName字段 + CN *string `json:"CN,omitempty" name:"CN"` +} + +type Container struct { + + // 镜像 + Image *string `json:"Image,omitempty" name:"Image"` + + // 容器名 + Name *string `json:"Name,omitempty" name:"Name"` + + // 容器启动命令 + Commands []*string `json:"Commands,omitempty" name:"Commands"` + + // 容器启动参数 + Args []*string `json:"Args,omitempty" name:"Args"` + + // 容器内操作系统的环境变量 + EnvironmentVars []*EnvironmentVariable `json:"EnvironmentVars,omitempty" name:"EnvironmentVars"` + + // CPU,制改容器最多可使用的核数,该值不可超过容器实例的总核数。单位:核。 + Cpu *float64 `json:"Cpu,omitempty" name:"Cpu"` + + // 内存,限制该容器最多可使用的内存值,该值不可超过容器实例的总内存值。单位:GiB + Memory *float64 `json:"Memory,omitempty" name:"Memory"` + + // 数据卷挂载信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + VolumeMounts []*VolumeMount `json:"VolumeMounts,omitempty" name:"VolumeMounts"` + + // 当前状态 + // 注意:此字段可能返回 null,表示取不到有效值。 + CurrentState *ContainerState `json:"CurrentState,omitempty" name:"CurrentState"` + + // 重启次数 + // 注意:此字段可能返回 null,表示取不到有效值。 + RestartCount *uint64 `json:"RestartCount,omitempty" name:"RestartCount"` + + // 容器工作目录 + // 注意:此字段可能返回 null,表示取不到有效值。 + WorkingDir *string `json:"WorkingDir,omitempty" name:"WorkingDir"` + + // 存活探针 + // 注意:此字段可能返回 null,表示取不到有效值。 + LivenessProbe *LivenessOrReadinessProbe `json:"LivenessProbe,omitempty" name:"LivenessProbe"` + + // 就绪探针 + // 注意:此字段可能返回 null,表示取不到有效值。 + ReadinessProbe *LivenessOrReadinessProbe `json:"ReadinessProbe,omitempty" name:"ReadinessProbe"` + + // Gpu限制 + // 注意:此字段可能返回 null,表示取不到有效值。 + GpuLimit *uint64 `json:"GpuLimit,omitempty" name:"GpuLimit"` + + // 容器的安全上下文 + // 注意:此字段可能返回 null,表示取不到有效值。 + SecurityContext *SecurityContext `json:"SecurityContext,omitempty" name:"SecurityContext"` +} + +type ContainerState struct { + + // 容器运行开始时间 + // 注意:此字段可能返回 null,表示取不到有效值。 + StartTime *string `json:"StartTime,omitempty" name:"StartTime"` + + // 容器状态:created, running, exited, unknown + State *string `json:"State,omitempty" name:"State"` + + // 容器运行结束时间 + // 注意:此字段可能返回 null,表示取不到有效值。 + FinishTime *string `json:"FinishTime,omitempty" name:"FinishTime"` + + // 容器运行退出码 + // 注意:此字段可能返回 null,表示取不到有效值。 + ExitCode *int64 `json:"ExitCode,omitempty" name:"ExitCode"` + + // 容器状态 Reason + // 注意:此字段可能返回 null,表示取不到有效值。 + Reason *string `json:"Reason,omitempty" name:"Reason"` + + // 容器状态信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + Message *string `json:"Message,omitempty" name:"Message"` + + // 容器重启次数 + // 注意:此字段可能返回 null,表示取不到有效值。 + RestartCount *int64 `json:"RestartCount,omitempty" name:"RestartCount"` +} + +type ControllerStatus struct { + + // 控制器的名字 + Name *string `json:"Name,omitempty" name:"Name"` + + // 控制器是否开启 + Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` +} + +type CreateClusterAsGroupRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 伸缩组创建透传参数,json化字符串格式,详见[伸缩组创建实例](https://cloud.tencent.com/document/api/377/20440)接口。LaunchConfigurationId由LaunchConfigurePara参数创建,不支持填写 + AutoScalingGroupPara *string `json:"AutoScalingGroupPara,omitempty" name:"AutoScalingGroupPara"` + + // 启动配置创建透传参数,json化字符串格式,详见[创建启动配置](https://cloud.tencent.com/document/api/377/20447)接口。另外ImageId参数由于集群维度已经有的ImageId信息,这个字段不需要填写。UserData字段设置通过UserScript设置,这个字段不需要填写。 + LaunchConfigurePara *string `json:"LaunchConfigurePara,omitempty" name:"LaunchConfigurePara"` + + // 节点高级配置信息 + InstanceAdvancedSettings *InstanceAdvancedSettings `json:"InstanceAdvancedSettings,omitempty" name:"InstanceAdvancedSettings"` + + // 节点Label数组 + Labels []*Label `json:"Labels,omitempty" name:"Labels"` +} + +func (r *CreateClusterAsGroupRequest) 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 *CreateClusterAsGroupRequest) 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, "AutoScalingGroupPara") + delete(f, "LaunchConfigurePara") + delete(f, "InstanceAdvancedSettings") + delete(f, "Labels") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateClusterAsGroupRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterAsGroupResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 启动配置ID + LaunchConfigurationId *string `json:"LaunchConfigurationId,omitempty" name:"LaunchConfigurationId"` + + // 伸缩组ID + AutoScalingGroupId *string `json:"AutoScalingGroupId,omitempty" name:"AutoScalingGroupId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateClusterAsGroupResponse) 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 *CreateClusterAsGroupResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterEndpointRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 集群端口所在的子网ID (仅在开启非外网访问时需要填,必须为集群所在VPC内的子网) + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // 是否为外网访问(TRUE 外网访问 FALSE 内网访问,默认值: FALSE) + IsExtranet *bool `json:"IsExtranet,omitempty" name:"IsExtranet"` +} + +func (r *CreateClusterEndpointRequest) 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 *CreateClusterEndpointRequest) 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, "SubnetId") + delete(f, "IsExtranet") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateClusterEndpointRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterEndpointResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateClusterEndpointResponse) 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 *CreateClusterEndpointResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterEndpointVipRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 安全策略放通单个IP或CIDR(例如: "192.168.1.0/24",默认为拒绝所有) + SecurityPolicies []*string `json:"SecurityPolicies,omitempty" name:"SecurityPolicies"` +} + +func (r *CreateClusterEndpointVipRequest) 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 *CreateClusterEndpointVipRequest) 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, "SecurityPolicies") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateClusterEndpointVipRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterEndpointVipResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 请求任务的FlowId + RequestFlowId *int64 `json:"RequestFlowId,omitempty" name:"RequestFlowId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateClusterEndpointVipResponse) 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 *CreateClusterEndpointVipResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterInstancesRequest struct { + *tchttp.BaseRequest + + // 集群 ID,请填写 查询集群列表 接口中返回的 clusterId 字段 + 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"` + + // 实例额外需要设置参数信息 + InstanceAdvancedSettings *InstanceAdvancedSettings `json:"InstanceAdvancedSettings,omitempty" name:"InstanceAdvancedSettings"` + + // 校验规则相关选项,可配置跳过某些校验规则。目前支持GlobalRouteCIDRCheck(跳过GlobalRouter的相关校验),VpcCniCIDRCheck(跳过VpcCni相关校验) + SkipValidateOptions []*string `json:"SkipValidateOptions,omitempty" name:"SkipValidateOptions"` +} + +func (r *CreateClusterInstancesRequest) 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 *CreateClusterInstancesRequest) 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, "InstanceAdvancedSettings") + delete(f, "SkipValidateOptions") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateClusterInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 节点实例ID + InstanceIdSet []*string `json:"InstanceIdSet,omitempty" name:"InstanceIdSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateClusterInstancesResponse) 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 *CreateClusterInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterNodePoolFromExistingAsgRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 伸缩组ID + AutoscalingGroupId *string `json:"AutoscalingGroupId,omitempty" name:"AutoscalingGroupId"` +} + +func (r *CreateClusterNodePoolFromExistingAsgRequest) 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 *CreateClusterNodePoolFromExistingAsgRequest) 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, "AutoscalingGroupId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateClusterNodePoolFromExistingAsgRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterNodePoolFromExistingAsgResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 节点池ID + NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateClusterNodePoolFromExistingAsgResponse) 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 *CreateClusterNodePoolFromExistingAsgResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterNodePoolRequest struct { + *tchttp.BaseRequest + + // cluster id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // AutoScalingGroupPara AS组参数 + AutoScalingGroupPara *string `json:"AutoScalingGroupPara,omitempty" name:"AutoScalingGroupPara"` + + // LaunchConfigurePara 运行参数 + LaunchConfigurePara *string `json:"LaunchConfigurePara,omitempty" name:"LaunchConfigurePara"` + + // InstanceAdvancedSettings 示例参数 + InstanceAdvancedSettings *InstanceAdvancedSettings `json:"InstanceAdvancedSettings,omitempty" name:"InstanceAdvancedSettings"` + + // 是否启用自动伸缩 + EnableAutoscale *bool `json:"EnableAutoscale,omitempty" name:"EnableAutoscale"` + + // 节点池名称 + Name *string `json:"Name,omitempty" name:"Name"` + + // Labels标签 + Labels []*Label `json:"Labels,omitempty" name:"Labels"` + + // Taints互斥 + Taints []*Taint `json:"Taints,omitempty" name:"Taints"` + + // 节点池os + NodePoolOs *string `json:"NodePoolOs,omitempty" name:"NodePoolOs"` + + // 容器的镜像版本,"DOCKER_CUSTOMIZE"(容器定制版),"GENERAL"(普通版本,默认值) + OsCustomizeType *string `json:"OsCustomizeType,omitempty" name:"OsCustomizeType"` + + // 资源标签 + Tags []*Tag `json:"Tags,omitempty" name:"Tags"` +} + +func (r *CreateClusterNodePoolRequest) 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 *CreateClusterNodePoolRequest) 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, "AutoScalingGroupPara") + delete(f, "LaunchConfigurePara") + delete(f, "InstanceAdvancedSettings") + delete(f, "EnableAutoscale") + delete(f, "Name") + delete(f, "Labels") + delete(f, "Taints") + delete(f, "NodePoolOs") + delete(f, "OsCustomizeType") + delete(f, "Tags") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateClusterNodePoolRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterNodePoolResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 节点池id + NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateClusterNodePoolResponse) 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 *CreateClusterNodePoolResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterRequest struct { + *tchttp.BaseRequest + + // 集群容器网络配置信息 + ClusterCIDRSettings *ClusterCIDRSettings `json:"ClusterCIDRSettings,omitempty" name:"ClusterCIDRSettings"` + + // 集群类型,托管集群:MANAGED_CLUSTER,独立集群:INDEPENDENT_CLUSTER。 + ClusterType *string `json:"ClusterType,omitempty" name:"ClusterType"` + + // CVM创建透传参数,json化字符串格式,详见[CVM创建实例](https://cloud.tencent.com/document/product/213/15730)接口。总机型(包括地域)数量不超过10个,相同机型(地域)购买多台机器可以通过设置参数中RunInstances中InstanceCount来实现。 + RunInstancesForNode []*RunInstancesForNode `json:"RunInstancesForNode,omitempty" name:"RunInstancesForNode"` + + // 集群的基本配置信息 + ClusterBasicSettings *ClusterBasicSettings `json:"ClusterBasicSettings,omitempty" name:"ClusterBasicSettings"` + + // 集群高级配置信息 + ClusterAdvancedSettings *ClusterAdvancedSettings `json:"ClusterAdvancedSettings,omitempty" name:"ClusterAdvancedSettings"` + + // 节点高级配置信息 + InstanceAdvancedSettings *InstanceAdvancedSettings `json:"InstanceAdvancedSettings,omitempty" name:"InstanceAdvancedSettings"` + + // 已存在实例的配置信息。所有实例必须在同一个VPC中,最大数量不超过100,不支持添加竞价实例。 + ExistedInstancesForNode []*ExistedInstancesForNode `json:"ExistedInstancesForNode,omitempty" name:"ExistedInstancesForNode"` + + // CVM类型和其对应的数据盘挂载配置信息 + InstanceDataDiskMountSettings []*InstanceDataDiskMountSetting `json:"InstanceDataDiskMountSettings,omitempty" name:"InstanceDataDiskMountSettings"` + + // 需要安装的扩展组件信息 + ExtensionAddons []*ExtensionAddon `json:"ExtensionAddons,omitempty" name:"ExtensionAddons"` +} + +func (r *CreateClusterRequest) 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 *CreateClusterRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterCIDRSettings") + delete(f, "ClusterType") + delete(f, "RunInstancesForNode") + delete(f, "ClusterBasicSettings") + delete(f, "ClusterAdvancedSettings") + delete(f, "InstanceAdvancedSettings") + delete(f, "ExistedInstancesForNode") + delete(f, "InstanceDataDiskMountSettings") + delete(f, "ExtensionAddons") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateClusterRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateClusterResponse) 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 *CreateClusterResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterRouteRequest struct { + *tchttp.BaseRequest + + // 路由表名称。 + RouteTableName *string `json:"RouteTableName,omitempty" name:"RouteTableName"` + + // 目的端CIDR。 + DestinationCidrBlock *string `json:"DestinationCidrBlock,omitempty" name:"DestinationCidrBlock"` + + // 下一跳地址。 + GatewayIp *string `json:"GatewayIp,omitempty" name:"GatewayIp"` +} + +func (r *CreateClusterRouteRequest) 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 *CreateClusterRouteRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "RouteTableName") + delete(f, "DestinationCidrBlock") + delete(f, "GatewayIp") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateClusterRouteRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterRouteResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateClusterRouteResponse) 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 *CreateClusterRouteResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterRouteTableRequest struct { + *tchttp.BaseRequest + + // 路由表名称 + RouteTableName *string `json:"RouteTableName,omitempty" name:"RouteTableName"` + + // 路由表CIDR + RouteTableCidrBlock *string `json:"RouteTableCidrBlock,omitempty" name:"RouteTableCidrBlock"` + + // 路由表绑定的VPC + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 是否忽略CIDR冲突 + IgnoreClusterCidrConflict *int64 `json:"IgnoreClusterCidrConflict,omitempty" name:"IgnoreClusterCidrConflict"` +} + +func (r *CreateClusterRouteTableRequest) 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 *CreateClusterRouteTableRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "RouteTableName") + delete(f, "RouteTableCidrBlock") + delete(f, "VpcId") + delete(f, "IgnoreClusterCidrConflict") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateClusterRouteTableRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateClusterRouteTableResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateClusterRouteTableResponse) 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 *CreateClusterRouteTableResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateEKSClusterRequest struct { + *tchttp.BaseRequest + + // k8s版本号。可为1.14.4, 1.12.8。 + K8SVersion *string `json:"K8SVersion,omitempty" name:"K8SVersion"` + + // vpc 的Id + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 集群名称 + ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` + + // 子网Id 列表 + SubnetIds []*string `json:"SubnetIds,omitempty" name:"SubnetIds"` + + // 集群描述信息 + ClusterDesc *string `json:"ClusterDesc,omitempty" name:"ClusterDesc"` + + // Serivce 所在子网Id + ServiceSubnetId *string `json:"ServiceSubnetId,omitempty" name:"ServiceSubnetId"` + + // 集群自定义的Dns服务器信息 + DnsServers []*DnsServerConf `json:"DnsServers,omitempty" name:"DnsServers"` + + // 扩展参数。须是map[string]string 的json 格式。 + ExtraParam *string `json:"ExtraParam,omitempty" name:"ExtraParam"` + + // 是否在用户集群内开启Dns。默认为true + EnableVpcCoreDNS *bool `json:"EnableVpcCoreDNS,omitempty" name:"EnableVpcCoreDNS"` + + // 标签描述列表。通过指定该参数可以同时绑定标签到相应的资源实例,当前仅支持绑定标签到集群实例。 + TagSpecification []*TagSpecification `json:"TagSpecification,omitempty" name:"TagSpecification"` +} + +func (r *CreateEKSClusterRequest) 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 *CreateEKSClusterRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "K8SVersion") + delete(f, "VpcId") + delete(f, "ClusterName") + delete(f, "SubnetIds") + delete(f, "ClusterDesc") + delete(f, "ServiceSubnetId") + delete(f, "DnsServers") + delete(f, "ExtraParam") + delete(f, "EnableVpcCoreDNS") + delete(f, "TagSpecification") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateEKSClusterRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateEKSClusterResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 弹性集群Id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateEKSClusterResponse) 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 *CreateEKSClusterResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateEKSContainerInstancesRequest struct { + /*********PCM param************/ + RequestSource string `position:"Query" name:"RequestSource"` + ProviderId int32 `position:"Query" name:"ProviderId"` + AccountName string `position:"Query" name:"AccountName"` + Namespace string `position:"Query" name:"Namespace"` + RegionId string `position:"Query" name:"RegionId"` + /*********PCM param************/ + + *tchttp.BaseRequest + + // 容器组 + Containers []*Container `json:"Containers,omitempty" name:"Containers"` + + // EKS Container Instance容器实例名称 + EksCiName *string `json:"EksCiName,omitempty" name:"EksCiName"` + + // 指定新创建实例所属于的安全组Id + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` + + // 实例所属子网Id + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // 实例所属VPC的Id + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 内存,单位:GiB。可参考[资源规格](https://cloud.tencent.com/document/product/457/39808)文档 + Memory *float64 `json:"Memory,omitempty" name:"Memory"` + + // CPU,单位:核。可参考[资源规格](https://cloud.tencent.com/document/product/457/39808)文档 + Cpu *float64 `json:"Cpu,omitempty" name:"Cpu"` + + // 实例重启策略: Always(总是重启)、Never(从不重启)、OnFailure(失败时重启),默认:Always。 + RestartPolicy *string `json:"RestartPolicy,omitempty" name:"RestartPolicy"` + + // 镜像仓库凭证数组 + ImageRegistryCredentials []*ImageRegistryCredential `json:"ImageRegistryCredentials,omitempty" name:"ImageRegistryCredentials"` + + // 数据卷,包含NfsVolume数组和CbsVolume数组 + EksCiVolume *EksCiVolume `json:"EksCiVolume,omitempty" name:"EksCiVolume"` + + // 实例副本数,默认为1 + Replicas *int64 `json:"Replicas,omitempty" name:"Replicas"` + + // Init 容器 + InitContainers []*Container `json:"InitContainers,omitempty" name:"InitContainers"` + + // 自定义DNS配置 + DnsConfig *DNSConfig `json:"DnsConfig,omitempty" name:"DnsConfig"` + + // 用来绑定容器实例的已有EIP的列表。如传值,需要保证数值和Replicas相等。 + // 另外此参数和AutoCreateEipAttribute互斥。 + ExistedEipIds []*string `json:"ExistedEipIds,omitempty" name:"ExistedEipIds"` + + // 自动创建EIP的可选参数。若传此参数,则会自动创建EIP。 + // 另外此参数和ExistedEipIds互斥 + AutoCreateEipAttribute *EipAttribute `json:"AutoCreateEipAttribute,omitempty" name:"AutoCreateEipAttribute"` + + // 是否为容器实例自动创建EIP,默认为false。若传true,则此参数和ExistedEipIds互斥 + AutoCreateEip *bool `json:"AutoCreateEip,omitempty" name:"AutoCreateEip"` + + // Pod 所需的 CPU 资源型号,如果不填写则默认不强制指定 CPU 类型。目前支持型号如下: + // intel + // amd + // - 支持优先级顺序写法,如 “amd,intel” 表示优先创建 amd 资源 Pod,如果所选地域可用区 amd 资源不足,则会创建 intel 资源 Pod。 + CpuType *string `json:"CpuType,omitempty" name:"CpuType"` + + // 容器实例所需的 GPU 资源型号,目前支持型号如下: + // 1/4\*V100 + // 1/2\*V100 + // V100 + // 1/4\*T4 + // 1/2\*T4 + // T4 + GpuType *string `json:"GpuType,omitempty" name:"GpuType"` + + // Pod 所需的 GPU 数量,如填写,请确保为支持的规格。默认单位为卡,无需再次注明。 + GpuCount *uint64 `json:"GpuCount,omitempty" name:"GpuCount"` + + // 为容器实例关联 CAM 角色,value 填写 CAM 角色名称,容器实例可获取该 CAM 角色包含的权限策略,方便 容器实例 内的程序进行如购买资源、读写存储等云资源操作。 + CamRoleName *string `json:"CamRoleName,omitempty" name:"CamRoleName"` +} + +func (r *CreateEKSContainerInstancesRequest) 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 *CreateEKSContainerInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Containers") + delete(f, "EksCiName") + delete(f, "SecurityGroupIds") + delete(f, "SubnetId") + delete(f, "VpcId") + delete(f, "Memory") + delete(f, "Cpu") + delete(f, "RestartPolicy") + delete(f, "ImageRegistryCredentials") + delete(f, "EksCiVolume") + delete(f, "Replicas") + delete(f, "InitContainers") + delete(f, "DnsConfig") + delete(f, "ExistedEipIds") + delete(f, "AutoCreateEipAttribute") + delete(f, "AutoCreateEip") + delete(f, "CpuType") + delete(f, "GpuType") + delete(f, "GpuCount") + delete(f, "CamRoleName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateEKSContainerInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateEKSContainerInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // EKS Container Instance Id集合,格式为eksci-xxx,是容器实例的唯一标识。 + EksCiIds []*string `json:"EksCiIds,omitempty" name:"EksCiIds"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateEKSContainerInstancesResponse) 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 *CreateEKSContainerInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreateImageCacheRequest struct { + *tchttp.BaseRequest + + // 用于制作镜像缓存的容器镜像列表 + Images []*string `json:"Images,omitempty" name:"Images"` + + // 实例所属子网Id + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // 实例所属VPC Id + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 镜像缓存名称 + ImageCacheName *string `json:"ImageCacheName,omitempty" name:"ImageCacheName"` + + // 安全组Id + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` + + // 镜像仓库凭证数组 + ImageRegistryCredentials []*ImageRegistryCredential `json:"ImageRegistryCredentials,omitempty" name:"ImageRegistryCredentials"` + + // 用来绑定容器实例的已有EIP + ExistedEipId *string `json:"ExistedEipId,omitempty" name:"ExistedEipId"` + + // 是否为容器实例自动创建EIP,默认为false。若传true,则此参数和ExistedEipIds互斥 + AutoCreateEip *bool `json:"AutoCreateEip,omitempty" name:"AutoCreateEip"` + + // 自动创建EIP的可选参数。若传此参数,则会自动创建EIP。 + // 另外此参数和ExistedEipIds互斥 + AutoCreateEipAttribute *EipAttribute `json:"AutoCreateEipAttribute,omitempty" name:"AutoCreateEipAttribute"` + + // 镜像缓存的大小。默认为20 GiB。取值范围参考[云硬盘类型](https://cloud.tencent.com/document/product/362/2353)中的高性能云盘类型的大小限制。 + ImageCacheSize *uint64 `json:"ImageCacheSize,omitempty" name:"ImageCacheSize"` + + // 镜像缓存保留时间天数,过期将会自动清理,默认为0,永不过期。 + RetentionDays *uint64 `json:"RetentionDays,omitempty" name:"RetentionDays"` +} + +func (r *CreateImageCacheRequest) 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 *CreateImageCacheRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Images") + delete(f, "SubnetId") + delete(f, "VpcId") + delete(f, "ImageCacheName") + delete(f, "SecurityGroupIds") + delete(f, "ImageRegistryCredentials") + delete(f, "ExistedEipId") + delete(f, "AutoCreateEip") + delete(f, "AutoCreateEipAttribute") + delete(f, "ImageCacheSize") + delete(f, "RetentionDays") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateImageCacheRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateImageCacheResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 镜像缓存Id + ImageCacheId *string `json:"ImageCacheId,omitempty" name:"ImageCacheId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateImageCacheResponse) 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 *CreateImageCacheResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreatePrometheusAlertRuleRequest struct { + *tchttp.BaseRequest + + // 实例id + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 告警配置 + AlertRule *PrometheusAlertRuleDetail `json:"AlertRule,omitempty" name:"AlertRule"` +} + +func (r *CreatePrometheusAlertRuleRequest) 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 *CreatePrometheusAlertRuleRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceId") + delete(f, "AlertRule") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreatePrometheusAlertRuleRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreatePrometheusAlertRuleResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 告警id + Id *string `json:"Id,omitempty" name:"Id"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreatePrometheusAlertRuleResponse) 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 *CreatePrometheusAlertRuleResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreatePrometheusDashboardRequest struct { + *tchttp.BaseRequest + + // 实例id + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 面板组名称 + DashboardName *string `json:"DashboardName,omitempty" name:"DashboardName"` + + // 面板列表 + // 每一项是一个grafana dashboard的json定义 + Contents []*string `json:"Contents,omitempty" name:"Contents"` +} + +func (r *CreatePrometheusDashboardRequest) 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 *CreatePrometheusDashboardRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceId") + delete(f, "DashboardName") + delete(f, "Contents") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreatePrometheusDashboardRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreatePrometheusDashboardResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreatePrometheusDashboardResponse) 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 *CreatePrometheusDashboardResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type CreatePrometheusTemplateRequest struct { + *tchttp.BaseRequest + + // 模板设置 + Template *PrometheusTemplate `json:"Template,omitempty" name:"Template"` +} + +func (r *CreatePrometheusTemplateRequest) 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 *CreatePrometheusTemplateRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Template") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreatePrometheusTemplateRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreatePrometheusTemplateResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 模板Id + TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreatePrometheusTemplateResponse) 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 *CreatePrometheusTemplateResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DNSConfig struct { + + // DNS 服务器IP地址列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + Nameservers []*string `json:"Nameservers,omitempty" name:"Nameservers"` + + // DNS搜索域列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + Searches []*string `json:"Searches,omitempty" name:"Searches"` + + // 对象选项列表,每个对象由name和value(可选)构成 + // 注意:此字段可能返回 null,表示取不到有效值。 + Options []*DNSConfigOption `json:"Options,omitempty" name:"Options"` +} + +type DNSConfigOption struct { + + // 配置项名称 + // 注意:此字段可能返回 null,表示取不到有效值。 + Name *string `json:"Name,omitempty" name:"Name"` + + // 项值 + // 注意:此字段可能返回 null,表示取不到有效值。 + Value *string `json:"Value,omitempty" name:"Value"` +} + +type DataDisk struct { + + // 云盘类型 + // 注意:此字段可能返回 null,表示取不到有效值。 + DiskType *string `json:"DiskType,omitempty" name:"DiskType"` + + // 文件系统(ext3/ext4/xfs) + // 注意:此字段可能返回 null,表示取不到有效值。 + FileSystem *string `json:"FileSystem,omitempty" name:"FileSystem"` + + // 云盘大小(G) + // 注意:此字段可能返回 null,表示取不到有效值。 + DiskSize *int64 `json:"DiskSize,omitempty" name:"DiskSize"` + + // 是否自动化格式盘并挂载 + // 注意:此字段可能返回 null,表示取不到有效值。 + AutoFormatAndMount *bool `json:"AutoFormatAndMount,omitempty" name:"AutoFormatAndMount"` + + // 挂载目录 + // 注意:此字段可能返回 null,表示取不到有效值。 + MountTarget *string `json:"MountTarget,omitempty" name:"MountTarget"` + + // 挂载设备名或分区名,当且仅当添加已有节点时需要 + // 注意:此字段可能返回 null,表示取不到有效值。 + DiskPartition *string `json:"DiskPartition,omitempty" name:"DiskPartition"` +} + +type DeleteClusterAsGroupsRequest struct { + *tchttp.BaseRequest + + // 集群ID,通过[DescribeClusters](https://cloud.tencent.com/document/api/457/31862)接口获取。 + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 集群伸缩组ID的列表 + AutoScalingGroupIds []*string `json:"AutoScalingGroupIds,omitempty" name:"AutoScalingGroupIds"` + + // 是否保留伸缩组中的节点(默认值: false(不保留)) + KeepInstance *bool `json:"KeepInstance,omitempty" name:"KeepInstance"` +} + +func (r *DeleteClusterAsGroupsRequest) 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 *DeleteClusterAsGroupsRequest) 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, "AutoScalingGroupIds") + delete(f, "KeepInstance") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteClusterAsGroupsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteClusterAsGroupsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteClusterAsGroupsResponse) 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 *DeleteClusterAsGroupsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteClusterEndpointRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 是否为外网访问(TRUE 外网访问 FALSE 内网访问,默认值: FALSE) + IsExtranet *bool `json:"IsExtranet,omitempty" name:"IsExtranet"` +} + +func (r *DeleteClusterEndpointRequest) 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 *DeleteClusterEndpointRequest) 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, "IsExtranet") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteClusterEndpointRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteClusterEndpointResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteClusterEndpointResponse) 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 *DeleteClusterEndpointResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteClusterEndpointVipRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *DeleteClusterEndpointVipRequest) 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 *DeleteClusterEndpointVipRequest) 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", "DeleteClusterEndpointVipRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteClusterEndpointVipResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteClusterEndpointVipResponse) 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 *DeleteClusterEndpointVipResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteClusterInstancesRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 主机InstanceId列表 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 集群实例删除时的策略:terminate(销毁实例,仅支持按量计费云主机实例) retain (仅移除,保留实例) + InstanceDeleteMode *string `json:"InstanceDeleteMode,omitempty" name:"InstanceDeleteMode"` + + // 是否强制删除(当节点在初始化时,可以指定参数为TRUE) + ForceDelete *bool `json:"ForceDelete,omitempty" name:"ForceDelete"` +} + +func (r *DeleteClusterInstancesRequest) 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 *DeleteClusterInstancesRequest) 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, "InstanceIds") + delete(f, "InstanceDeleteMode") + delete(f, "ForceDelete") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteClusterInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteClusterInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 删除成功的实例ID列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + SuccInstanceIds []*string `json:"SuccInstanceIds,omitempty" name:"SuccInstanceIds"` + + // 删除失败的实例ID列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + FailedInstanceIds []*string `json:"FailedInstanceIds,omitempty" name:"FailedInstanceIds"` + + // 未匹配到的实例ID列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + NotFoundInstanceIds []*string `json:"NotFoundInstanceIds,omitempty" name:"NotFoundInstanceIds"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteClusterInstancesResponse) 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 *DeleteClusterInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteClusterNodePoolRequest struct { + *tchttp.BaseRequest + + // 节点池对应的 ClusterId + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 需要删除的节点池 Id 列表 + NodePoolIds []*string `json:"NodePoolIds,omitempty" name:"NodePoolIds"` + + // 删除节点池时是否保留节点池内节点(节点仍然会被移出集群,但对应的实例不会被销毁) + KeepInstance *bool `json:"KeepInstance,omitempty" name:"KeepInstance"` +} + +func (r *DeleteClusterNodePoolRequest) 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 *DeleteClusterNodePoolRequest) 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, "NodePoolIds") + delete(f, "KeepInstance") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteClusterNodePoolRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteClusterNodePoolResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteClusterNodePoolResponse) 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 *DeleteClusterNodePoolResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteClusterRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 集群实例删除时的策略:terminate(销毁实例,仅支持按量计费云主机实例) retain (仅移除,保留实例) + InstanceDeleteMode *string `json:"InstanceDeleteMode,omitempty" name:"InstanceDeleteMode"` + + // 集群删除时资源的删除策略,目前支持CBS(默认保留CBS) + ResourceDeleteOptions []*ResourceDeleteOption `json:"ResourceDeleteOptions,omitempty" name:"ResourceDeleteOptions"` +} + +func (r *DeleteClusterRequest) 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 *DeleteClusterRequest) 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, "InstanceDeleteMode") + delete(f, "ResourceDeleteOptions") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteClusterRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteClusterResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteClusterResponse) 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 *DeleteClusterResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteClusterRouteRequest struct { + *tchttp.BaseRequest + + // 路由表名称。 + RouteTableName *string `json:"RouteTableName,omitempty" name:"RouteTableName"` + + // 下一跳地址。 + GatewayIp *string `json:"GatewayIp,omitempty" name:"GatewayIp"` + + // 目的端CIDR。 + DestinationCidrBlock *string `json:"DestinationCidrBlock,omitempty" name:"DestinationCidrBlock"` +} + +func (r *DeleteClusterRouteRequest) 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 *DeleteClusterRouteRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "RouteTableName") + delete(f, "GatewayIp") + delete(f, "DestinationCidrBlock") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteClusterRouteRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteClusterRouteResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteClusterRouteResponse) 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 *DeleteClusterRouteResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteClusterRouteTableRequest struct { + *tchttp.BaseRequest + + // 路由表名称 + RouteTableName *string `json:"RouteTableName,omitempty" name:"RouteTableName"` +} + +func (r *DeleteClusterRouteTableRequest) 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 *DeleteClusterRouteTableRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "RouteTableName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteClusterRouteTableRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteClusterRouteTableResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteClusterRouteTableResponse) 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 *DeleteClusterRouteTableResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteEKSClusterRequest struct { + *tchttp.BaseRequest + + // 弹性集群Id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *DeleteEKSClusterRequest) 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 *DeleteEKSClusterRequest) 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", "DeleteEKSClusterRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteEKSClusterResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteEKSClusterResponse) 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 *DeleteEKSClusterResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteEKSContainerInstancesRequest struct { + /*********PCM param************/ + RequestSource string `position:"Query" name:"RequestSource"` + ProviderId int32 `position:"Query" name:"ProviderId"` + AccountName string `position:"Query" name:"AccountName"` + Namespace string `position:"Query" name:"Namespace"` + ContainerGroupName string `position:"Query" name:"ContainerGroupName"` + RegionId string `position:"Query" name:"RegionId"` + /*********PCM param************/ + + *tchttp.BaseRequest + + // 需要删除的EksCi的Id。 最大数量不超过20 + EksCiIds []*string `json:"EksCiIds,omitempty" name:"EksCiIds"` + + // 是否释放为EksCi自动创建的Eip + ReleaseAutoCreatedEip *bool `json:"ReleaseAutoCreatedEip,omitempty" name:"ReleaseAutoCreatedEip"` +} + +func (r *DeleteEKSContainerInstancesRequest) 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 *DeleteEKSContainerInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "EksCiIds") + delete(f, "ReleaseAutoCreatedEip") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteEKSContainerInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteEKSContainerInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteEKSContainerInstancesResponse) 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 *DeleteEKSContainerInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeleteImageCachesRequest struct { + *tchttp.BaseRequest + + // 镜像缓存Id数组 + ImageCacheIds []*string `json:"ImageCacheIds,omitempty" name:"ImageCacheIds"` +} + +func (r *DeleteImageCachesRequest) 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 *DeleteImageCachesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ImageCacheIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteImageCachesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteImageCachesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteImageCachesResponse) 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 *DeleteImageCachesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeletePrometheusAlertRuleRequest struct { + *tchttp.BaseRequest + + // 实例id + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 告警规则id列表 + AlertIds []*string `json:"AlertIds,omitempty" name:"AlertIds"` +} + +func (r *DeletePrometheusAlertRuleRequest) 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 *DeletePrometheusAlertRuleRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceId") + delete(f, "AlertIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeletePrometheusAlertRuleRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeletePrometheusAlertRuleResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeletePrometheusAlertRuleResponse) 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 *DeletePrometheusAlertRuleResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeletePrometheusTemplateRequest struct { + *tchttp.BaseRequest + + // 模板id + TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"` +} + +func (r *DeletePrometheusTemplateRequest) 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 *DeletePrometheusTemplateRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "TemplateId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeletePrometheusTemplateRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeletePrometheusTemplateResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeletePrometheusTemplateResponse) 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 *DeletePrometheusTemplateResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DeletePrometheusTemplateSyncRequest struct { + *tchttp.BaseRequest + + // 模板id + TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"` + + // 取消同步的对象列表 + Targets []*PrometheusTemplateSyncTarget `json:"Targets,omitempty" name:"Targets"` +} + +func (r *DeletePrometheusTemplateSyncRequest) 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 *DeletePrometheusTemplateSyncRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "TemplateId") + delete(f, "Targets") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeletePrometheusTemplateSyncRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeletePrometheusTemplateSyncResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeletePrometheusTemplateSyncResponse) 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 *DeletePrometheusTemplateSyncResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAvailableClusterVersionRequest struct { + *tchttp.BaseRequest + + // 集群 Id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 集群 Id 列表 + ClusterIds []*string `json:"ClusterIds,omitempty" name:"ClusterIds"` +} + +func (r *DescribeAvailableClusterVersionRequest) 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 *DescribeAvailableClusterVersionRequest) 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, "ClusterIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAvailableClusterVersionRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeAvailableClusterVersionResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 可升级的集群版本号 + // 注意:此字段可能返回 null,表示取不到有效值。 + Versions []*string `json:"Versions,omitempty" name:"Versions"` + + // 集群信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + Clusters []*ClusterVersion `json:"Clusters,omitempty" name:"Clusters"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeAvailableClusterVersionResponse) 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 *DescribeAvailableClusterVersionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterAsGroupOptionRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *DescribeClusterAsGroupOptionRequest) 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 *DescribeClusterAsGroupOptionRequest) 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", "DescribeClusterAsGroupOptionRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterAsGroupOptionResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 集群弹性伸缩属性 + // 注意:此字段可能返回 null,表示取不到有效值。 + ClusterAsGroupOption *ClusterAsGroupOption `json:"ClusterAsGroupOption,omitempty" name:"ClusterAsGroupOption"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClusterAsGroupOptionResponse) 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 *DescribeClusterAsGroupOptionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterAsGroupsRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 伸缩组ID列表,如果为空,表示拉取集群关联的所有伸缩组。 + AutoScalingGroupIds []*string `json:"AutoScalingGroupIds,omitempty" name:"AutoScalingGroupIds"` + + // 偏移量,默认为0。关于Offset的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。关于Limit的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeClusterAsGroupsRequest) 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 *DescribeClusterAsGroupsRequest) 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, "AutoScalingGroupIds") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterAsGroupsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterAsGroupsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 集群关联的伸缩组总数 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 集群关联的伸缩组列表 + ClusterAsGroupSet []*ClusterAsGroup `json:"ClusterAsGroupSet,omitempty" name:"ClusterAsGroupSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClusterAsGroupsResponse) 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 *DescribeClusterAsGroupsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterAuthenticationOptionsRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *DescribeClusterAuthenticationOptionsRequest) 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 *DescribeClusterAuthenticationOptionsRequest) 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", "DescribeClusterAuthenticationOptionsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterAuthenticationOptionsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // ServiceAccount认证配置 + // 注意:此字段可能返回 null,表示取不到有效值。 + ServiceAccounts *ServiceAccountAuthenticationOptions `json:"ServiceAccounts,omitempty" name:"ServiceAccounts"` + + // 最近一次修改操作结果,返回值可能为:Updating,Success,Failed,TimeOut + // 注意:此字段可能返回 null,表示取不到有效值。 + LatestOperationState *string `json:"LatestOperationState,omitempty" name:"LatestOperationState"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClusterAuthenticationOptionsResponse) 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 *DescribeClusterAuthenticationOptionsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterCommonNamesRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 子账户列表,不可超出最大值50 + SubaccountUins []*string `json:"SubaccountUins,omitempty" name:"SubaccountUins"` + + // 角色ID列表,不可超出最大值50 + RoleIds []*string `json:"RoleIds,omitempty" name:"RoleIds"` +} + +func (r *DescribeClusterCommonNamesRequest) 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 *DescribeClusterCommonNamesRequest) 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, "SubaccountUins") + delete(f, "RoleIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterCommonNamesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterCommonNamesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 子账户Uin与其客户端证书的CN字段映射 + CommonNames []*CommonName `json:"CommonNames,omitempty" name:"CommonNames"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClusterCommonNamesResponse) 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 *DescribeClusterCommonNamesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterControllersRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *DescribeClusterControllersRequest) 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 *DescribeClusterControllersRequest) 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", "DescribeClusterControllersRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterControllersResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 描述集群中各个控制器的状态 + ControllerStatusSet []*ControllerStatus `json:"ControllerStatusSet,omitempty" name:"ControllerStatusSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClusterControllersResponse) 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 *DescribeClusterControllersResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterEndpointStatusRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 是否为外网访问(TRUE 外网访问 FALSE 内网访问,默认值: FALSE) + IsExtranet *bool `json:"IsExtranet,omitempty" name:"IsExtranet"` +} + +func (r *DescribeClusterEndpointStatusRequest) 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 *DescribeClusterEndpointStatusRequest) 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, "IsExtranet") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterEndpointStatusRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterEndpointStatusResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 查询集群访问端口状态(Created 开启成功,Creating 开启中,NotFound 未开启) + // 注意:此字段可能返回 null,表示取不到有效值。 + Status *string `json:"Status,omitempty" name:"Status"` + + // 开启访问入口失败信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + ErrorMsg *string `json:"ErrorMsg,omitempty" name:"ErrorMsg"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClusterEndpointStatusResponse) 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 *DescribeClusterEndpointStatusResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterEndpointVipStatusRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *DescribeClusterEndpointVipStatusRequest) 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 *DescribeClusterEndpointVipStatusRequest) 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", "DescribeClusterEndpointVipStatusRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterEndpointVipStatusResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 端口操作状态 (Creating 创建中 CreateFailed 创建失败 Created 创建完成 Deleting 删除中 DeletedFailed 删除失败 Deleted 已删除 NotFound 未发现操作 ) + Status *string `json:"Status,omitempty" name:"Status"` + + // 操作失败的原因 + // 注意:此字段可能返回 null,表示取不到有效值。 + ErrorMsg *string `json:"ErrorMsg,omitempty" name:"ErrorMsg"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClusterEndpointVipStatusResponse) 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 *DescribeClusterEndpointVipStatusResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterInstancesRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 偏移量,默认为0。关于Offset的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。关于Limit的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` + + // 需要获取的节点实例Id列表。如果为空,表示拉取集群下所有节点实例。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 节点角色, MASTER, WORKER, ETCD, MASTER_ETCD,ALL, 默认为WORKER。默认为WORKER类型。 + InstanceRole *string `json:"InstanceRole,omitempty" name:"InstanceRole"` + + // 过滤条件列表;Name的可选值为nodepool-id、nodepool-instance-type;Name为nodepool-id表示根据节点池id过滤机器,Value的值为具体的节点池id,Name为nodepool-instance-type表示节点加入节点池的方式,Value的值为MANUALLY_ADDED(手动加入节点池)、AUTOSCALING_ADDED(伸缩组扩容方式加入节点池)、ALL(手动加入节点池 和 伸缩组扩容方式加入节点池) + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` +} + +func (r *DescribeClusterInstancesRequest) 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 *DescribeClusterInstancesRequest) 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, "Offset") + delete(f, "Limit") + delete(f, "InstanceIds") + delete(f, "InstanceRole") + delete(f, "Filters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 集群中实例总数 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 集群中实例列表 + InstanceSet []*Instance `json:"InstanceSet,omitempty" name:"InstanceSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClusterInstancesResponse) 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 *DescribeClusterInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterKubeconfigRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 默认false 获取内网,是否获取外网访问的kubeconfig + IsExtranet *bool `json:"IsExtranet,omitempty" name:"IsExtranet"` +} + +func (r *DescribeClusterKubeconfigRequest) 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 *DescribeClusterKubeconfigRequest) 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, "IsExtranet") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterKubeconfigRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterKubeconfigResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 子账户kubeconfig文件,可用于直接访问集群kube-apiserver + Kubeconfig *string `json:"Kubeconfig,omitempty" name:"Kubeconfig"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClusterKubeconfigResponse) 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 *DescribeClusterKubeconfigResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterNodePoolDetailRequest struct { + *tchttp.BaseRequest + + // 集群id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 节点池id + NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` +} + +func (r *DescribeClusterNodePoolDetailRequest) 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 *DescribeClusterNodePoolDetailRequest) 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, "NodePoolId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterNodePoolDetailRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterNodePoolDetailResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 节点池详情 + NodePool *NodePool `json:"NodePool,omitempty" name:"NodePool"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClusterNodePoolDetailResponse) 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 *DescribeClusterNodePoolDetailResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterNodePoolsRequest struct { + *tchttp.BaseRequest + + // ClusterId(集群id) + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // · NodePoolsName + // 按照【节点池名】进行过滤。 + // 类型:String + // 必选:否 + // + // · NodePoolsId + // 按照【节点池id】进行过滤。 + // 类型:String + // 必选:否 + // + // · tags + // 按照【标签键值对】进行过滤。 + // 类型:String + // 必选:否 + // + // · tag:tag-key + // 按照【标签键值对】进行过滤。 + // 类型:String + // 必选:否 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` +} + +func (r *DescribeClusterNodePoolsRequest) 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 *DescribeClusterNodePoolsRequest) 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, "Filters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterNodePoolsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterNodePoolsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // NodePools(节点池列表) + // 注意:此字段可能返回 null,表示取不到有效值。 + NodePoolSet []*NodePool `json:"NodePoolSet,omitempty" name:"NodePoolSet"` + + // 资源总数 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClusterNodePoolsResponse) 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 *DescribeClusterNodePoolsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterRouteTablesRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeClusterRouteTablesRequest) 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 *DescribeClusterRouteTablesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterRouteTablesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterRouteTablesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的实例数量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 集群路由表对象。 + RouteTableSet []*RouteTableInfo `json:"RouteTableSet,omitempty" name:"RouteTableSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClusterRouteTablesResponse) 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 *DescribeClusterRouteTablesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterRoutesRequest struct { + *tchttp.BaseRequest + + // 路由表名称。 + RouteTableName *string `json:"RouteTableName,omitempty" name:"RouteTableName"` + + // 过滤条件,当前只支持按照单个条件GatewayIP进行过滤(可选) + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` +} + +func (r *DescribeClusterRoutesRequest) 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 *DescribeClusterRoutesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "RouteTableName") + delete(f, "Filters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterRoutesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterRoutesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 符合条件的实例数量。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 集群路由对象。 + RouteSet []*RouteInfo `json:"RouteSet,omitempty" name:"RouteSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClusterRoutesResponse) 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 *DescribeClusterRoutesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterSecurityRequest struct { + *tchttp.BaseRequest + + // 集群 ID,请填写 查询集群列表 接口中返回的 clusterId 字段 + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *DescribeClusterSecurityRequest) 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 *DescribeClusterSecurityRequest) 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", "DescribeClusterSecurityRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterSecurityResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 集群的账号名称 + UserName *string `json:"UserName,omitempty" name:"UserName"` + + // 集群的访问密码 + Password *string `json:"Password,omitempty" name:"Password"` + + // 集群访问CA证书 + CertificationAuthority *string `json:"CertificationAuthority,omitempty" name:"CertificationAuthority"` + + // 集群访问的地址 + ClusterExternalEndpoint *string `json:"ClusterExternalEndpoint,omitempty" name:"ClusterExternalEndpoint"` + + // 集群访问的域名 + Domain *string `json:"Domain,omitempty" name:"Domain"` + + // 集群Endpoint地址 + PgwEndpoint *string `json:"PgwEndpoint,omitempty" name:"PgwEndpoint"` + + // 集群访问策略组 + // 注意:此字段可能返回 null,表示取不到有效值。 + SecurityPolicy []*string `json:"SecurityPolicy,omitempty" name:"SecurityPolicy"` + + // 集群Kubeconfig文件 + // 注意:此字段可能返回 null,表示取不到有效值。 + Kubeconfig *string `json:"Kubeconfig,omitempty" name:"Kubeconfig"` + + // 集群JnsGw的访问地址 + // 注意:此字段可能返回 null,表示取不到有效值。 + JnsGwEndpoint *string `json:"JnsGwEndpoint,omitempty" name:"JnsGwEndpoint"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClusterSecurityResponse) 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 *DescribeClusterSecurityResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterStatusRequest struct { + *tchttp.BaseRequest + + // 集群ID列表,不传默认拉取所有集群 + ClusterIds []*string `json:"ClusterIds,omitempty" name:"ClusterIds"` +} + +func (r *DescribeClusterStatusRequest) 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 *DescribeClusterStatusRequest) 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", "DescribeClusterStatusRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterStatusResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 集群状态列表 + ClusterStatusSet []*ClusterStatus `json:"ClusterStatusSet,omitempty" name:"ClusterStatusSet"` + + // 集群个数 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClusterStatusResponse) 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 *DescribeClusterStatusResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClustersRequest struct { + *tchttp.BaseRequest + + // 集群ID列表(为空时, + // 表示获取账号下所有集群) + ClusterIds []*string `json:"ClusterIds,omitempty" name:"ClusterIds"` + + // 偏移量,默认0 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` + + // 最大输出条数,默认20,最大为100 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` + + // · ClusterName + // 按照【集群名】进行过滤。 + // 类型:String + // 必选:否 + // + // · ClusterType + // 按照【集群类型】进行过滤。 + // 类型:String + // 必选:否 + // + // · ClusterStatus + // 按照【集群状态】进行过滤。 + // 类型:String + // 必选:否 + // + // · Tags + // 按照【标签键值对】进行过滤。 + // 类型:String + // 必选:否 + // + // · vpc-id + // 按照【VPC】进行过滤。 + // 类型:String + // 必选:否 + // + // · tag-key + // 按照【标签键】进行过滤。 + // 类型:String + // 必选:否 + // + // · tag-value + // 按照【标签值】进行过滤。 + // 类型:String + // 必选:否 + // + // · tag:tag-key + // 按照【标签键值对】进行过滤。 + // 类型:String + // 必选:否 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 集群类型,例如:MANAGED_CLUSTER + ClusterType *string `json:"ClusterType,omitempty" name:"ClusterType"` +} + +func (r *DescribeClustersRequest) 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 *DescribeClustersRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterIds") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "Filters") + delete(f, "ClusterType") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClustersRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClustersResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 集群总个数 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 集群信息列表 + Clusters []*Cluster `json:"Clusters,omitempty" name:"Clusters"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClustersResponse) 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 *DescribeClustersResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEKSClusterCredentialRequest struct { + *tchttp.BaseRequest + + // 集群Id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *DescribeEKSClusterCredentialRequest) 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 *DescribeEKSClusterCredentialRequest) 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", "DescribeEKSClusterCredentialRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEKSClusterCredentialResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 集群的接入地址信息 + Addresses []*IPAddress `json:"Addresses,omitempty" name:"Addresses"` + + // 集群的认证信息 + Credential *ClusterCredential `json:"Credential,omitempty" name:"Credential"` + + // 集群的公网访问信息 + PublicLB *ClusterPublicLB `json:"PublicLB,omitempty" name:"PublicLB"` + + // 集群的内网访问信息 + InternalLB *ClusterInternalLB `json:"InternalLB,omitempty" name:"InternalLB"` + + // 标记是否新的内外网功能 + ProxyLB *bool `json:"ProxyLB,omitempty" name:"ProxyLB"` + + // 连接用户集群k8s 的Config + Kubeconfig *string `json:"Kubeconfig,omitempty" name:"Kubeconfig"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeEKSClusterCredentialResponse) 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 *DescribeEKSClusterCredentialResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEKSClustersRequest struct { + *tchttp.BaseRequest + + // 集群ID列表(为空时, + // 表示获取账号下所有集群) + ClusterIds []*string `json:"ClusterIds,omitempty" name:"ClusterIds"` + + // 偏移量,默认0 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 最大输出条数,默认20 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + + // 过滤条件,当前只支持按照单个条件ClusterName进行过滤 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` +} + +func (r *DescribeEKSClustersRequest) 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 *DescribeEKSClustersRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterIds") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "Filters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeEKSClustersRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEKSClustersResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 集群总个数 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 集群信息列表 + Clusters []*EksCluster `json:"Clusters,omitempty" name:"Clusters"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeEKSClustersResponse) 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 *DescribeEKSClustersResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEKSContainerInstanceEventRequest struct { + *tchttp.BaseRequest + + // 容器实例id + EksCiId *string `json:"EksCiId,omitempty" name:"EksCiId"` + + // 最大事件数量。默认为50,最大取值100。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribeEKSContainerInstanceEventRequest) 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 *DescribeEKSContainerInstanceEventRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "EksCiId") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeEKSContainerInstanceEventRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEKSContainerInstanceEventResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 事件集合 + Events []*Event `json:"Events,omitempty" name:"Events"` + + // 容器实例id + EksCiId *string `json:"EksCiId,omitempty" name:"EksCiId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeEKSContainerInstanceEventResponse) 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 *DescribeEKSContainerInstanceEventResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEKSContainerInstanceRegionsRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeEKSContainerInstanceRegionsRequest) 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 *DescribeEKSContainerInstanceRegionsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeEKSContainerInstanceRegionsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEKSContainerInstanceRegionsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // EKS Container Instance支持的地域信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + Regions []*EksCiRegionInfo `json:"Regions,omitempty" name:"Regions"` + + // 总数 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeEKSContainerInstanceRegionsResponse) 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 *DescribeEKSContainerInstanceRegionsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEKSContainerInstancesRequest struct { + /*********PCM param************/ + RequestSource string `position:"Query" name:"RequestSource"` + ProviderId int32 `position:"Query" name:"ProviderId"` + AccountName string `position:"Query" name:"AccountName"` + Namespace string `position:"Query" name:"Namespace"` + /*********PCM param************/ + + *tchttp.BaseRequest + + // 限定此次返回资源的数量。如果不设定,默认返回20,最大不能超过100 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + + // 偏移量,默认0 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 过滤条件,可条件: + // (1)实例名称 + // KeyName: eks-ci-name + // 类型:String + // + // (2)实例状态 + // KeyName: status + // 类型:String + // 可选值:"Pending", "Running", "Succeeded", "Failed" + // + // (3)内网ip + // KeyName: private-ip + // 类型:String + // + // (4)EIP地址 + // KeyName: eip-address + // 类型:String + // + // (5)VpcId + // KeyName: vpc-id + // 类型:String + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 容器实例 ID 数组 + EksCiIds []*string `json:"EksCiIds,omitempty" name:"EksCiIds"` +} + +func (r *DescribeEKSContainerInstancesRequest) 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 *DescribeEKSContainerInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Limit") + delete(f, "Offset") + delete(f, "Filters") + delete(f, "EksCiIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeEKSContainerInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEKSContainerInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 容器组总数 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 容器组列表 + EksCis []*EksCi `json:"EksCis,omitempty" name:"EksCis"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeEKSContainerInstancesResponse) 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 *DescribeEKSContainerInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEksContainerInstanceLogRequest struct { + *tchttp.BaseRequest + + // Eks Container Instance Id,即容器实例Id + EksCiId *string `json:"EksCiId,omitempty" name:"EksCiId"` + + // 容器名称,单容器的实例可选填。如果为多容器实例,请指定容器名称。 + ContainerName *string `json:"ContainerName,omitempty" name:"ContainerName"` + + // 返回最新日志行数,默认500,最大2000。日志内容最大返回 1M 数据。 + Tail *uint64 `json:"Tail,omitempty" name:"Tail"` + + // UTC时间,RFC3339标准 + StartTime *string `json:"StartTime,omitempty" name:"StartTime"` + + // 是否是查上一个容器(如果容器退出重启了) + Previous *bool `json:"Previous,omitempty" name:"Previous"` + + // 查询最近多少秒内的日志 + SinceSeconds *uint64 `json:"SinceSeconds,omitempty" name:"SinceSeconds"` + + // 日志总大小限制 + LimitBytes *uint64 `json:"LimitBytes,omitempty" name:"LimitBytes"` +} + +func (r *DescribeEksContainerInstanceLogRequest) 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 *DescribeEksContainerInstanceLogRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "EksCiId") + delete(f, "ContainerName") + delete(f, "Tail") + delete(f, "StartTime") + delete(f, "Previous") + delete(f, "SinceSeconds") + delete(f, "LimitBytes") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeEksContainerInstanceLogRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEksContainerInstanceLogResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 容器名称 + ContainerName *string `json:"ContainerName,omitempty" name:"ContainerName"` + + // 日志内容 + LogContent *string `json:"LogContent,omitempty" name:"LogContent"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeEksContainerInstanceLogResponse) 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 *DescribeEksContainerInstanceLogResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEnableVpcCniProgressRequest struct { + *tchttp.BaseRequest + + // 开启vpc-cni的集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *DescribeEnableVpcCniProgressRequest) 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 *DescribeEnableVpcCniProgressRequest) 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", "DescribeEnableVpcCniProgressRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEnableVpcCniProgressResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 任务进度的描述:Running/Succeed/Failed + Status *string `json:"Status,omitempty" name:"Status"` + + // 当任务进度为Failed时,对任务状态的进一步描述,例如IPAMD组件安装失败 + // 注意:此字段可能返回 null,表示取不到有效值。 + ErrorMessage *string `json:"ErrorMessage,omitempty" name:"ErrorMessage"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeEnableVpcCniProgressResponse) 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 *DescribeEnableVpcCniProgressResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeExistedInstancesRequest struct { + *tchttp.BaseRequest + + // 集群 ID,请填写查询集群列表 接口中返回的 ClusterId 字段(仅通过ClusterId获取需要过滤条件中的VPCID。节点状态比较时会使用该地域下所有集群中的节点进行比较。参数不支持同时指定InstanceIds和ClusterId。 + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 按照一个或者多个实例ID查询。实例ID形如:ins-xxxxxxxx。(此参数的具体格式可参考API简介的id.N一节)。每次请求的实例的上限为100。参数不支持同时指定InstanceIds和Filters。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 过滤条件,字段和详见[CVM查询实例](https://cloud.tencent.com/document/api/213/15728)如果设置了ClusterId,会附加集群的VPCID作为查询字段,在此情况下如果在Filter中指定了"vpc-id"作为过滤字段,指定的VPCID必须与集群的VPCID相同。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 实例IP进行过滤(同时支持内网IP和外网IP) + VagueIpAddress *string `json:"VagueIpAddress,omitempty" name:"VagueIpAddress"` + + // 实例名称进行过滤 + VagueInstanceName *string `json:"VagueInstanceName,omitempty" name:"VagueInstanceName"` + + // 偏移量,默认为0。关于Offset的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 返回数量,默认为20,最大值为100。关于Limit的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + + // 根据多个实例IP进行过滤 + IpAddresses []*string `json:"IpAddresses,omitempty" name:"IpAddresses"` +} + +func (r *DescribeExistedInstancesRequest) 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 *DescribeExistedInstancesRequest) 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, "InstanceIds") + delete(f, "Filters") + delete(f, "VagueIpAddress") + delete(f, "VagueInstanceName") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "IpAddresses") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeExistedInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeExistedInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 已经存在的实例信息数组。 + // 注意:此字段可能返回 null,表示取不到有效值。 + ExistedInstanceSet []*ExistedInstance `json:"ExistedInstanceSet,omitempty" name:"ExistedInstanceSet"` + + // 符合条件的实例数量。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeExistedInstancesResponse) 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 *DescribeExistedInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeExternalClusterSpecRequest struct { + *tchttp.BaseRequest + + // 注册集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 默认false 获取内网,是否获取外网版注册命令 + IsExtranet *bool `json:"IsExtranet,omitempty" name:"IsExtranet"` + + // 默认false 不刷新有效时间 ,true刷新有效时间 + IsRefreshExpirationTime *bool `json:"IsRefreshExpirationTime,omitempty" name:"IsRefreshExpirationTime"` +} + +func (r *DescribeExternalClusterSpecRequest) 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 *DescribeExternalClusterSpecRequest) 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, "IsExtranet") + delete(f, "IsRefreshExpirationTime") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeExternalClusterSpecRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeExternalClusterSpecResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 导入第三方集群YAML定义 + Spec *string `json:"Spec,omitempty" name:"Spec"` + + // agent.yaml文件过期时间字符串,时区UTC + Expiration *string `json:"Expiration,omitempty" name:"Expiration"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeExternalClusterSpecResponse) 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 *DescribeExternalClusterSpecResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeImageCachesRequest struct { + *tchttp.BaseRequest + + // 镜像缓存Id数组 + ImageCacheIds []*string `json:"ImageCacheIds,omitempty" name:"ImageCacheIds"` + + // 镜像缓存名称数组 + ImageCacheNames []*string `json:"ImageCacheNames,omitempty" name:"ImageCacheNames"` + + // 限定此次返回资源的数量。如果不设定,默认返回20,最大不能超过50 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + + // 偏移量,默认0 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 过滤条件,可选条件: + // (1)实例名称 + // KeyName: image-cache-name + // 类型:String + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` +} + +func (r *DescribeImageCachesRequest) 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 *DescribeImageCachesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ImageCacheIds") + delete(f, "ImageCacheNames") + delete(f, "Limit") + delete(f, "Offset") + delete(f, "Filters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeImageCachesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeImageCachesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 镜像缓存总数 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 镜像缓存信息列表 + ImageCaches []*ImageCache `json:"ImageCaches,omitempty" name:"ImageCaches"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeImageCachesResponse) 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 *DescribeImageCachesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeImagesRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeImagesRequest) 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 *DescribeImagesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeImagesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeImagesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 镜像数量 + // 注意:此字段可能返回 null,表示取不到有效值。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 镜像信息列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + ImageInstanceSet []*ImageInstance `json:"ImageInstanceSet,omitempty" name:"ImageInstanceSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeImagesResponse) 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 *DescribeImagesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusAgentInstancesRequest struct { + *tchttp.BaseRequest + + // 集群id + // 可以是tke, eks, edge的集群id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *DescribePrometheusAgentInstancesRequest) 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 *DescribePrometheusAgentInstancesRequest) 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", "DescribePrometheusAgentInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusAgentInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 关联该集群的实例列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + Instances []*string `json:"Instances,omitempty" name:"Instances"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribePrometheusAgentInstancesResponse) 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 *DescribePrometheusAgentInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusAgentsRequest struct { + *tchttp.BaseRequest + + // 实例id + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 用于分页 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 用于分页 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribePrometheusAgentsRequest) 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 *DescribePrometheusAgentsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceId") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePrometheusAgentsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusAgentsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 被关联集群信息 + Agents []*PrometheusAgentOverview `json:"Agents,omitempty" name:"Agents"` + + // 被关联集群总量 + Total *uint64 `json:"Total,omitempty" name:"Total"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribePrometheusAgentsResponse) 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 *DescribePrometheusAgentsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusAlertHistoryRequest struct { + *tchttp.BaseRequest + + // 实例id + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 告警名称 + RuleName *string `json:"RuleName,omitempty" name:"RuleName"` + + // 开始时间 + StartTime *string `json:"StartTime,omitempty" name:"StartTime"` + + // 结束时间 + EndTime *string `json:"EndTime,omitempty" name:"EndTime"` + + // label集合 + Labels *string `json:"Labels,omitempty" name:"Labels"` + + // 分片 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 分片 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribePrometheusAlertHistoryRequest) 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 *DescribePrometheusAlertHistoryRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceId") + delete(f, "RuleName") + delete(f, "StartTime") + delete(f, "EndTime") + delete(f, "Labels") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePrometheusAlertHistoryRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusAlertHistoryResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 告警历史 + Items []*PrometheusAlertHistoryItem `json:"Items,omitempty" name:"Items"` + + // 总数 + Total *uint64 `json:"Total,omitempty" name:"Total"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribePrometheusAlertHistoryResponse) 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 *DescribePrometheusAlertHistoryResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusAlertRuleRequest struct { + *tchttp.BaseRequest + + // 实例id + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 分页 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 分页 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + + // 过滤 + // 支持ID,Name + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` +} + +func (r *DescribePrometheusAlertRuleRequest) 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 *DescribePrometheusAlertRuleRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceId") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "Filters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePrometheusAlertRuleRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusAlertRuleResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 告警详情 + AlertRules []*PrometheusAlertRuleDetail `json:"AlertRules,omitempty" name:"AlertRules"` + + // 总数 + Total *uint64 `json:"Total,omitempty" name:"Total"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribePrometheusAlertRuleResponse) 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 *DescribePrometheusAlertRuleResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusInstanceRequest struct { + *tchttp.BaseRequest + + // 实例id + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` +} + +func (r *DescribePrometheusInstanceRequest) 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 *DescribePrometheusInstanceRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePrometheusInstanceRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusInstanceResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 实例id + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 实例名称 + Name *string `json:"Name,omitempty" name:"Name"` + + // 私有网络id + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 子网id + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // cos桶名称 + COSBucket *string `json:"COSBucket,omitempty" name:"COSBucket"` + + // 数据查询地址 + QueryAddress *string `json:"QueryAddress,omitempty" name:"QueryAddress"` + + // 实例中grafana相关的信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + Grafana *PrometheusGrafanaInfo `json:"Grafana,omitempty" name:"Grafana"` + + // 用户自定义alertmanager + // 注意:此字段可能返回 null,表示取不到有效值。 + AlertManagerUrl *string `json:"AlertManagerUrl,omitempty" name:"AlertManagerUrl"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribePrometheusInstanceResponse) 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 *DescribePrometheusInstanceResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusOverviewsRequest struct { + *tchttp.BaseRequest + + // 用于分页 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 用于分页 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + + // 过滤实例,目前支持: + // ID: 通过实例ID来过滤 + // Name: 通过实例名称来过滤 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` +} + +func (r *DescribePrometheusOverviewsRequest) 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 *DescribePrometheusOverviewsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Offset") + delete(f, "Limit") + delete(f, "Filters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePrometheusOverviewsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusOverviewsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 实例列表 + Instances []*PrometheusInstanceOverview `json:"Instances,omitempty" name:"Instances"` + + // 实例总数 + // 注意:此字段可能返回 null,表示取不到有效值。 + Total *uint64 `json:"Total,omitempty" name:"Total"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribePrometheusOverviewsResponse) 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 *DescribePrometheusOverviewsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusTargetsRequest struct { + *tchttp.BaseRequest + + // 实例id + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 集群类型 + ClusterType *string `json:"ClusterType,omitempty" name:"ClusterType"` + + // 集群id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 过滤条件,当前支持 + // Name=state + // Value=up, down, unknown + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` +} + +func (r *DescribePrometheusTargetsRequest) 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 *DescribePrometheusTargetsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceId") + delete(f, "ClusterType") + delete(f, "ClusterId") + delete(f, "Filters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePrometheusTargetsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusTargetsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 所有Job的targets信息 + Jobs []*PrometheusJobTargets `json:"Jobs,omitempty" name:"Jobs"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribePrometheusTargetsResponse) 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 *DescribePrometheusTargetsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusTemplateSyncRequest struct { + *tchttp.BaseRequest + + // 模板ID + TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"` +} + +func (r *DescribePrometheusTemplateSyncRequest) 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 *DescribePrometheusTemplateSyncRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "TemplateId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePrometheusTemplateSyncRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusTemplateSyncResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 同步目标详情 + Targets []*PrometheusTemplateSyncTarget `json:"Targets,omitempty" name:"Targets"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribePrometheusTemplateSyncResponse) 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 *DescribePrometheusTemplateSyncResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusTemplatesRequest struct { + *tchttp.BaseRequest + + // 模糊过滤条件,支持 + // Level 按模板级别过滤 + // Name 按名称过滤 + // Describe 按描述过滤 + // ID 按templateId过滤 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 分页偏移 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 总数限制 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` +} + +func (r *DescribePrometheusTemplatesRequest) 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 *DescribePrometheusTemplatesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Filters") + delete(f, "Offset") + delete(f, "Limit") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribePrometheusTemplatesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribePrometheusTemplatesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 模板列表 + Templates []*PrometheusTemplate `json:"Templates,omitempty" name:"Templates"` + + // 总数 + Total *uint64 `json:"Total,omitempty" name:"Total"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribePrometheusTemplatesResponse) 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 *DescribePrometheusTemplatesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeRegionsRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeRegionsRequest) 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 *DescribeRegionsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeRegionsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeRegionsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 地域的数量 + // 注意:此字段可能返回 null,表示取不到有效值。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 地域列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + RegionInstanceSet []*RegionInstance `json:"RegionInstanceSet,omitempty" name:"RegionInstanceSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeRegionsResponse) 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 *DescribeRegionsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeRouteTableConflictsRequest struct { + *tchttp.BaseRequest + + // 路由表CIDR + RouteTableCidrBlock *string `json:"RouteTableCidrBlock,omitempty" name:"RouteTableCidrBlock"` + + // 路由表绑定的VPC + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` +} + +func (r *DescribeRouteTableConflictsRequest) 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 *DescribeRouteTableConflictsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "RouteTableCidrBlock") + delete(f, "VpcId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeRouteTableConflictsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeRouteTableConflictsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 路由表是否冲突。 + HasConflict *bool `json:"HasConflict,omitempty" name:"HasConflict"` + + // 路由表冲突列表。 + // 注意:此字段可能返回 null,表示取不到有效值。 + RouteTableConflictSet []*RouteTableConflict `json:"RouteTableConflictSet,omitempty" name:"RouteTableConflictSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeRouteTableConflictsResponse) 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 *DescribeRouteTableConflictsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeTKEEdgeScriptRequest struct { + *tchttp.BaseRequest + + // 集群id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 网卡名 + Interface *string `json:"Interface,omitempty" name:"Interface"` + + // 节点名字 + NodeName *string `json:"NodeName,omitempty" name:"NodeName"` + + // json格式的节点配置 + Config *string `json:"Config,omitempty" name:"Config"` +} + +func (r *DescribeTKEEdgeScriptRequest) 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 *DescribeTKEEdgeScriptRequest) 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, "Interface") + delete(f, "NodeName") + delete(f, "Config") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeTKEEdgeScriptRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeTKEEdgeScriptResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeTKEEdgeScriptResponse) 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 *DescribeTKEEdgeScriptResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVersionsRequest struct { + *tchttp.BaseRequest +} + +func (r *DescribeVersionsRequest) 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 *DescribeVersionsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeVersionsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVersionsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 版本数量 + // 注意:此字段可能返回 null,表示取不到有效值。 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 版本列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + VersionInstanceSet []*VersionInstance `json:"VersionInstanceSet,omitempty" name:"VersionInstanceSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeVersionsResponse) 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 *DescribeVersionsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpcCniPodLimitsRequest struct { + *tchttp.BaseRequest + + // 查询的机型所在可用区,如:ap-guangzhou-3,默认为空,即不按可用区过滤信息 + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 查询的实例机型系列信息,如:S5,默认为空,即不按机型系列过滤信息 + InstanceFamily *string `json:"InstanceFamily,omitempty" name:"InstanceFamily"` + + // 查询的实例机型信息,如:S5.LARGE8,默认为空,即不按机型过滤信息 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` +} + +func (r *DescribeVpcCniPodLimitsRequest) 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 *DescribeVpcCniPodLimitsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Zone") + delete(f, "InstanceFamily") + delete(f, "InstanceType") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeVpcCniPodLimitsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeVpcCniPodLimitsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 机型数据数量 + // 注意:此字段可能返回 null,表示取不到有效值。 + TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 机型信息及其可支持的最大VPC-CNI模式Pod数量信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + PodLimitsInstanceSet []*PodLimitsInstance `json:"PodLimitsInstanceSet,omitempty" name:"PodLimitsInstanceSet"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeVpcCniPodLimitsResponse) 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 *DescribeVpcCniPodLimitsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DisableClusterDeletionProtectionRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *DisableClusterDeletionProtectionRequest) 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 *DisableClusterDeletionProtectionRequest) 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", "DisableClusterDeletionProtectionRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DisableClusterDeletionProtectionResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DisableClusterDeletionProtectionResponse) 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 *DisableClusterDeletionProtectionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DisableVpcCniNetworkTypeRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *DisableVpcCniNetworkTypeRequest) 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 *DisableVpcCniNetworkTypeRequest) 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", "DisableVpcCniNetworkTypeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DisableVpcCniNetworkTypeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DisableVpcCniNetworkTypeResponse) 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 *DisableVpcCniNetworkTypeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DnsServerConf struct { + + // 域名。空字符串表示所有域名。 + Domain *string `json:"Domain,omitempty" name:"Domain"` + + // dns 服务器地址列表。地址格式 ip:port + DnsServers []*string `json:"DnsServers,omitempty" name:"DnsServers"` +} + +type EipAttribute struct { + + // 容器实例删除后,EIP是否释放。 + // Never表示不释放,其他任意值(包括空字符串)表示释放。 + DeletePolicy *string `json:"DeletePolicy,omitempty" name:"DeletePolicy"` + + // EIP线路类型。默认值:BGP。 + // 已开通静态单线IP白名单的用户,可选值: + // CMCC:中国移动 + // CTCC:中国电信 + // CUCC:中国联通 + // 注意:仅部分地域支持静态单线IP。 + // 注意:此字段可能返回 null,表示取不到有效值。 + InternetServiceProvider *string `json:"InternetServiceProvider,omitempty" name:"InternetServiceProvider"` + + // EIP出带宽上限,单位:Mbps。 + // 注意:此字段可能返回 null,表示取不到有效值。 + InternetMaxBandwidthOut *uint64 `json:"InternetMaxBandwidthOut,omitempty" name:"InternetMaxBandwidthOut"` +} + +type EksCi struct { + + // EKS Cotainer Instance Id + EksCiId *string `json:"EksCiId,omitempty" name:"EksCiId"` + + // EKS Cotainer Instance Name + EksCiName *string `json:"EksCiName,omitempty" name:"EksCiName"` + + // 内存大小 + Memory *float64 `json:"Memory,omitempty" name:"Memory"` + + // CPU大小 + Cpu *float64 `json:"Cpu,omitempty" name:"Cpu"` + + // 安全组ID + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` + + // 容器组的重启策略 + // 注意:此字段可能返回 null,表示取不到有效值。 + RestartPolicy *string `json:"RestartPolicy,omitempty" name:"RestartPolicy"` + + // 返回容器组创建状态:Pending,Running,Succeeded,Failed。其中: + // Failed (运行失败)指的容器组退出,RestartPolilcy为Never, 有容器exitCode非0; + // Succeeded(运行成功)指的是容器组退出了,RestartPolicy为Never或onFailure,所有容器exitCode都为0; + // Failed和Succeeded这两种状态都会停止运行,停止计费。 + // Pending是创建中,Running是 运行中。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Status *string `json:"Status,omitempty" name:"Status"` + + // 接到请求后的系统创建时间。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CreationTime *string `json:"CreationTime,omitempty" name:"CreationTime"` + + // 容器全部成功退出后的时间 + // 注意:此字段可能返回 null,表示取不到有效值。 + SucceededTime *string `json:"SucceededTime,omitempty" name:"SucceededTime"` + + // 容器列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + Containers []*Container `json:"Containers,omitempty" name:"Containers"` + + // 数据卷信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + EksCiVolume *EksCiVolume `json:"EksCiVolume,omitempty" name:"EksCiVolume"` + + // 容器组运行的安全上下文 + // 注意:此字段可能返回 null,表示取不到有效值。 + SecurityContext *SecurityContext `json:"SecurityContext,omitempty" name:"SecurityContext"` + + // 内网ip地址 + // 注意:此字段可能返回 null,表示取不到有效值。 + PrivateIp *string `json:"PrivateIp,omitempty" name:"PrivateIp"` + + // 容器实例绑定的Eip地址,注意可能为空 + // 注意:此字段可能返回 null,表示取不到有效值。 + EipAddress *string `json:"EipAddress,omitempty" name:"EipAddress"` + + // GPU类型。如无使用GPU则不返回 + // 注意:此字段可能返回 null,表示取不到有效值。 + GpuType *string `json:"GpuType,omitempty" name:"GpuType"` + + // CPU类型 + // 注意:此字段可能返回 null,表示取不到有效值。 + CpuType *string `json:"CpuType,omitempty" name:"CpuType"` + + // GPU卡数量 + // 注意:此字段可能返回 null,表示取不到有效值。 + GpuCount *uint64 `json:"GpuCount,omitempty" name:"GpuCount"` + + // 实例所属VPC的Id + // 注意:此字段可能返回 null,表示取不到有效值。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 实例所属子网Id + // 注意:此字段可能返回 null,表示取不到有效值。 + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // 初始化容器列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + InitContainers []*Container `json:"InitContainers,omitempty" name:"InitContainers"` + + // 为容器实例关联 CAM 角色,value 填写 CAM 角色名称,容器实例可获取该 CAM 角色包含的权限策略,方便 容器实例 内的程序进行如购买资源、读写存储等云资源操作。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CamRoleName *string `json:"CamRoleName,omitempty" name:"CamRoleName"` + + // 自动为用户创建的EipId + // 注意:此字段可能返回 null,表示取不到有效值。 + AutoCreatedEipId *string `json:"AutoCreatedEipId,omitempty" name:"AutoCreatedEipId"` + + // 容器状态是否持久化 + // 注意:此字段可能返回 null,表示取不到有效值。 + PersistStatus *bool `json:"PersistStatus,omitempty" name:"PersistStatus"` +} + +type EksCiRegionInfo struct { + + // 地域别名,形如gz + Alias *string `json:"Alias,omitempty" name:"Alias"` + + // 地域名,形如ap-guangzhou + RegionName *string `json:"RegionName,omitempty" name:"RegionName"` + + // 地域ID + RegionId *uint64 `json:"RegionId,omitempty" name:"RegionId"` +} + +type EksCiVolume struct { + + // Cbs Volume + // 注意:此字段可能返回 null,表示取不到有效值。 + CbsVolumes []*CbsVolume `json:"CbsVolumes,omitempty" name:"CbsVolumes"` + + // Nfs Volume + // 注意:此字段可能返回 null,表示取不到有效值。 + NfsVolumes []*NfsVolume `json:"NfsVolumes,omitempty" name:"NfsVolumes"` +} + +type EksCluster struct { + + // 集群Id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 集群名称 + ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` + + // Vpc Id + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 子网列表 + SubnetIds []*string `json:"SubnetIds,omitempty" name:"SubnetIds"` + + // k8s 版本号 + K8SVersion *string `json:"K8SVersion,omitempty" name:"K8SVersion"` + + // 集群状态(running运行中,initializing 初始化中,failed异常) + Status *string `json:"Status,omitempty" name:"Status"` + + // 集群描述信息 + ClusterDesc *string `json:"ClusterDesc,omitempty" name:"ClusterDesc"` + + // 集群创建时间 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // Service 子网Id + ServiceSubnetId *string `json:"ServiceSubnetId,omitempty" name:"ServiceSubnetId"` + + // 集群的自定义dns 服务器信息 + DnsServers []*DnsServerConf `json:"DnsServers,omitempty" name:"DnsServers"` + + // 将来删除集群时是否要删除cbs。默认为 FALSE + NeedDeleteCbs *bool `json:"NeedDeleteCbs,omitempty" name:"NeedDeleteCbs"` + + // 是否在用户集群内开启Dns。默认为TRUE + EnableVpcCoreDNS *bool `json:"EnableVpcCoreDNS,omitempty" name:"EnableVpcCoreDNS"` + + // 标签描述列表。 + // 注意:此字段可能返回 null,表示取不到有效值。 + TagSpecification []*TagSpecification `json:"TagSpecification,omitempty" name:"TagSpecification"` +} + +type EnableClusterDeletionProtectionRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *EnableClusterDeletionProtectionRequest) 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 *EnableClusterDeletionProtectionRequest) 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", "EnableClusterDeletionProtectionRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type EnableClusterDeletionProtectionResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *EnableClusterDeletionProtectionResponse) 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 *EnableClusterDeletionProtectionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type EnableVpcCniNetworkTypeRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 开启vpc-cni的模式,tke-route-eni开启的是策略路由模式,tke-direct-eni开启的是独立网卡模式 + VpcCniType *string `json:"VpcCniType,omitempty" name:"VpcCniType"` + + // 是否开启固定IP模式 + EnableStaticIp *bool `json:"EnableStaticIp,omitempty" name:"EnableStaticIp"` + + // 使用的容器子网 + Subnets []*string `json:"Subnets,omitempty" name:"Subnets"` + + // 在固定IP模式下,Pod销毁后退还IP的时间,传参必须大于300;不传默认IP永不销毁。 + ExpiredSeconds *uint64 `json:"ExpiredSeconds,omitempty" name:"ExpiredSeconds"` +} + +func (r *EnableVpcCniNetworkTypeRequest) 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 *EnableVpcCniNetworkTypeRequest) 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, "VpcCniType") + delete(f, "EnableStaticIp") + delete(f, "Subnets") + delete(f, "ExpiredSeconds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "EnableVpcCniNetworkTypeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type EnableVpcCniNetworkTypeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *EnableVpcCniNetworkTypeResponse) 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 *EnableVpcCniNetworkTypeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type EnhancedService struct { + + // 开启云安全服务。若不指定该参数,则默认开启云安全服务。 + SecurityService *RunSecurityServiceEnabled `json:"SecurityService,omitempty" name:"SecurityService"` + + // 开启云监控服务。若不指定该参数,则默认开启云监控服务。 + MonitorService *RunMonitorServiceEnabled `json:"MonitorService,omitempty" name:"MonitorService"` + + // 开启云自动化助手服务。若不指定该参数,则默认不开启云自动化助手服务。 + AutomationService *RunAutomationServiceEnabled `json:"AutomationService,omitempty" name:"AutomationService"` +} + +type EnvironmentVariable struct { + + // key + Name *string `json:"Name,omitempty" name:"Name"` + + // val + Value *string `json:"Value,omitempty" name:"Value"` +} + +type Event struct { + + // pod名称 + PodName *string `json:"PodName,omitempty" name:"PodName"` + + // 事件原因内容 + Reason *string `json:"Reason,omitempty" name:"Reason"` + + // 事件类型 + Type *string `json:"Type,omitempty" name:"Type"` + + // 事件出现次数 + Count *int64 `json:"Count,omitempty" name:"Count"` + + // 事件第一次出现时间 + FirstTimestamp *string `json:"FirstTimestamp,omitempty" name:"FirstTimestamp"` + + // 事件最后一次出现时间 + LastTimestamp *string `json:"LastTimestamp,omitempty" name:"LastTimestamp"` + + // 事件内容 + Message *string `json:"Message,omitempty" name:"Message"` +} + +type Exec struct { + + // 容器内检测的命令 + // 注意:此字段可能返回 null,表示取不到有效值。 + Commands []*string `json:"Commands,omitempty" name:"Commands"` +} + +type ExistedInstance struct { + + // 实例是否支持加入集群(TRUE 可以加入 FALSE 不能加入)。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Usable *bool `json:"Usable,omitempty" name:"Usable"` + + // 实例不支持加入的原因。 + // 注意:此字段可能返回 null,表示取不到有效值。 + UnusableReason *string `json:"UnusableReason,omitempty" name:"UnusableReason"` + + // 实例已经所在的集群ID。 + // 注意:此字段可能返回 null,表示取不到有效值。 + AlreadyInCluster *string `json:"AlreadyInCluster,omitempty" name:"AlreadyInCluster"` + + // 实例ID形如:ins-xxxxxxxx。 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 实例名称。 + // 注意:此字段可能返回 null,表示取不到有效值。 + InstanceName *string `json:"InstanceName,omitempty" name:"InstanceName"` + + // 实例主网卡的内网IP列表。 + // 注意:此字段可能返回 null,表示取不到有效值。 + PrivateIpAddresses []*string `json:"PrivateIpAddresses,omitempty" name:"PrivateIpAddresses"` + + // 实例主网卡的公网IP列表。 + // 注意:此字段可能返回 null,表示取不到有效值。 + // 注意:此字段可能返回 null,表示取不到有效值。 + PublicIpAddresses []*string `json:"PublicIpAddresses,omitempty" name:"PublicIpAddresses"` + + // 创建时间。按照ISO8601标准表示,并且使用UTC时间。格式为:YYYY-MM-DDThh:mm:ssZ。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 实例的CPU核数,单位:核。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CPU *uint64 `json:"CPU,omitempty" name:"CPU"` + + // 实例内存容量,单位:GB。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Memory *uint64 `json:"Memory,omitempty" name:"Memory"` + + // 操作系统名称。 + // 注意:此字段可能返回 null,表示取不到有效值。 + OsName *string `json:"OsName,omitempty" name:"OsName"` + + // 实例机型。 + // 注意:此字段可能返回 null,表示取不到有效值。 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 伸缩组ID + // 注意:此字段可能返回 null,表示取不到有效值。 + AutoscalingGroupId *string `json:"AutoscalingGroupId,omitempty" name:"AutoscalingGroupId"` + + // 实例计费模式。取值范围: PREPAID:表示预付费,即包年包月 POSTPAID_BY_HOUR:表示后付费,即按量计费 CDHPAID:CDH付费,即只对CDH计费,不对CDH上的实例计费。 + // 注意:此字段可能返回 null,表示取不到有效值。 + InstanceChargeType *string `json:"InstanceChargeType,omitempty" name:"InstanceChargeType"` +} + +type ExistedInstancesForNode struct { + + // 节点角色,取值:MASTER_ETCD, WORKER。MASTER_ETCD只有在创建 INDEPENDENT_CLUSTER 独立集群时需要指定。MASTER_ETCD节点数量为3~7,建议为奇数。MASTER_ETCD最小配置为4C8G。 + NodeRole *string `json:"NodeRole,omitempty" name:"NodeRole"` + + // 已存在实例的重装参数 + ExistedInstancesPara *ExistedInstancesPara `json:"ExistedInstancesPara,omitempty" name:"ExistedInstancesPara"` + + // 节点高级设置,会覆盖集群级别设置的InstanceAdvancedSettings(当前只对节点自定义参数ExtraArgs生效) + InstanceAdvancedSettingsOverride *InstanceAdvancedSettings `json:"InstanceAdvancedSettingsOverride,omitempty" name:"InstanceAdvancedSettingsOverride"` + + // 自定义模式集群,可指定每个节点的pod数量 + DesiredPodNumbers []*int64 `json:"DesiredPodNumbers,omitempty" name:"DesiredPodNumbers"` +} + +type ExistedInstancesPara struct { + + // 集群ID + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 实例额外需要设置参数信息 + InstanceAdvancedSettings *InstanceAdvancedSettings `json:"InstanceAdvancedSettings,omitempty" name:"InstanceAdvancedSettings"` + + // 增强服务。通过该参数可以指定是否开启云安全、云监控等服务。若不指定该参数,则默认开启云监控、云安全服务。 + EnhancedService *EnhancedService `json:"EnhancedService,omitempty" name:"EnhancedService"` + + // 节点登录信息(目前仅支持使用Password或者单个KeyIds) + LoginSettings *LoginSettings `json:"LoginSettings,omitempty" name:"LoginSettings"` + + // 实例所属安全组。该参数可以通过调用 DescribeSecurityGroups 的返回值中的sgId字段来获取。若不指定该参数,则绑定默认安全组。 + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` + + // 重装系统时,可以指定修改实例的HostName(集群为HostName模式时,此参数必传,规则名称除不支持大写字符外与[CVM创建实例](https://cloud.tencent.com/document/product/213/15730)接口HostName一致) + HostName *string `json:"HostName,omitempty" name:"HostName"` +} + +type ExtensionAddon struct { + + // 扩展组件名称 + AddonName *string `json:"AddonName,omitempty" name:"AddonName"` + + // 扩展组件信息(扩展组件资源对象的json字符串描述) + AddonParam *string `json:"AddonParam,omitempty" name:"AddonParam"` +} + +type Filter struct { + + // 需要过滤的字段。 + Name *string `json:"Name,omitempty" name:"Name"` + + // 字段的过滤值。 + Values []*string `json:"Values,omitempty" name:"Values"` +} + +type ForwardApplicationRequestV3Request struct { + *tchttp.BaseRequest + + // 请求集群addon的访问 + Method *string `json:"Method,omitempty" name:"Method"` + + // 请求集群addon的路径 + Path *string `json:"Path,omitempty" name:"Path"` + + // 请求集群addon后允许接收的数据格式 + Accept *string `json:"Accept,omitempty" name:"Accept"` + + // 请求集群addon的数据格式 + ContentType *string `json:"ContentType,omitempty" name:"ContentType"` + + // 请求集群addon的数据 + RequestBody *string `json:"RequestBody,omitempty" name:"RequestBody"` + + // 集群名称 + ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` + + // 是否编码请求内容 + EncodedBody *string `json:"EncodedBody,omitempty" name:"EncodedBody"` +} + +func (r *ForwardApplicationRequestV3Request) 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 *ForwardApplicationRequestV3Request) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Method") + delete(f, "Path") + delete(f, "Accept") + delete(f, "ContentType") + delete(f, "RequestBody") + delete(f, "ClusterName") + delete(f, "EncodedBody") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ForwardApplicationRequestV3Request has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ForwardApplicationRequestV3Response struct { + *tchttp.BaseResponse + Response *struct { + + // 请求集群addon后返回的数据 + ResponseBody *string `json:"ResponseBody,omitempty" name:"ResponseBody"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ForwardApplicationRequestV3Response) 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 *ForwardApplicationRequestV3Response) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type GetMostSuitableImageCacheRequest struct { + *tchttp.BaseRequest + + // 容器镜像列表 + Images []*string `json:"Images,omitempty" name:"Images"` +} + +func (r *GetMostSuitableImageCacheRequest) 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 *GetMostSuitableImageCacheRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Images") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "GetMostSuitableImageCacheRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type GetMostSuitableImageCacheResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 是否有匹配的镜像缓存 + Found *bool `json:"Found,omitempty" name:"Found"` + + // 匹配的镜像缓存 + // 注意:此字段可能返回 null,表示取不到有效值。 + ImageCache *ImageCache `json:"ImageCache,omitempty" name:"ImageCache"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *GetMostSuitableImageCacheResponse) 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 *GetMostSuitableImageCacheResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type GetTkeAppChartListRequest struct { + *tchttp.BaseRequest + + // app类型,取值log,scheduler,network,storage,monitor,dns,image,other,invisible + Kind *string `json:"Kind,omitempty" name:"Kind"` + + // app支持的操作系统,取值arm32、arm64、amd64 + Arch *string `json:"Arch,omitempty" name:"Arch"` + + // 集群类型,取值tke、eks + ClusterType *string `json:"ClusterType,omitempty" name:"ClusterType"` +} + +func (r *GetTkeAppChartListRequest) 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 *GetTkeAppChartListRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Kind") + delete(f, "Arch") + delete(f, "ClusterType") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "GetTkeAppChartListRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type GetTkeAppChartListResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 所支持的chart列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + AppCharts []*AppChart `json:"AppCharts,omitempty" name:"AppCharts"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *GetTkeAppChartListResponse) 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 *GetTkeAppChartListResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type GetUpgradeInstanceProgressRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 最多获取多少个节点的进度 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` + + // 从第几个节点开始获取进度 + Offset *int64 `json:"Offset,omitempty" name:"Offset"` +} + +func (r *GetUpgradeInstanceProgressRequest) 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 *GetUpgradeInstanceProgressRequest) 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, "Limit") + delete(f, "Offset") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "GetUpgradeInstanceProgressRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type GetUpgradeInstanceProgressResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 升级节点总数 + Total *int64 `json:"Total,omitempty" name:"Total"` + + // 已升级节点总数 + Done *int64 `json:"Done,omitempty" name:"Done"` + + // 升级任务生命周期 + // process 运行中 + // paused 已停止 + // pauing 正在停止 + // done 已完成 + // timeout 已超时 + // aborted 已取消 + LifeState *string `json:"LifeState,omitempty" name:"LifeState"` + + // 各节点升级进度详情 + Instances []*InstanceUpgradeProgressItem `json:"Instances,omitempty" name:"Instances"` + + // 集群当前状态 + ClusterStatus *InstanceUpgradeClusterStatus `json:"ClusterStatus,omitempty" name:"ClusterStatus"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *GetUpgradeInstanceProgressResponse) 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 *GetUpgradeInstanceProgressResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type HttpGet struct { + + // HttpGet检测的路径 + // 注意:此字段可能返回 null,表示取不到有效值。 + Path *string `json:"Path,omitempty" name:"Path"` + + // HttpGet检测的端口号 + // 注意:此字段可能返回 null,表示取不到有效值。 + Port *int64 `json:"Port,omitempty" name:"Port"` + + // HTTP or HTTPS + // 注意:此字段可能返回 null,表示取不到有效值。 + Scheme *string `json:"Scheme,omitempty" name:"Scheme"` +} + +type IPAddress struct { + + // Ip 地址的类型。可为 advertise, public 等 + Type *string `json:"Type,omitempty" name:"Type"` + + // Ip 地址 + Ip *string `json:"Ip,omitempty" name:"Ip"` + + // 网络端口 + Port *uint64 `json:"Port,omitempty" name:"Port"` +} + +type ImageCache struct { + + // 镜像缓存Id + ImageCacheId *string `json:"ImageCacheId,omitempty" name:"ImageCacheId"` + + // 镜像缓存名称 + ImageCacheName *string `json:"ImageCacheName,omitempty" name:"ImageCacheName"` + + // 镜像缓存大小。单位:GiB + ImageCacheSize *uint64 `json:"ImageCacheSize,omitempty" name:"ImageCacheSize"` + + // 镜像缓存包含的镜像列表 + Images []*string `json:"Images,omitempty" name:"Images"` + + // 创建时间 + CreationTime *string `json:"CreationTime,omitempty" name:"CreationTime"` + + // 到期时间 + ExpireDateTime *string `json:"ExpireDateTime,omitempty" name:"ExpireDateTime"` + + // 镜像缓存事件信息 + Events []*ImageCacheEvent `json:"Events,omitempty" name:"Events"` + + // 最新一次匹配到镜像缓存的时间 + LastMatchedTime *string `json:"LastMatchedTime,omitempty" name:"LastMatchedTime"` + + // 镜像缓存对应的快照Id + SnapshotId *string `json:"SnapshotId,omitempty" name:"SnapshotId"` + + // 镜像缓存状态,可能取值: + // Pending:创建中 + // Ready:创建完成 + // Failed:创建失败 + // Updating:更新中 + // UpdateFailed:更新失败 + // 只有状态为Ready时,才能正常使用镜像缓存 + Status *string `json:"Status,omitempty" name:"Status"` +} + +type ImageCacheEvent struct { + + // 镜像缓存Id + ImageCacheId *string `json:"ImageCacheId,omitempty" name:"ImageCacheId"` + + // 事件类型, Normal或者Warning + Type *string `json:"Type,omitempty" name:"Type"` + + // 事件原因简述 + Reason *string `json:"Reason,omitempty" name:"Reason"` + + // 事件原因详述 + Message *string `json:"Message,omitempty" name:"Message"` + + // 事件第一次出现时间 + FirstTimestamp *string `json:"FirstTimestamp,omitempty" name:"FirstTimestamp"` + + // 事件最后一次出现时间 + LastTimestamp *string `json:"LastTimestamp,omitempty" name:"LastTimestamp"` +} + +type ImageInstance struct { + + // 镜像别名 + // 注意:此字段可能返回 null,表示取不到有效值。 + Alias *string `json:"Alias,omitempty" name:"Alias"` + + // 操作系统名称 + // 注意:此字段可能返回 null,表示取不到有效值。 + OsName *string `json:"OsName,omitempty" name:"OsName"` + + // 镜像ID + // 注意:此字段可能返回 null,表示取不到有效值。 + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` + + // 容器的镜像版本,"DOCKER_CUSTOMIZE"(容器定制版),"GENERAL"(普通版本,默认值) + // 注意:此字段可能返回 null,表示取不到有效值。 + OsCustomizeType *string `json:"OsCustomizeType,omitempty" name:"OsCustomizeType"` +} + +type ImageRegistryCredential struct { + + // 镜像仓库地址 + Server *string `json:"Server,omitempty" name:"Server"` + + // 用户名 + Username *string `json:"Username,omitempty" name:"Username"` + + // 密码 + Password *string `json:"Password,omitempty" name:"Password"` + + // ImageRegistryCredential的名字 + Name *string `json:"Name,omitempty" name:"Name"` +} + +type Instance struct { + + // 实例ID + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 节点角色, MASTER, WORKER, ETCD, MASTER_ETCD,ALL, 默认为WORKER + InstanceRole *string `json:"InstanceRole,omitempty" name:"InstanceRole"` + + // 实例异常(或者处于初始化中)的原因 + FailedReason *string `json:"FailedReason,omitempty" name:"FailedReason"` + + // 实例的状态(running 运行中,initializing 初始化中,failed 异常) + InstanceState *string `json:"InstanceState,omitempty" name:"InstanceState"` + + // 实例是否封锁状态 + // 注意:此字段可能返回 null,表示取不到有效值。 + DrainStatus *string `json:"DrainStatus,omitempty" name:"DrainStatus"` + + // 节点配置 + // 注意:此字段可能返回 null,表示取不到有效值。 + InstanceAdvancedSettings *InstanceAdvancedSettings `json:"InstanceAdvancedSettings,omitempty" name:"InstanceAdvancedSettings"` + + // 添加时间 + CreatedTime *string `json:"CreatedTime,omitempty" name:"CreatedTime"` + + // 节点内网IP + // 注意:此字段可能返回 null,表示取不到有效值。 + LanIP *string `json:"LanIP,omitempty" name:"LanIP"` + + // 资源池ID + // 注意:此字段可能返回 null,表示取不到有效值。 + NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` + + // 自动伸缩组ID + // 注意:此字段可能返回 null,表示取不到有效值。 + AutoscalingGroupId *string `json:"AutoscalingGroupId,omitempty" name:"AutoscalingGroupId"` +} + +type InstanceAdvancedSettings struct { + + // 数据盘挂载点, 默认不挂载数据盘. 已格式化的 ext3,ext4,xfs 文件系统的数据盘将直接挂载,其他文件系统或未格式化的数据盘将自动格式化为ext4 (tlinux系统格式化成xfs)并挂载,请注意备份数据! 无数据盘或有多块数据盘的云主机此设置不生效。 + // 注意,注意,多盘场景请使用下方的DataDisks数据结构,设置对应的云盘类型、云盘大小、挂载路径、是否格式化等信息。 + // 注意:此字段可能返回 null,表示取不到有效值。 + MountTarget *string `json:"MountTarget,omitempty" name:"MountTarget"` + + // dockerd --graph 指定值, 默认为 /var/lib/docker + // 注意:此字段可能返回 null,表示取不到有效值。 + DockerGraphPath *string `json:"DockerGraphPath,omitempty" name:"DockerGraphPath"` + + // base64 编码的用户脚本, 此脚本会在 k8s 组件运行后执行, 需要用户保证脚本的可重入及重试逻辑, 脚本及其生成的日志文件可在节点的 /data/ccs_userscript/ 路径查看, 如果要求节点需要在进行初始化完成后才可加入调度, 可配合 unschedulable 参数使用, 在 userScript 最后初始化完成后, 添加 kubectl uncordon nodename --kubeconfig=/root/.kube/config 命令使节点加入调度 + // 注意:此字段可能返回 null,表示取不到有效值。 + UserScript *string `json:"UserScript,omitempty" name:"UserScript"` + + // 设置加入的节点是否参与调度,默认值为0,表示参与调度;非0表示不参与调度, 待节点初始化完成之后, 可执行kubectl uncordon nodename使node加入调度. + Unschedulable *int64 `json:"Unschedulable,omitempty" name:"Unschedulable"` + + // 节点Label数组 + // 注意:此字段可能返回 null,表示取不到有效值。 + Labels []*Label `json:"Labels,omitempty" name:"Labels"` + + // 多盘数据盘挂载信息:新建节点时请确保购买CVM的参数传递了购买多个数据盘的信息,如CreateClusterInstances API的RunInstancesPara下的DataDisks也需要设置购买多个数据盘, 具体可以参考CreateClusterInstances接口的添加集群节点(多块数据盘)样例;添加已有节点时,请确保填写的分区信息在节点上真实存在 + // 注意:此字段可能返回 null,表示取不到有效值。 + DataDisks []*DataDisk `json:"DataDisks,omitempty" name:"DataDisks"` + + // 节点相关的自定义参数信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + ExtraArgs *InstanceExtraArgs `json:"ExtraArgs,omitempty" name:"ExtraArgs"` + + // 该节点属于podCIDR大小自定义模式时,可指定节点上运行的pod数量上限 + // 注意:此字段可能返回 null,表示取不到有效值。 + DesiredPodNumber *int64 `json:"DesiredPodNumber,omitempty" name:"DesiredPodNumber"` + + // base64 编码的用户脚本,在初始化节点之前执行,目前只对添加已有节点生效 + // 注意:此字段可能返回 null,表示取不到有效值。 + PreStartUserScript *string `json:"PreStartUserScript,omitempty" name:"PreStartUserScript"` +} + +type InstanceDataDiskMountSetting struct { + + // CVM实例类型 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 数据盘挂载信息 + DataDisks []*DataDisk `json:"DataDisks,omitempty" name:"DataDisks"` + + // CVM实例所属可用区 + Zone *string `json:"Zone,omitempty" name:"Zone"` +} + +type InstanceExtraArgs struct { + + // kubelet自定义参数,参数格式为["k1=v1", "k1=v2"], 例如["root-dir=/var/lib/kubelet","feature-gates=PodShareProcessNamespace=true,DynamicKubeletConfig=true"] + // 注意:此字段可能返回 null,表示取不到有效值。 + Kubelet []*string `json:"Kubelet,omitempty" name:"Kubelet"` +} + +type InstanceUpgradeClusterStatus struct { + + // pod总数 + PodTotal *int64 `json:"PodTotal,omitempty" name:"PodTotal"` + + // NotReady pod总数 + NotReadyPod *int64 `json:"NotReadyPod,omitempty" name:"NotReadyPod"` +} + +type InstanceUpgradePreCheckResult struct { + + // 检查是否通过 + CheckPass *bool `json:"CheckPass,omitempty" name:"CheckPass"` + + // 检查项数组 + Items []*InstanceUpgradePreCheckResultItem `json:"Items,omitempty" name:"Items"` + + // 本节点独立pod列表 + SinglePods []*string `json:"SinglePods,omitempty" name:"SinglePods"` +} + +type InstanceUpgradePreCheckResultItem struct { + + // 工作负载的命名空间 + Namespace *string `json:"Namespace,omitempty" name:"Namespace"` + + // 工作负载类型 + WorkLoadKind *string `json:"WorkLoadKind,omitempty" name:"WorkLoadKind"` + + // 工作负载名称 + WorkLoadName *string `json:"WorkLoadName,omitempty" name:"WorkLoadName"` + + // 驱逐节点前工作负载running的pod数目 + Before *uint64 `json:"Before,omitempty" name:"Before"` + + // 驱逐节点后工作负载running的pod数目 + After *uint64 `json:"After,omitempty" name:"After"` + + // 工作负载在本节点上的pod列表 + Pods []*string `json:"Pods,omitempty" name:"Pods"` +} + +type InstanceUpgradeProgressItem struct { + + // 节点instanceID + InstanceID *string `json:"InstanceID,omitempty" name:"InstanceID"` + + // 任务生命周期 + // process 运行中 + // paused 已停止 + // pauing 正在停止 + // done 已完成 + // timeout 已超时 + // aborted 已取消 + // pending 还未开始 + LifeState *string `json:"LifeState,omitempty" name:"LifeState"` + + // 升级开始时间 + // 注意:此字段可能返回 null,表示取不到有效值。 + StartAt *string `json:"StartAt,omitempty" name:"StartAt"` + + // 升级结束时间 + // 注意:此字段可能返回 null,表示取不到有效值。 + EndAt *string `json:"EndAt,omitempty" name:"EndAt"` + + // 升级前检查结果 + CheckResult *InstanceUpgradePreCheckResult `json:"CheckResult,omitempty" name:"CheckResult"` + + // 升级步骤详情 + Detail []*TaskStepInfo `json:"Detail,omitempty" name:"Detail"` +} + +type Label struct { + + // map表中的Name + Name *string `json:"Name,omitempty" name:"Name"` + + // map表中的Value + Value *string `json:"Value,omitempty" name:"Value"` +} + +type LivenessOrReadinessProbe struct { + + // 探针参数 + // 注意:此字段可能返回 null,表示取不到有效值。 + Probe *Probe `json:"Probe,omitempty" name:"Probe"` + + // HttpGet检测参数 + // 注意:此字段可能返回 null,表示取不到有效值。 + HttpGet *HttpGet `json:"HttpGet,omitempty" name:"HttpGet"` + + // 容器内检测命令参数 + // 注意:此字段可能返回 null,表示取不到有效值。 + Exec *Exec `json:"Exec,omitempty" name:"Exec"` + + // TcpSocket检测的端口参数 + // 注意:此字段可能返回 null,表示取不到有效值。 + TcpSocket *TcpSocket `json:"TcpSocket,omitempty" name:"TcpSocket"` +} + +type LoginSettings struct { + + // 实例登录密码。不同操作系统类型密码复杂度限制不一样,具体如下:
  • Linux实例密码必须8到30位,至少包括两项[a-z],[A-Z]、[0-9] 和 [( ) \` ~ ! @ # $ % ^ & * - + = | { } [ ] : ; ' , . ? / ]中的特殊符号。
  • Windows实例密码必须12到30位,至少包括三项[a-z],[A-Z],[0-9] 和 [( ) \` ~ ! @ # $ % ^ & * - + = | { } [ ] : ; ' , . ? /]中的特殊符号。

    若不指定该参数,则由系统随机生成密码,并通过站内信方式通知到用户。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Password *string `json:"Password,omitempty" name:"Password"` + + // 密钥ID列表。关联密钥后,就可以通过对应的私钥来访问实例;KeyId可通过接口[DescribeKeyPairs](https://cloud.tencent.com/document/api/213/15699)获取,密钥与密码不能同时指定,同时Windows操作系统不支持指定密钥。当前仅支持购买的时候指定一个密钥。 + // 注意:此字段可能返回 null,表示取不到有效值。 + KeyIds []*string `json:"KeyIds,omitempty" name:"KeyIds"` + + // 保持镜像的原始设置。该参数与Password或KeyIds.N不能同时指定。只有使用自定义镜像、共享镜像或外部导入镜像创建实例时才能指定该参数为TRUE。取值范围:
  • TRUE:表示保持镜像的登录设置
  • FALSE:表示不保持镜像的登录设置

    默认取值:FALSE。 + // 注意:此字段可能返回 null,表示取不到有效值。 + KeepImageLogin *string `json:"KeepImageLogin,omitempty" name:"KeepImageLogin"` +} + +type ManuallyAdded struct { + + // 加入中的节点数量 + Joining *int64 `json:"Joining,omitempty" name:"Joining"` + + // 初始化中的节点数量 + Initializing *int64 `json:"Initializing,omitempty" name:"Initializing"` + + // 正常的节点数量 + Normal *int64 `json:"Normal,omitempty" name:"Normal"` + + // 节点总数 + Total *int64 `json:"Total,omitempty" name:"Total"` +} + +type ModifyClusterAsGroupAttributeRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 集群关联的伸缩组属性 + ClusterAsGroupAttribute *ClusterAsGroupAttribute `json:"ClusterAsGroupAttribute,omitempty" name:"ClusterAsGroupAttribute"` +} + +func (r *ModifyClusterAsGroupAttributeRequest) 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 *ModifyClusterAsGroupAttributeRequest) 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, "ClusterAsGroupAttribute") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyClusterAsGroupAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyClusterAsGroupAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyClusterAsGroupAttributeResponse) 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 *ModifyClusterAsGroupAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyClusterAsGroupOptionAttributeRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 集群弹性伸缩属性 + ClusterAsGroupOption *ClusterAsGroupOption `json:"ClusterAsGroupOption,omitempty" name:"ClusterAsGroupOption"` +} + +func (r *ModifyClusterAsGroupOptionAttributeRequest) 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 *ModifyClusterAsGroupOptionAttributeRequest) 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, "ClusterAsGroupOption") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyClusterAsGroupOptionAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyClusterAsGroupOptionAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyClusterAsGroupOptionAttributeResponse) 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 *ModifyClusterAsGroupOptionAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyClusterAttributeRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 集群所属项目 + ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` + + // 集群名称 + ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` + + // 集群描述 + ClusterDesc *string `json:"ClusterDesc,omitempty" name:"ClusterDesc"` + + // 集群等级 + ClusterLevel *string `json:"ClusterLevel,omitempty" name:"ClusterLevel"` + + // 自动变配集群等级 + AutoUpgradeClusterLevel *AutoUpgradeClusterLevel `json:"AutoUpgradeClusterLevel,omitempty" name:"AutoUpgradeClusterLevel"` +} + +func (r *ModifyClusterAttributeRequest) 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 *ModifyClusterAttributeRequest) 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, "ProjectId") + delete(f, "ClusterName") + delete(f, "ClusterDesc") + delete(f, "ClusterLevel") + delete(f, "AutoUpgradeClusterLevel") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyClusterAttributeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyClusterAttributeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 集群所属项目 + // 注意:此字段可能返回 null,表示取不到有效值。 + ProjectId *int64 `json:"ProjectId,omitempty" name:"ProjectId"` + + // 集群名称 + // 注意:此字段可能返回 null,表示取不到有效值。 + ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` + + // 集群描述 + // 注意:此字段可能返回 null,表示取不到有效值。 + ClusterDesc *string `json:"ClusterDesc,omitempty" name:"ClusterDesc"` + + // 集群等级 + // 注意:此字段可能返回 null,表示取不到有效值。 + ClusterLevel *string `json:"ClusterLevel,omitempty" name:"ClusterLevel"` + + // 自动变配集群等级 + // 注意:此字段可能返回 null,表示取不到有效值。 + AutoUpgradeClusterLevel *AutoUpgradeClusterLevel `json:"AutoUpgradeClusterLevel,omitempty" name:"AutoUpgradeClusterLevel"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyClusterAttributeResponse) 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 *ModifyClusterAttributeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyClusterAuthenticationOptionsRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // ServiceAccount认证配置 + ServiceAccounts *ServiceAccountAuthenticationOptions `json:"ServiceAccounts,omitempty" name:"ServiceAccounts"` +} + +func (r *ModifyClusterAuthenticationOptionsRequest) 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 *ModifyClusterAuthenticationOptionsRequest) 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, "ServiceAccounts") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyClusterAuthenticationOptionsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyClusterAuthenticationOptionsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyClusterAuthenticationOptionsResponse) 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 *ModifyClusterAuthenticationOptionsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyClusterEndpointSPRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 安全策略放通单个IP或CIDR(例如: "192.168.1.0/24",默认为拒绝所有) + SecurityPolicies []*string `json:"SecurityPolicies,omitempty" name:"SecurityPolicies"` +} + +func (r *ModifyClusterEndpointSPRequest) 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 *ModifyClusterEndpointSPRequest) 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, "SecurityPolicies") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyClusterEndpointSPRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyClusterEndpointSPResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyClusterEndpointSPResponse) 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 *ModifyClusterEndpointSPResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyClusterNodePoolRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 节点池ID + NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` + + // 名称 + Name *string `json:"Name,omitempty" name:"Name"` + + // 最大节点数 + MaxNodesNum *int64 `json:"MaxNodesNum,omitempty" name:"MaxNodesNum"` + + // 最小节点数 + MinNodesNum *int64 `json:"MinNodesNum,omitempty" name:"MinNodesNum"` + + // 标签 + Labels []*Label `json:"Labels,omitempty" name:"Labels"` + + // 污点 + Taints []*Taint `json:"Taints,omitempty" name:"Taints"` + + // 是否开启伸缩 + EnableAutoscale *bool `json:"EnableAutoscale,omitempty" name:"EnableAutoscale"` + + // 操作系统名称 + OsName *string `json:"OsName,omitempty" name:"OsName"` + + // 镜像版本,"DOCKER_CUSTOMIZE"(容器定制版),"GENERAL"(普通版本,默认值) + OsCustomizeType *string `json:"OsCustomizeType,omitempty" name:"OsCustomizeType"` + + // 节点自定义参数 + ExtraArgs *InstanceExtraArgs `json:"ExtraArgs,omitempty" name:"ExtraArgs"` + + // 资源标签 + Tags []*Tag `json:"Tags,omitempty" name:"Tags"` + + // 设置加入的节点是否参与调度,默认值为0,表示参与调度;非0表示不参与调度, 待节点初始化完成之后, 可执行kubectl uncordon nodename使node加入调度. + Unschedulable *int64 `json:"Unschedulable,omitempty" name:"Unschedulable"` +} + +func (r *ModifyClusterNodePoolRequest) 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 *ModifyClusterNodePoolRequest) 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, "NodePoolId") + delete(f, "Name") + delete(f, "MaxNodesNum") + delete(f, "MinNodesNum") + delete(f, "Labels") + delete(f, "Taints") + delete(f, "EnableAutoscale") + delete(f, "OsName") + delete(f, "OsCustomizeType") + delete(f, "ExtraArgs") + delete(f, "Tags") + delete(f, "Unschedulable") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyClusterNodePoolRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyClusterNodePoolResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyClusterNodePoolResponse) 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 *ModifyClusterNodePoolResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyNodePoolDesiredCapacityAboutAsgRequest struct { + *tchttp.BaseRequest + + // 集群id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 节点池id + NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` + + // 节点池所关联的伸缩组的期望实例数 + DesiredCapacity *int64 `json:"DesiredCapacity,omitempty" name:"DesiredCapacity"` +} + +func (r *ModifyNodePoolDesiredCapacityAboutAsgRequest) 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 *ModifyNodePoolDesiredCapacityAboutAsgRequest) 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, "NodePoolId") + delete(f, "DesiredCapacity") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyNodePoolDesiredCapacityAboutAsgRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyNodePoolDesiredCapacityAboutAsgResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyNodePoolDesiredCapacityAboutAsgResponse) 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 *ModifyNodePoolDesiredCapacityAboutAsgResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyNodePoolInstanceTypesRequest struct { + *tchttp.BaseRequest + + // 集群id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 节点池id + NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` + + // 机型列表 + InstanceTypes []*string `json:"InstanceTypes,omitempty" name:"InstanceTypes"` +} + +func (r *ModifyNodePoolInstanceTypesRequest) 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 *ModifyNodePoolInstanceTypesRequest) 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, "NodePoolId") + delete(f, "InstanceTypes") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyNodePoolInstanceTypesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyNodePoolInstanceTypesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyNodePoolInstanceTypesResponse) 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 *ModifyNodePoolInstanceTypesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyPrometheusAlertRuleRequest struct { + *tchttp.BaseRequest + + // 实例id + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 告警配置 + AlertRule *PrometheusAlertRuleDetail `json:"AlertRule,omitempty" name:"AlertRule"` +} + +func (r *ModifyPrometheusAlertRuleRequest) 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 *ModifyPrometheusAlertRuleRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "InstanceId") + delete(f, "AlertRule") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyPrometheusAlertRuleRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyPrometheusAlertRuleResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyPrometheusAlertRuleResponse) 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 *ModifyPrometheusAlertRuleResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ModifyPrometheusTemplateRequest struct { + *tchttp.BaseRequest + + // 模板ID + TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"` + + // 修改内容 + Template *PrometheusTemplateModify `json:"Template,omitempty" name:"Template"` +} + +func (r *ModifyPrometheusTemplateRequest) 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 *ModifyPrometheusTemplateRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "TemplateId") + delete(f, "Template") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyPrometheusTemplateRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyPrometheusTemplateResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyPrometheusTemplateResponse) 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 *ModifyPrometheusTemplateResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type NfsVolume struct { + + // nfs volume 数据卷名称 + Name *string `json:"Name,omitempty" name:"Name"` + + // NFS 服务器地址 + Server *string `json:"Server,omitempty" name:"Server"` + + // NFS 数据卷路径 + Path *string `json:"Path,omitempty" name:"Path"` + + // 默认为 False + ReadOnly *bool `json:"ReadOnly,omitempty" name:"ReadOnly"` +} + +type NodeCountSummary struct { + + // 手动管理的节点 + // 注意:此字段可能返回 null,表示取不到有效值。 + ManuallyAdded *ManuallyAdded `json:"ManuallyAdded,omitempty" name:"ManuallyAdded"` + + // 自动管理的节点 + // 注意:此字段可能返回 null,表示取不到有效值。 + AutoscalingAdded *AutoscalingAdded `json:"AutoscalingAdded,omitempty" name:"AutoscalingAdded"` +} + +type NodePool struct { + + // NodePoolId 资源池id + NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` + + // Name 资源池名称 + Name *string `json:"Name,omitempty" name:"Name"` + + // ClusterInstanceId 集群实例id + ClusterInstanceId *string `json:"ClusterInstanceId,omitempty" name:"ClusterInstanceId"` + + // LifeState 状态,当前节点池生命周期状态包括:creating,normal,updating,deleting,deleted + LifeState *string `json:"LifeState,omitempty" name:"LifeState"` + + // LaunchConfigurationId 配置 + LaunchConfigurationId *string `json:"LaunchConfigurationId,omitempty" name:"LaunchConfigurationId"` + + // AutoscalingGroupId 分组id + AutoscalingGroupId *string `json:"AutoscalingGroupId,omitempty" name:"AutoscalingGroupId"` + + // Labels 标签 + Labels []*Label `json:"Labels,omitempty" name:"Labels"` + + // Taints 污点标记 + Taints []*Taint `json:"Taints,omitempty" name:"Taints"` + + // NodeCountSummary 节点列表 + NodeCountSummary *NodeCountSummary `json:"NodeCountSummary,omitempty" name:"NodeCountSummary"` + + // 状态信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + AutoscalingGroupStatus *string `json:"AutoscalingGroupStatus,omitempty" name:"AutoscalingGroupStatus"` + + // 最大节点数量 + // 注意:此字段可能返回 null,表示取不到有效值。 + MaxNodesNum *int64 `json:"MaxNodesNum,omitempty" name:"MaxNodesNum"` + + // 最小节点数量 + // 注意:此字段可能返回 null,表示取不到有效值。 + MinNodesNum *int64 `json:"MinNodesNum,omitempty" name:"MinNodesNum"` + + // 期望的节点数量 + // 注意:此字段可能返回 null,表示取不到有效值。 + DesiredNodesNum *int64 `json:"DesiredNodesNum,omitempty" name:"DesiredNodesNum"` + + // 节点池osName + // 注意:此字段可能返回 null,表示取不到有效值。 + NodePoolOs *string `json:"NodePoolOs,omitempty" name:"NodePoolOs"` + + // 容器的镜像版本,"DOCKER_CUSTOMIZE"(容器定制版),"GENERAL"(普通版本,默认值) + // 注意:此字段可能返回 null,表示取不到有效值。 + OsCustomizeType *string `json:"OsCustomizeType,omitempty" name:"OsCustomizeType"` + + // 镜像id + // 注意:此字段可能返回 null,表示取不到有效值。 + ImageId *string `json:"ImageId,omitempty" name:"ImageId"` + + // 集群属于节点podCIDR大小自定义模式时,节点池需要带上pod数量属性 + // 注意:此字段可能返回 null,表示取不到有效值。 + DesiredPodNum *int64 `json:"DesiredPodNum,omitempty" name:"DesiredPodNum"` + + // 用户自定义脚本 + // 注意:此字段可能返回 null,表示取不到有效值。 + UserScript *string `json:"UserScript,omitempty" name:"UserScript"` + + // 资源标签 + // 注意:此字段可能返回 null,表示取不到有效值。 + Tags []*Tag `json:"Tags,omitempty" name:"Tags"` +} + +type NodePoolOption struct { + + // 是否加入节点池 + AddToNodePool *bool `json:"AddToNodePool,omitempty" name:"AddToNodePool"` + + // 节点池id + NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` + + // 是否继承节点池相关配置 + InheritConfigurationFromNodePool *bool `json:"InheritConfigurationFromNodePool,omitempty" name:"InheritConfigurationFromNodePool"` +} + +type PodLimitsByType struct { + + // TKE共享网卡非固定IP模式可支持的Pod数量 + // 注意:此字段可能返回 null,表示取不到有效值。 + TKERouteENINonStaticIP *int64 `json:"TKERouteENINonStaticIP,omitempty" name:"TKERouteENINonStaticIP"` + + // TKE共享网卡固定IP模式可支持的Pod数量 + // 注意:此字段可能返回 null,表示取不到有效值。 + TKERouteENIStaticIP *int64 `json:"TKERouteENIStaticIP,omitempty" name:"TKERouteENIStaticIP"` + + // TKE独立网卡模式可支持的Pod数量 + // 注意:此字段可能返回 null,表示取不到有效值。 + TKEDirectENI *int64 `json:"TKEDirectENI,omitempty" name:"TKEDirectENI"` +} + +type PodLimitsInstance struct { + + // 机型所在可用区 + // 注意:此字段可能返回 null,表示取不到有效值。 + Zone *string `json:"Zone,omitempty" name:"Zone"` + + // 机型所属机型族 + // 注意:此字段可能返回 null,表示取不到有效值。 + InstanceFamily *string `json:"InstanceFamily,omitempty" name:"InstanceFamily"` + + // 实例机型名称 + // 注意:此字段可能返回 null,表示取不到有效值。 + InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` + + // 机型可支持的最大VPC-CNI模式Pod数量信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + PodLimits *PodLimitsByType `json:"PodLimits,omitempty" name:"PodLimits"` +} + +type Probe struct { + + // Number of seconds after the container has started before liveness probes are initiated. + // 注意:此字段可能返回 null,表示取不到有效值。 + InitialDelaySeconds *int64 `json:"InitialDelaySeconds,omitempty" name:"InitialDelaySeconds"` + + // Number of seconds after which the probe times out. + // Defaults to 1 second. Minimum value is 1. + // 注意:此字段可能返回 null,表示取不到有效值。 + TimeoutSeconds *int64 `json:"TimeoutSeconds,omitempty" name:"TimeoutSeconds"` + + // How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + // 注意:此字段可能返回 null,表示取不到有效值。 + PeriodSeconds *int64 `json:"PeriodSeconds,omitempty" name:"PeriodSeconds"` + + // Minimum consecutive successes for the probe to be considered successful after having failed.Defaults to 1. Must be 1 for liveness. Minimum value is 1. + // 注意:此字段可能返回 null,表示取不到有效值。 + SuccessThreshold *int64 `json:"SuccessThreshold,omitempty" name:"SuccessThreshold"` + + // Minimum consecutive failures for the probe to be considered failed after having succeeded.Defaults to 3. Minimum value is 1. + // 注意:此字段可能返回 null,表示取不到有效值。 + FailureThreshold *int64 `json:"FailureThreshold,omitempty" name:"FailureThreshold"` +} + +type PrometheusAgentOverview struct { + + // 集群类型 + ClusterType *string `json:"ClusterType,omitempty" name:"ClusterType"` + + // 集群id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // agent状态 + // normal = 正常 + // abnormal = 异常 + Status *string `json:"Status,omitempty" name:"Status"` + + // 集群名称 + ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` + + // 额外labels + // 本集群的所有指标都会带上这几个label + // 注意:此字段可能返回 null,表示取不到有效值。 + ExternalLabels []*Label `json:"ExternalLabels,omitempty" name:"ExternalLabels"` +} + +type PrometheusAlertHistoryItem struct { + + // 告警名称 + RuleName *string `json:"RuleName,omitempty" name:"RuleName"` + + // 告警开始时间 + StartTime *string `json:"StartTime,omitempty" name:"StartTime"` + + // 告警内容 + Content *string `json:"Content,omitempty" name:"Content"` + + // 告警状态 + // 注意:此字段可能返回 null,表示取不到有效值。 + State *string `json:"State,omitempty" name:"State"` + + // 触发的规则名称 + // 注意:此字段可能返回 null,表示取不到有效值。 + RuleItem *string `json:"RuleItem,omitempty" name:"RuleItem"` + + // 告警渠道的id + // 注意:此字段可能返回 null,表示取不到有效值。 + TopicId *string `json:"TopicId,omitempty" name:"TopicId"` + + // 告警渠道的名称 + // 注意:此字段可能返回 null,表示取不到有效值。 + TopicName *string `json:"TopicName,omitempty" name:"TopicName"` +} + +type PrometheusAlertRule struct { + + // 规则名称 + Name *string `json:"Name,omitempty" name:"Name"` + + // prometheus语句 + Rule *string `json:"Rule,omitempty" name:"Rule"` + + // 额外标签 + Labels []*Label `json:"Labels,omitempty" name:"Labels"` + + // 告警发送模板 + Template *string `json:"Template,omitempty" name:"Template"` + + // 持续时间 + For *string `json:"For,omitempty" name:"For"` + + // 该条规则的描述信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + Describe *string `json:"Describe,omitempty" name:"Describe"` + + // 参考prometheus rule中的annotations + // 注意:此字段可能返回 null,表示取不到有效值。 + Annotations []*Label `json:"Annotations,omitempty" name:"Annotations"` + + // 告警规则状态 + // 注意:此字段可能返回 null,表示取不到有效值。 + RuleState *int64 `json:"RuleState,omitempty" name:"RuleState"` +} + +type PrometheusAlertRuleDetail struct { + + // 规则名称 + Name *string `json:"Name,omitempty" name:"Name"` + + // 规则列表 + Rules []*PrometheusAlertRule `json:"Rules,omitempty" name:"Rules"` + + // 最后修改时间 + UpdatedAt *string `json:"UpdatedAt,omitempty" name:"UpdatedAt"` + + // 告警渠道 + Notification *PrometheusNotification `json:"Notification,omitempty" name:"Notification"` + + // 告警 id + Id *string `json:"Id,omitempty" name:"Id"` + + // 如果该告警来至模板下发,则TemplateId为模板id + // 注意:此字段可能返回 null,表示取不到有效值。 + TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"` + + // 计算周期 + // 注意:此字段可能返回 null,表示取不到有效值。 + Interval *string `json:"Interval,omitempty" name:"Interval"` +} + +type PrometheusConfigItem struct { + + // 名称 + Name *string `json:"Name,omitempty" name:"Name"` + + // 配置内容 + Config *string `json:"Config,omitempty" name:"Config"` + + // 用于出参,如果该配置来至模板,则为模板id + // 注意:此字段可能返回 null,表示取不到有效值。 + TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"` +} + +type PrometheusGrafanaInfo struct { + + // 是否启用 + Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` + + // 域名,只有开启外网访问才有效果 + Domain *string `json:"Domain,omitempty" name:"Domain"` + + // 内网地址,或者外网地址 + Address *string `json:"Address,omitempty" name:"Address"` + + // 是否开启了外网访问 + // close = 未开启外网访问 + // opening = 正在开启外网访问 + // open = 已开启外网访问 + Internet *string `json:"Internet,omitempty" name:"Internet"` + + // grafana管理员用户名 + AdminUser *string `json:"AdminUser,omitempty" name:"AdminUser"` +} + +type PrometheusInstanceOverview struct { + + // 实例id + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 实例名称 + Name *string `json:"Name,omitempty" name:"Name"` + + // 实例vpcId + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 实例子网Id + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // 实例当前的状态 + // prepare_env = 初始化环境 + // install_suit = 安装组件 + // running = 运行中 + Status *string `json:"Status,omitempty" name:"Status"` + + // COS桶存储 + COSBucket *string `json:"COSBucket,omitempty" name:"COSBucket"` + + // grafana默认地址,如果开启外网访问得为域名,否则为内网地址 + // 注意:此字段可能返回 null,表示取不到有效值。 + GrafanaURL *string `json:"GrafanaURL,omitempty" name:"GrafanaURL"` + + // 关联集群总数 + // 注意:此字段可能返回 null,表示取不到有效值。 + BoundTotal *uint64 `json:"BoundTotal,omitempty" name:"BoundTotal"` + + // 运行正常的集群数 + // 注意:此字段可能返回 null,表示取不到有效值。 + BoundNormal *uint64 `json:"BoundNormal,omitempty" name:"BoundNormal"` +} + +type PrometheusJobTargets struct { + + // 该Job的targets列表 + Targets []*PrometheusTarget `json:"Targets,omitempty" name:"Targets"` + + // job的名称 + JobName *string `json:"JobName,omitempty" name:"JobName"` + + // targets总数 + Total *uint64 `json:"Total,omitempty" name:"Total"` + + // 健康的target总数 + Up *uint64 `json:"Up,omitempty" name:"Up"` +} + +type PrometheusNotification struct { + + // 是否启用 + Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` + + // 收敛时间 + RepeatInterval *string `json:"RepeatInterval,omitempty" name:"RepeatInterval"` + + // 生效起始时间 + TimeRangeStart *string `json:"TimeRangeStart,omitempty" name:"TimeRangeStart"` + + // 生效结束时间 + TimeRangeEnd *string `json:"TimeRangeEnd,omitempty" name:"TimeRangeEnd"` + + // 告警通知方式。目前有SMS、EMAIL、CALL、WECHAT方式。 + // 分别代表:短信、邮件、电话、微信 + // 注意:此字段可能返回 null,表示取不到有效值。 + NotifyWay []*string `json:"NotifyWay,omitempty" name:"NotifyWay"` + + // 告警接收组(用户组) + // 注意:此字段可能返回 null,表示取不到有效值。 + ReceiverGroups []*uint64 `json:"ReceiverGroups,omitempty" name:"ReceiverGroups"` + + // 电话告警顺序。 + // 注:NotifyWay选择CALL,采用该参数。 + // 注意:此字段可能返回 null,表示取不到有效值。 + PhoneNotifyOrder []*uint64 `json:"PhoneNotifyOrder,omitempty" name:"PhoneNotifyOrder"` + + // 电话告警次数。 + // 注:NotifyWay选择CALL,采用该参数。 + // 注意:此字段可能返回 null,表示取不到有效值。 + PhoneCircleTimes *int64 `json:"PhoneCircleTimes,omitempty" name:"PhoneCircleTimes"` + + // 电话告警轮内间隔。单位:秒 + // 注:NotifyWay选择CALL,采用该参数。 + // 注意:此字段可能返回 null,表示取不到有效值。 + PhoneInnerInterval *int64 `json:"PhoneInnerInterval,omitempty" name:"PhoneInnerInterval"` + + // 电话告警轮外间隔。单位:秒 + // 注:NotifyWay选择CALL,采用该参数。 + // 注意:此字段可能返回 null,表示取不到有效值。 + PhoneCircleInterval *int64 `json:"PhoneCircleInterval,omitempty" name:"PhoneCircleInterval"` + + // 电话告警触达通知 + // 注:NotifyWay选择CALL,采用该参数。 + // 注意:此字段可能返回 null,表示取不到有效值。 + PhoneArriveNotice *bool `json:"PhoneArriveNotice,omitempty" name:"PhoneArriveNotice"` + + // 通道类型,默认为amp,支持以下 + // amp + // webhook + // 注意:此字段可能返回 null,表示取不到有效值。 + Type *string `json:"Type,omitempty" name:"Type"` + + // 如果Type为webhook, 则该字段为必填项 + // 注意:此字段可能返回 null,表示取不到有效值。 + WebHook *string `json:"WebHook,omitempty" name:"WebHook"` +} + +type PrometheusTarget struct { + + // 抓取目标的URL + Url *string `json:"Url,omitempty" name:"Url"` + + // target当前状态,当前支持 + // up = 健康 + // down = 不健康 + // unknown = 未知 + State *string `json:"State,omitempty" name:"State"` + + // target的元label + Labels []*Label `json:"Labels,omitempty" name:"Labels"` + + // 上一次抓取的时间 + LastScrape *string `json:"LastScrape,omitempty" name:"LastScrape"` + + // 上一次抓取的耗时,单位是s + ScrapeDuration *float64 `json:"ScrapeDuration,omitempty" name:"ScrapeDuration"` + + // 上一次抓取如果错误,该字段存储错误信息 + Error *string `json:"Error,omitempty" name:"Error"` +} + +type PrometheusTemplate struct { + + // 模板名称 + Name *string `json:"Name,omitempty" name:"Name"` + + // 模板维度,支持以下类型 + // instance 实例级别 + // cluster 集群级别 + Level *string `json:"Level,omitempty" name:"Level"` + + // 模板描述 + // 注意:此字段可能返回 null,表示取不到有效值。 + Describe *string `json:"Describe,omitempty" name:"Describe"` + + // 当Level为instance时有效, + // 模板中的告警配置列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + AlertRules []*PrometheusAlertRule `json:"AlertRules,omitempty" name:"AlertRules"` + + // 当Level为instance时有效, + // 模板中的聚合规则列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + RecordRules []*PrometheusConfigItem `json:"RecordRules,omitempty" name:"RecordRules"` + + // 当Level为cluster时有效, + // 模板中的ServiceMonitor规则列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + ServiceMonitors []*PrometheusConfigItem `json:"ServiceMonitors,omitempty" name:"ServiceMonitors"` + + // 当Level为cluster时有效, + // 模板中的PodMonitors规则列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + PodMonitors []*PrometheusConfigItem `json:"PodMonitors,omitempty" name:"PodMonitors"` + + // 当Level为cluster时有效, + // 模板中的RawJobs规则列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + RawJobs []*PrometheusConfigItem `json:"RawJobs,omitempty" name:"RawJobs"` + + // 模板的ID, 用于出参 + // 注意:此字段可能返回 null,表示取不到有效值。 + TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"` + + // 最近更新时间,用于出参 + // 注意:此字段可能返回 null,表示取不到有效值。 + UpdateTime *string `json:"UpdateTime,omitempty" name:"UpdateTime"` + + // 当前版本,用于出参 + // 注意:此字段可能返回 null,表示取不到有效值。 + Version *string `json:"Version,omitempty" name:"Version"` + + // 是否系统提供的默认模板,用于出参 + // 注意:此字段可能返回 null,表示取不到有效值。 + IsDefault *bool `json:"IsDefault,omitempty" name:"IsDefault"` + + // 当Level为instance时有效, + // 模板中的告警配置列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + AlertDetailRules []*PrometheusAlertRuleDetail `json:"AlertDetailRules,omitempty" name:"AlertDetailRules"` +} + +type PrometheusTemplateModify struct { + + // 修改名称 + Name *string `json:"Name,omitempty" name:"Name"` + + // 修改描述 + // 注意:此字段可能返回 null,表示取不到有效值。 + Describe *string `json:"Describe,omitempty" name:"Describe"` + + // 修改内容,只有当模板类型是Alert时生效 + // 注意:此字段可能返回 null,表示取不到有效值。 + AlertRules []*PrometheusAlertRule `json:"AlertRules,omitempty" name:"AlertRules"` + + // 当Level为instance时有效, + // 模板中的聚合规则列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + RecordRules []*PrometheusConfigItem `json:"RecordRules,omitempty" name:"RecordRules"` + + // 当Level为cluster时有效, + // 模板中的ServiceMonitor规则列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + ServiceMonitors []*PrometheusConfigItem `json:"ServiceMonitors,omitempty" name:"ServiceMonitors"` + + // 当Level为cluster时有效, + // 模板中的PodMonitors规则列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + PodMonitors []*PrometheusConfigItem `json:"PodMonitors,omitempty" name:"PodMonitors"` + + // 当Level为cluster时有效, + // 模板中的RawJobs规则列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + RawJobs []*PrometheusConfigItem `json:"RawJobs,omitempty" name:"RawJobs"` + + // 修改内容,只有当模板类型是Alert时生效 + // 注意:此字段可能返回 null,表示取不到有效值。 + AlertDetailRules []*PrometheusAlertRuleDetail `json:"AlertDetailRules,omitempty" name:"AlertDetailRules"` +} + +type PrometheusTemplateSyncTarget struct { + + // 目标所在地域 + Region *string `json:"Region,omitempty" name:"Region"` + + // 目标实例 + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 集群id,只有当采集模板的Level为cluster的时候需要 + // 注意:此字段可能返回 null,表示取不到有效值。 + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 最后一次同步时间, 用于出参 + // 注意:此字段可能返回 null,表示取不到有效值。 + SyncTime *string `json:"SyncTime,omitempty" name:"SyncTime"` + + // 当前使用的模板版本,用于出参 + // 注意:此字段可能返回 null,表示取不到有效值。 + Version *string `json:"Version,omitempty" name:"Version"` + + // 集群类型,只有当采集模板的Level为cluster的时候需要 + // 注意:此字段可能返回 null,表示取不到有效值。 + ClusterType *string `json:"ClusterType,omitempty" name:"ClusterType"` + + // 用于出参,实例名称 + // 注意:此字段可能返回 null,表示取不到有效值。 + InstanceName *string `json:"InstanceName,omitempty" name:"InstanceName"` + + // 用于出参,集群名称 + // 注意:此字段可能返回 null,表示取不到有效值。 + ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` +} + +type RegionInstance struct { + + // 地域名称 + // 注意:此字段可能返回 null,表示取不到有效值。 + RegionName *string `json:"RegionName,omitempty" name:"RegionName"` + + // 地域ID + // 注意:此字段可能返回 null,表示取不到有效值。 + RegionId *int64 `json:"RegionId,omitempty" name:"RegionId"` + + // 地域状态 + // 注意:此字段可能返回 null,表示取不到有效值。 + Status *string `json:"Status,omitempty" name:"Status"` + + // 地域特性开关(按照JSON的形式返回所有属性) + // 注意:此字段可能返回 null,表示取不到有效值。 + FeatureGates *string `json:"FeatureGates,omitempty" name:"FeatureGates"` + + // 地域简称 + // 注意:此字段可能返回 null,表示取不到有效值。 + Alias *string `json:"Alias,omitempty" name:"Alias"` + + // 地域白名单 + // 注意:此字段可能返回 null,表示取不到有效值。 + Remark *string `json:"Remark,omitempty" name:"Remark"` +} + +type RemoveNodeFromNodePoolRequest struct { + *tchttp.BaseRequest + + // 集群id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 节点池id + NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` + + // 节点id列表,一次最多支持100台 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` +} + +func (r *RemoveNodeFromNodePoolRequest) 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 *RemoveNodeFromNodePoolRequest) 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, "NodePoolId") + delete(f, "InstanceIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "RemoveNodeFromNodePoolRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type RemoveNodeFromNodePoolResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *RemoveNodeFromNodePoolResponse) 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 *RemoveNodeFromNodePoolResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ResourceDeleteOption struct { + + // 资源类型,例如CBS + ResourceType *string `json:"ResourceType,omitempty" name:"ResourceType"` + + // 集群删除时资源的删除模式:terminate(销毁),retain (保留) + DeleteMode *string `json:"DeleteMode,omitempty" name:"DeleteMode"` +} + +type RestartEKSContainerInstancesRequest struct { + *tchttp.BaseRequest + + // EKS instance ids + EksCiIds []*string `json:"EksCiIds,omitempty" name:"EksCiIds"` +} + +func (r *RestartEKSContainerInstancesRequest) 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 *RestartEKSContainerInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "EksCiIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "RestartEKSContainerInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type RestartEKSContainerInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *RestartEKSContainerInstancesResponse) 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 *RestartEKSContainerInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type RouteInfo struct { + + // 路由表名称。 + RouteTableName *string `json:"RouteTableName,omitempty" name:"RouteTableName"` + + // 目的端CIDR。 + DestinationCidrBlock *string `json:"DestinationCidrBlock,omitempty" name:"DestinationCidrBlock"` + + // 下一跳地址。 + GatewayIp *string `json:"GatewayIp,omitempty" name:"GatewayIp"` +} + +type RouteTableConflict struct { + + // 路由表类型。 + RouteTableType *string `json:"RouteTableType,omitempty" name:"RouteTableType"` + + // 路由表CIDR。 + // 注意:此字段可能返回 null,表示取不到有效值。 + RouteTableCidrBlock *string `json:"RouteTableCidrBlock,omitempty" name:"RouteTableCidrBlock"` + + // 路由表名称。 + // 注意:此字段可能返回 null,表示取不到有效值。 + RouteTableName *string `json:"RouteTableName,omitempty" name:"RouteTableName"` + + // 路由表ID。 + // 注意:此字段可能返回 null,表示取不到有效值。 + RouteTableId *string `json:"RouteTableId,omitempty" name:"RouteTableId"` +} + +type RouteTableInfo struct { + + // 路由表名称。 + RouteTableName *string `json:"RouteTableName,omitempty" name:"RouteTableName"` + + // 路由表CIDR。 + RouteTableCidrBlock *string `json:"RouteTableCidrBlock,omitempty" name:"RouteTableCidrBlock"` + + // VPC实例ID。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` +} + +type RunAutomationServiceEnabled struct { + + // 是否开启云自动化助手。取值范围:
  • TRUE:表示开启云自动化助手服务
  • FALSE:表示不开启云自动化助手服务

    默认取值:FALSE。 + Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` +} + +type RunInstancesForNode struct { + + // 节点角色,取值:MASTER_ETCD, WORKER。MASTER_ETCD只有在创建 INDEPENDENT_CLUSTER 独立集群时需要指定。MASTER_ETCD节点数量为3~7,建议为奇数。MASTER_ETCD节点最小配置为4C8G。 + NodeRole *string `json:"NodeRole,omitempty" name:"NodeRole"` + + // CVM创建透传参数,json化字符串格式,详见[CVM创建实例](https://cloud.tencent.com/document/product/213/15730)接口,传入公共参数外的其他参数即可,其中ImageId会替换为TKE集群OS对应的镜像。 + RunInstancesPara []*string `json:"RunInstancesPara,omitempty" name:"RunInstancesPara"` + + // 节点高级设置,该参数会覆盖集群级别设置的InstanceAdvancedSettings,和上边的RunInstancesPara按照顺序一一对应(当前只对节点自定义参数ExtraArgs生效)。 + InstanceAdvancedSettingsOverrides []*InstanceAdvancedSettings `json:"InstanceAdvancedSettingsOverrides,omitempty" name:"InstanceAdvancedSettingsOverrides"` +} + +type RunMonitorServiceEnabled struct { + + // 是否开启[云监控](/document/product/248)服务。取值范围:
  • TRUE:表示开启云监控服务
  • FALSE:表示不开启云监控服务

    默认取值:TRUE。 + Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` +} + +type RunSecurityServiceEnabled struct { + + // 是否开启[云安全](/document/product/296)服务。取值范围:
  • TRUE:表示开启云安全服务
  • FALSE:表示不开启云安全服务

    默认取值:TRUE。 + Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` +} + +type ScaleInClusterMasterRequest struct { + *tchttp.BaseRequest + + // 集群实例ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // master缩容选项 + ScaleInMasters []*ScaleInMaster `json:"ScaleInMasters,omitempty" name:"ScaleInMasters"` +} + +func (r *ScaleInClusterMasterRequest) 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 *ScaleInClusterMasterRequest) 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, "ScaleInMasters") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ScaleInClusterMasterRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ScaleInClusterMasterResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ScaleInClusterMasterResponse) 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 *ScaleInClusterMasterResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type ScaleInMaster struct { + + // 实例ID + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 缩容的实例角色:MASTER,ETCD,MASTER_ETCD + NodeRole *string `json:"NodeRole,omitempty" name:"NodeRole"` + + // 实例的保留模式 + InstanceDeleteMode *string `json:"InstanceDeleteMode,omitempty" name:"InstanceDeleteMode"` +} + +type ScaleOutClusterMasterRequest struct { + *tchttp.BaseRequest + + // 集群实例ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 新建节点参数 + RunInstancesForNode []*RunInstancesForNode `json:"RunInstancesForNode,omitempty" name:"RunInstancesForNode"` + + // 添加已有节点相关参数 + ExistedInstancesForNode []*ExistedInstancesForNode `json:"ExistedInstancesForNode,omitempty" name:"ExistedInstancesForNode"` + + // 实例高级设置 + InstanceAdvancedSettings *InstanceAdvancedSettings `json:"InstanceAdvancedSettings,omitempty" name:"InstanceAdvancedSettings"` + + // 集群master组件自定义参数 + ExtraArgs *ClusterExtraArgs `json:"ExtraArgs,omitempty" name:"ExtraArgs"` +} + +func (r *ScaleOutClusterMasterRequest) 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 *ScaleOutClusterMasterRequest) 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, "RunInstancesForNode") + delete(f, "ExistedInstancesForNode") + delete(f, "InstanceAdvancedSettings") + delete(f, "ExtraArgs") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ScaleOutClusterMasterRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ScaleOutClusterMasterResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ScaleOutClusterMasterResponse) 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 *ScaleOutClusterMasterResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type SecurityContext struct { + + // 安全能力清单 + // 注意:此字段可能返回 null,表示取不到有效值。 + Capabilities *Capabilities `json:"Capabilities,omitempty" name:"Capabilities"` +} + +type ServiceAccountAuthenticationOptions struct { + + // service-account-issuer + // 注意:此字段可能返回 null,表示取不到有效值。 + Issuer *string `json:"Issuer,omitempty" name:"Issuer"` + + // service-account-jwks-uri + // 注意:此字段可能返回 null,表示取不到有效值。 + JWKSURI *string `json:"JWKSURI,omitempty" name:"JWKSURI"` + + // 如果为true,则会自动创建允许匿名用户访问'/.well-known/openid-configuration'和/openid/v1/jwks的rbac规则 + // 注意:此字段可能返回 null,表示取不到有效值。 + AutoCreateDiscoveryAnonymousAuth *bool `json:"AutoCreateDiscoveryAnonymousAuth,omitempty" name:"AutoCreateDiscoveryAnonymousAuth"` +} + +type SetNodePoolNodeProtectionRequest struct { + *tchttp.BaseRequest + + // 集群id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 节点池id + NodePoolId *string `json:"NodePoolId,omitempty" name:"NodePoolId"` + + // 节点id + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 节点是否需要移出保护 + ProtectedFromScaleIn *bool `json:"ProtectedFromScaleIn,omitempty" name:"ProtectedFromScaleIn"` +} + +func (r *SetNodePoolNodeProtectionRequest) 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 *SetNodePoolNodeProtectionRequest) 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, "NodePoolId") + delete(f, "InstanceIds") + delete(f, "ProtectedFromScaleIn") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "SetNodePoolNodeProtectionRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type SetNodePoolNodeProtectionResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 成功设置的节点id + // 注意:此字段可能返回 null,表示取不到有效值。 + SucceedInstanceIds []*string `json:"SucceedInstanceIds,omitempty" name:"SucceedInstanceIds"` + + // 没有成功设置的节点id + // 注意:此字段可能返回 null,表示取不到有效值。 + FailedInstanceIds []*string `json:"FailedInstanceIds,omitempty" name:"FailedInstanceIds"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *SetNodePoolNodeProtectionResponse) 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 *SetNodePoolNodeProtectionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type SyncPrometheusTemplateRequest struct { + *tchttp.BaseRequest + + // 实例id + TemplateId *string `json:"TemplateId,omitempty" name:"TemplateId"` + + // 同步目标 + Targets []*PrometheusTemplateSyncTarget `json:"Targets,omitempty" name:"Targets"` +} + +func (r *SyncPrometheusTemplateRequest) 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 *SyncPrometheusTemplateRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "TemplateId") + delete(f, "Targets") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "SyncPrometheusTemplateRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type SyncPrometheusTemplateResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *SyncPrometheusTemplateResponse) 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 *SyncPrometheusTemplateResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type Tag struct { + + // 标签键 + Key *string `json:"Key,omitempty" name:"Key"` + + // 标签值 + Value *string `json:"Value,omitempty" name:"Value"` +} + +type TagSpecification struct { + + // 标签绑定的资源类型,当前支持类型:"cluster" + // 注意:此字段可能返回 null,表示取不到有效值。 + ResourceType *string `json:"ResourceType,omitempty" name:"ResourceType"` + + // 标签对列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + Tags []*Tag `json:"Tags,omitempty" name:"Tags"` +} + +type Taint struct { + + // Key + Key *string `json:"Key,omitempty" name:"Key"` + + // Value + Value *string `json:"Value,omitempty" name:"Value"` + + // Effect + Effect *string `json:"Effect,omitempty" name:"Effect"` +} + +type TaskStepInfo struct { + + // 步骤名称 + Step *string `json:"Step,omitempty" name:"Step"` + + // 生命周期 + // pending : 步骤未开始 + // running: 步骤执行中 + // success: 步骤成功完成 + // failed: 步骤失败 + LifeState *string `json:"LifeState,omitempty" name:"LifeState"` + + // 步骤开始时间 + // 注意:此字段可能返回 null,表示取不到有效值。 + StartAt *string `json:"StartAt,omitempty" name:"StartAt"` + + // 步骤结束时间 + // 注意:此字段可能返回 null,表示取不到有效值。 + EndAt *string `json:"EndAt,omitempty" name:"EndAt"` + + // 若步骤生命周期为failed,则此字段显示错误信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + FailedMsg *string `json:"FailedMsg,omitempty" name:"FailedMsg"` +} + +type TcpSocket struct { + + // TcpSocket检测的端口 + // 注意:此字段可能返回 null,表示取不到有效值。 + Port *uint64 `json:"Port,omitempty" name:"Port"` +} + +type UpdateClusterVersionRequest struct { + *tchttp.BaseRequest + + // 集群 Id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 需要升级到的版本 + DstVersion *string `json:"DstVersion,omitempty" name:"DstVersion"` + + // 集群自定义参数 + ExtraArgs *ClusterExtraArgs `json:"ExtraArgs,omitempty" name:"ExtraArgs"` + + // 可容忍的最大不可用pod数目 + MaxNotReadyPercent *float64 `json:"MaxNotReadyPercent,omitempty" name:"MaxNotReadyPercent"` + + // 是否跳过预检查阶段 + SkipPreCheck *bool `json:"SkipPreCheck,omitempty" name:"SkipPreCheck"` +} + +func (r *UpdateClusterVersionRequest) 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 *UpdateClusterVersionRequest) 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, "DstVersion") + delete(f, "ExtraArgs") + delete(f, "MaxNotReadyPercent") + delete(f, "SkipPreCheck") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "UpdateClusterVersionRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type UpdateClusterVersionResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *UpdateClusterVersionResponse) 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 *UpdateClusterVersionResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type UpdateEKSClusterRequest struct { + *tchttp.BaseRequest + + // 弹性集群Id + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 弹性集群名称 + ClusterName *string `json:"ClusterName,omitempty" name:"ClusterName"` + + // 弹性集群描述信息 + ClusterDesc *string `json:"ClusterDesc,omitempty" name:"ClusterDesc"` + + // 子网Id 列表 + SubnetIds []*string `json:"SubnetIds,omitempty" name:"SubnetIds"` + + // 弹性容器集群公网访问LB信息 + PublicLB *ClusterPublicLB `json:"PublicLB,omitempty" name:"PublicLB"` + + // 弹性容器集群内网访问LB信息 + InternalLB *ClusterInternalLB `json:"InternalLB,omitempty" name:"InternalLB"` + + // Service 子网Id + ServiceSubnetId *string `json:"ServiceSubnetId,omitempty" name:"ServiceSubnetId"` + + // 集群自定义的dns 服务器信息 + DnsServers []*DnsServerConf `json:"DnsServers,omitempty" name:"DnsServers"` + + // 是否清空自定义dns 服务器设置。为1 表示 是。其他表示 否。 + ClearDnsServer *string `json:"ClearDnsServer,omitempty" name:"ClearDnsServer"` + + // 将来删除集群时是否要删除cbs。默认为 FALSE + NeedDeleteCbs *bool `json:"NeedDeleteCbs,omitempty" name:"NeedDeleteCbs"` + + // 标记是否是新的内外网。默认为false + ProxyLB *bool `json:"ProxyLB,omitempty" name:"ProxyLB"` + + // 扩展参数。须是map[string]string 的json 格式。 + ExtraParam *string `json:"ExtraParam,omitempty" name:"ExtraParam"` +} + +func (r *UpdateEKSClusterRequest) 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 *UpdateEKSClusterRequest) 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, "ClusterName") + delete(f, "ClusterDesc") + delete(f, "SubnetIds") + delete(f, "PublicLB") + delete(f, "InternalLB") + delete(f, "ServiceSubnetId") + delete(f, "DnsServers") + delete(f, "ClearDnsServer") + delete(f, "NeedDeleteCbs") + delete(f, "ProxyLB") + delete(f, "ExtraParam") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "UpdateEKSClusterRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type UpdateEKSClusterResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *UpdateEKSClusterResponse) 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 *UpdateEKSClusterResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type UpdateEKSContainerInstanceRequest struct { + /*********PCM param************/ + RequestSource string `position:"Query" name:"RequestSource"` + ProviderId int32 `position:"Query" name:"ProviderId"` + AccountName string `position:"Query" name:"AccountName"` + Namespace string `position:"Query" name:"Namespace"` + ContainerGroupName string `position:"Query" name:"ContainerGroupName"` + RegionId string `position:"Query" name:"RegionId"` + /*********PCM param************/ + + *tchttp.BaseRequest + + // 容器实例 ID + EksCiId *string `json:"EksCiId,omitempty" name:"EksCiId"` + + // 实例重启策略: Always(总是重启)、Never(从不重启)、OnFailure(失败时重启) + RestartPolicy *string `json:"RestartPolicy,omitempty" name:"RestartPolicy"` + + // 数据卷,包含NfsVolume数组和CbsVolume数组 + EksCiVolume *EksCiVolume `json:"EksCiVolume,omitempty" name:"EksCiVolume"` + + // 容器组 + Containers []*Container `json:"Containers,omitempty" name:"Containers"` + + // Init 容器组 + InitContainers []*Container `json:"InitContainers,omitempty" name:"InitContainers"` + + // 容器实例名称 + Name *string `json:"Name,omitempty" name:"Name"` + + // 镜像仓库凭证数组 + ImageRegistryCredentials []*ImageRegistryCredential `json:"ImageRegistryCredentials,omitempty" name:"ImageRegistryCredentials"` +} + +func (r *UpdateEKSContainerInstanceRequest) 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 *UpdateEKSContainerInstanceRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "EksCiId") + delete(f, "RestartPolicy") + delete(f, "EksCiVolume") + delete(f, "Containers") + delete(f, "InitContainers") + delete(f, "Name") + delete(f, "ImageRegistryCredentials") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "UpdateEKSContainerInstanceRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type UpdateEKSContainerInstanceResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 容器实例 ID + // 注意:此字段可能返回 null,表示取不到有效值。 + EksCiId *string `json:"EksCiId,omitempty" name:"EksCiId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *UpdateEKSContainerInstanceResponse) 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 *UpdateEKSContainerInstanceResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type UpdateImageCacheRequest struct { + *tchttp.BaseRequest + + // 镜像缓存Id + ImageCacheId *string `json:"ImageCacheId,omitempty" name:"ImageCacheId"` + + // 镜像缓存名称 + ImageCacheName *string `json:"ImageCacheName,omitempty" name:"ImageCacheName"` +} + +func (r *UpdateImageCacheRequest) 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 *UpdateImageCacheRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ImageCacheId") + delete(f, "ImageCacheName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "UpdateImageCacheRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type UpdateImageCacheResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *UpdateImageCacheResponse) 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 *UpdateImageCacheResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type UpgradeAbleInstancesItem struct { + + // 节点Id + InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` + + // 节点的当前版本 + Version *string `json:"Version,omitempty" name:"Version"` + + // 当前版本的最新小版本 + // 注意:此字段可能返回 null,表示取不到有效值。 + LatestVersion *string `json:"LatestVersion,omitempty" name:"LatestVersion"` +} + +type UpgradeClusterInstancesRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // create 表示开始一次升级任务 + // pause 表示停止任务 + // resume表示继续任务 + // abort表示终止任务 + Operation *string `json:"Operation,omitempty" name:"Operation"` + + // 升级类型,只有Operation是create需要设置 + // reset 大版本重装升级 + // hot 小版本热升级 + // major 大版本原地升级 + UpgradeType *string `json:"UpgradeType,omitempty" name:"UpgradeType"` + + // 需要升级的节点列表 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 当节点重新加入集群时候所使用的参数,参考添加已有节点接口 + ResetParam *UpgradeNodeResetParam `json:"ResetParam,omitempty" name:"ResetParam"` + + // 是否忽略节点升级前检查 + SkipPreCheck *bool `json:"SkipPreCheck,omitempty" name:"SkipPreCheck"` + + // 最大可容忍的不可用Pod比例 + MaxNotReadyPercent *float64 `json:"MaxNotReadyPercent,omitempty" name:"MaxNotReadyPercent"` +} + +func (r *UpgradeClusterInstancesRequest) 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 *UpgradeClusterInstancesRequest) 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, "Operation") + delete(f, "UpgradeType") + delete(f, "InstanceIds") + delete(f, "ResetParam") + delete(f, "SkipPreCheck") + delete(f, "MaxNotReadyPercent") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "UpgradeClusterInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type UpgradeClusterInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *UpgradeClusterInstancesResponse) 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 *UpgradeClusterInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type UpgradeNodeResetParam struct { + + // 实例额外需要设置参数信息 + InstanceAdvancedSettings *InstanceAdvancedSettings `json:"InstanceAdvancedSettings,omitempty" name:"InstanceAdvancedSettings"` + + // 增强服务。通过该参数可以指定是否开启云安全、云监控等服务。若不指定该参数,则默认开启云监控、云安全服务。 + EnhancedService *EnhancedService `json:"EnhancedService,omitempty" name:"EnhancedService"` + + // 节点登录信息(目前仅支持使用Password或者单个KeyIds) + LoginSettings *LoginSettings `json:"LoginSettings,omitempty" name:"LoginSettings"` + + // 实例所属安全组。该参数可以通过调用 DescribeSecurityGroups 的返回值中的sgId字段来获取。若不指定该参数,则绑定默认安全组。(目前仅支持设置单个sgId) + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` +} + +type VersionInstance struct { + + // 版本名称 + // 注意:此字段可能返回 null,表示取不到有效值。 + Name *string `json:"Name,omitempty" name:"Name"` + + // 版本信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + Version *string `json:"Version,omitempty" name:"Version"` + + // Remark + // 注意:此字段可能返回 null,表示取不到有效值。 + Remark *string `json:"Remark,omitempty" name:"Remark"` +} + +type VolumeMount struct { + + // volume名称 + // 注意:此字段可能返回 null,表示取不到有效值。 + Name *string `json:"Name,omitempty" name:"Name"` + + // 挂载路径 + // 注意:此字段可能返回 null,表示取不到有效值。 + MountPath *string `json:"MountPath,omitempty" name:"MountPath"` + + // 是否只读 + // 注意:此字段可能返回 null,表示取不到有效值。 + ReadOnly *bool `json:"ReadOnly,omitempty" name:"ReadOnly"` + + // 子路径 + // 注意:此字段可能返回 null,表示取不到有效值。 + SubPath *string `json:"SubPath,omitempty" name:"SubPath"` + + // 传播挂载方式 + // 注意:此字段可能返回 null,表示取不到有效值。 + MountPropagation *string `json:"MountPropagation,omitempty" name:"MountPropagation"` + + // 子路径表达式 + // 注意:此字段可能返回 null,表示取不到有效值。 + SubPathExpr *string `json:"SubPathExpr,omitempty" name:"SubPathExpr"` +} diff --git a/examples/pcm_tencent.go b/examples/pcm_tencent.go new file mode 100644 index 00000000..ea086c46 --- /dev/null +++ b/examples/pcm_tencent.go @@ -0,0 +1,151 @@ +package main + +import ( + pcm_pod_tencent "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pod/server/tencent" + "fmt" + "strconv" +) + +/***** +regionId tencent:cn-hangzhou tc:ap-guangzhou hw: cn-east-3 +image: tencent nginx:latest + tencent registry-vpc.cn-hangzhou.tencentyuncs.com/eci_open/nginx + huawei library/nginx:stable-alpine-perl +*****/ +func tencentCreatePCM() (_err error) { + request := pcm_pod_tencent.NewCreateEKSContainerInstancesRequest() + + /****************PCM params******************/ + request.ProviderId = 1 + request.RegionId = "ap-guangzhou" + request.Namespace = "pcm" + /****************PCM params******************/ + _name := "pcm-test-tencnet" + _podImage := "nginx/nginx:latest" + _podName := "pcm-test-container" + _cpu, _ := strconv.ParseFloat("1", 64) + _memory, _ := strconv.ParseFloat("2", 64) + request.EksCiName = &_name + requestContainer := make([]*pcm_pod_tencent.Container, 0) + requestContainer = append(requestContainer, &pcm_pod_tencent.Container{ + Name: &_podName, + Image: &_podImage, + Cpu: &_cpu, + Memory: &_memory, + //Command: []*string{}, + Args: []*string{}, + //Envs: []*pcm_pod_tencent.Env{}, + //Ports: []*pcm_pod_tencent.Port{}, + //VolumeMounts: []*pcm_pod_tencent.VolumeMount{ + // &pcm_pod_tencent.VolumeMount{ + // Name: "pcm-test-tencnet-volume", + // MountPath: "/data", + // }, + //}, + }) + request.Containers = requestContainer + + resp, _err := pcm_pod_tencent.CreateEKSContainerInstances(request) + if _err != nil { + fmt.Println(_err) + return _err + } + fmt.Println(*resp.Response.RequestId) + return _err +} + +func tencentDescribePCM() (_err error) { + request := pcm_pod_tencent.NewDescribeEKSContainerInstancesRequest() + + /****************PCM params******************/ + request.ProviderId = 1 + //tencent:cn-hangzhou tc:ap-guangzhou hw: cn-east-3 + //request.RegionId = "cn-east-3" + request.Namespace = "pcm" + /****************PCM params******************/ + + resp, _err := pcm_pod_tencent.DescribeEKSContainerInstances(request) + if _err != nil { + fmt.Println(_err) + return _err + } + fmt.Println(*resp.Response.EksCis[0].EksCiId) + + return _err +} + +func tencentUpdatePCM() (_err error) { + request := pcm_pod_tencent.NewUpdateEKSContainerInstanceRequest() + _eksCiId := "eksci-4ti4856m" + _Name := "pcm-test-tencnet-update" + _RestartPolicy := "Never" + /****************PCM params******************/ + request.ProviderId = 1 + request.RegionId = "ap-guangzhou" + request.Namespace = "pcm" + request.EksCiId = &_eksCiId + /****************PCM params******************/ + request.Name = &_Name + _cpu, _ := strconv.ParseFloat("2", 64) + _memory, _ := strconv.ParseFloat("4", 64) + _image := "nginx/nginx:latest" + _name := "pcm-update-container" + request.RestartPolicy = &_RestartPolicy + requestContainer := make([]*pcm_pod_tencent.Container, 0) + requestContainer = append(requestContainer, &pcm_pod_tencent.Container{ + Name: &_name, + Image: &_image, + Cpu: &_cpu, + Memory: &_memory, + //Command: []*string{}, + Args: []*string{}, + //Envs: []*pcm_pod_tencent.Env{}, + //Ports: []*pcm_pod_tencent.Port{}, + //VolumeMounts: []*pcm_pod_tencent.VolumeMount{ + // &pcm_pod_tencent.VolumeMount{ + // Name: "pcm-test-tencnet-volume", + // MountPath: "/data", + // }, + //}, + }) + request.Containers = requestContainer + resp, _err := pcm_pod_tencent.UpdateEKSContainerInstance(request) + if _err != nil { + fmt.Println(_err) + return _err + } + fmt.Println(*resp.Response.RequestId) + + return _err +} + +func tencentDeletePCM() (_err error) { + _eksCiId := "eksci-4ti4856m" + request := pcm_pod_tencent.NewDeleteEKSContainerInstancesRequest() + /****************PCM params******************/ + request.ProviderId = 1 + //tencent:cn-hangzhou tc:ap-guangzhou hw: cn-east-3 + request.RegionId = "ap-guangzhou" + request.Namespace = "pcm" + request.EksCiIds = []*string{&_eksCiId} + /****************PCM params******************/ + + resp, _err := pcm_pod_tencent.DeleteEKSContainerInstances(request) + if _err != nil { + fmt.Println(_err) + return _err + } + fmt.Println(*resp.Response.RequestId) + + return _err +} + +func main() { + //err := tencentCreatePCM() + //err := tencentDescribePCM() + //err := tencentUpdatePCM() + err := tencentDeletePCM() + if err != nil { + panic(err) + } +} diff --git a/examples/tencent.go b/examples/tencent.go new file mode 100644 index 00000000..8a2a9517 --- /dev/null +++ b/examples/tencent.go @@ -0,0 +1,70 @@ +package main + +import ( + "fmt" + + "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/profile" + tke "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525" +) + +func main() { + + credential := common.NewCredential( + "SecretId", + "SecretKey", + ) + cpf := profile.NewClientProfile() + cpf.HttpProfile.Endpoint = "tke.tencentcloudapi.com" + client, _ := tke.NewClient(credential, "ap-beijing", cpf) + //创建容器实例 + request := tke.NewCreateEKSContainerInstancesRequest() + + response, err := client.CreateEKSContainerInstances(request) + if _, ok := err.(*errors.TencentCloudSDKError); ok { + fmt.Printf("An API error has returned: %s", err) + return + } + if err != nil { + panic(err) + } + fmt.Printf("%s", response.ToJsonString()) + + //查询容器实例 + desRequest := tke.NewDescribeEKSContainerInstancesRequest() + desResponse, err := client.DescribeEKSContainerInstances(desRequest) + if _, ok := err.(*errors.TencentCloudSDKError); ok { + fmt.Printf("An API error has returned: %s", err) + return + } + if err != nil { + panic(err) + } + fmt.Printf("%s", desResponse.ToJsonString()) + + //删除容器实例 + delRequest := tke.NewDeleteEKSContainerInstancesRequest() + delResponse, err := client.DeleteEKSContainerInstances(delRequest) + if _, ok := err.(*errors.TencentCloudSDKError); ok { + fmt.Printf("An API error has returned: %s", err) + return + } + if err != nil { + panic(err) + } + fmt.Printf("%s", delResponse.ToJsonString()) + + //更改容器实例 + updateRequest := tke.NewUpdateEKSContainerInstanceRequest() + updateResponse, err := client.UpdateEKSContainerInstance(updateRequest) + if _, ok := err.(*errors.TencentCloudSDKError); ok { + fmt.Printf("An API error has returned: %s", err) + return + } + if err != nil { + panic(err) + } + fmt.Printf("%s", updateResponse.ToJsonString()) + +}