Documentation
¶
Index ¶
- type AbnormalReason
- type AddClusterInstancesRequest
- type AddClusterInstancesResponse
- type Client
- func (c *Client) AddClusterInstances(request *AddClusterInstancesRequest) (response *AddClusterInstancesResponse, err error)
- func (c *Client) CreateCluster(request *CreateClusterRequest, emptyCluster bool) (response *CreateClusterResponse, err error)
- func (c *Client) DeleteCluster(request *DeleteClusterRequest) (response *DeleteClusterResponse, err error)
- func (c *Client) DeleteClusterInstances(request *DeleteClusterInstancesRequest) (response *DeleteClusterInstancesResponse, err error)
- func (c *Client) DescribeCluster(request *DescribeClusterRequest) (response *DescribeClusterResponse, err error)
- func (c *Client) DescribeClusterInstance(request *DescribeClusterInstancesRequest) (response *DescribeClusterInstancesResponse, err error)
- func (c *Client) DescribeClusterSecurityInfo(request *DescribeClusterSecurityInfoRequest) (response *DescribeClusterSecurityInfoResponse, err error)
- func (c *Client) ModifyClusterAttributes(request *ModifyClusterAttributesRequest) (response *ModifyClusterAttributesResponse, err error)
- func (c *Client) ModifyProjectID(request *ModifyProjectIDRequest) (response *ModifyProjectIDResponse, err error)
- func (c *Client) OperateClusterVip(request *OperateClusterVipRequest) (response *OperateClusterVipResponse, err error)
- type Cluster
- type CreateClusterRequest
- type CreateClusterResponse
- type DeleteClusterInstancesRequest
- type DeleteClusterInstancesResponse
- type DeleteClusterRequest
- type DeleteClusterResponse
- type DescribeClusterInstancesRequest
- type DescribeClusterInstancesResponse
- type DescribeClusterRequest
- type DescribeClusterResponse
- type DescribeClusterSecurityInfoRequest
- type DescribeClusterSecurityInfoResponse
- type ModifyClusterAttributesRequest
- type ModifyClusterAttributesResponse
- type ModifyProjectIDRequest
- type ModifyProjectIDResponse
- type Node
- type OperateClusterVipRequest
- type OperateClusterVipResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AbnormalReason ¶
type AbnormalReason struct {
MemoryPressure string `json:"MemoryPressure" name:"MemoryPressure"`
OutOfDisk string `json:"OutOfDisk" name:"OutOfDisk"`
Unknown string `json:"Unknown" name:"Unknown"`
}
AbnormalReason defines the abnormal reason response
type AddClusterInstancesRequest ¶ added in v0.2.3
type AddClusterInstancesRequest struct {
*tchttp.BaseRequest
// The name of the cluster
ClusterID string `json:"clusterId" name:"clusterId"`
ExpandInstanceNum int64 `json:"expandInstanceNum" name:"expandInstanceNum"`
// The description of the cluster
ClusterDesc string `json:"clusterDesc" name:"clusterDesc"`
// The zone id of the cluster
ZoneID string `json:"zoneId" name:"zoneId"`
// The number of nodes purchased, up to 100
GoodsNum int64 `json:"goodsNum" name:"goodsNum"`
// CPU core number
CPU int64 `json:"cpu" name:"cpu"`
// Memory size (GB)
Mem int64 `json:"mem" name:"mem"`
// System name, Centos7.2x86_64 or ubuntu16.04.1 LTSx86_64, all nodes in the cluster use this system,
// the extension node will also automatically use this system (*required)
OsName string `json:"osName" name:"osName"`
// System name, Centos7.2x86_64 or ubuntu16.04.1 LTSx86_64, all nodes in the cluster use this system,
// the extension node will also automatically use this system (*required)
InstanceType string `json:"instanceType" name:"instanceType"`
// See CVM Instance Configuration for details . Default: S1.SMALL1
CvmType string `json:"cvmType" name:"cvmType"`
// The annual renewal fee for the annual subscription, default to NOTIFY_AND_AUTO_RENEW
RenewFlag string `json:"renewFlag" name:"renewFlag"`
// Type of bandwidth
// PayByMonth vm: PayByMonth, PayByTraffic,
// PayByHour vm: PayByHour, PayByTraffic
BandwidthType string `json:"bandwidthType" name:"bandwidthType"`
// Public network bandwidth (Mbps), when the traffic is charged for the public network bandwidth peak
Bandwidth int64 `json:"bandwidth" name:"bandwidth"`
// Whether to open the public network IP, 0: not open 1: open
WanIP int64 `json:"wanIp" name:"wanIp"`
// Subnet ID
SubnetID string `json:"subnetId" name:"subnetId"`
// Whether it is a public network gateway
// 0: non-public network gateway
// 1: public network gateway
IsVpcGateway int64 `json:"isVpcGateway" name:"isVpcGateway"`
// system disk size. linux system adjustment range is 20 - 50g, step size is 1
RootSize int64 `json:"rootSize" name:"rootSize"`
// System disk type. System disk type restrictions are detailed in the CVM instance configuration.
// default value of the SSD cloud drive : CLOUD_BASIC.
RootType string `json:"rootType" name:"rootType"`
// Data disk size (GB)
StorageSize int64 `json:"storageSize" name:"storageSize"`
// Data disk type
StorageType string `json:"storageType" name:"storageType"`
// Node password
Password string `json:"password" name:"password"`
// Key id
KeyID string `json:"keyId" name:"keyId"`
// The annual subscription period of the annual subscription month, unit month. This parameter is required when cvmType is PayByMonth
Period int64 `json:"period" name:"period"`
// Security group ID, default does not bind any security groups, please fill out the inquiry list of security groups sgId field interface returned
SgID string `json:"sgId" name:"sgId"`
// Base64-encoded user script, which is executed after the k8s component is run. The user is required to guarantee the reentrant and retry logic of the script.
UserScript string `json:"userScript" name:"userScript"`
}
AddClusterInstancesRequest defines the addClusterInstances request
func NewAddClusterInstancesRequest ¶ added in v0.2.3
func NewAddClusterInstancesRequest() (request *AddClusterInstancesRequest)
NewAddClusterInstancesRequest defines driver cluster add instances request
func (*AddClusterInstancesRequest) FromJSONString ¶ added in v0.2.3
func (r *AddClusterInstancesRequest) FromJSONString(s string) error
FromJSONString defines request from json format
func (*AddClusterInstancesRequest) ToJSONString ¶ added in v0.2.3
func (r *AddClusterInstancesRequest) ToJSONString() string
ToJSONString defines request to json format
type AddClusterInstancesResponse ¶ added in v0.2.3
type AddClusterInstancesResponse struct {
*tchttp.BaseResponse
// Cluster data
Data struct {
RequestID string `json:"requestId" name:"requestId"`
InstanceIDs []string `json:"instanceIds" name:"instanceIds"`
} `json:"data"`
// Public error code. 0 means success, other values indicates failure
Code int64 `json:"code" name:"code"`
// Module error message description, related to the interface
Message string `json:"message" name:"message"`
// Service side error code. Returns Success when successful,
// and returns the reason for a specific business error when an error occurs
CodeDesc string `json:"codeDesc" name:"codeDesc"`
}
AddClusterInstancesResponse defines the add cluster instances response
func NewAddClusterInstancesResponse ¶ added in v0.2.3
func NewAddClusterInstancesResponse() (response *AddClusterInstancesResponse)
NewAddClusterInstancesResponse defines driver cluster add instances response
func (*AddClusterInstancesResponse) FromJSONString ¶ added in v0.2.3
func (r *AddClusterInstancesResponse) FromJSONString(s string) error
FromJSONString defines response from json format
func (*AddClusterInstancesResponse) ToJSONString ¶ added in v0.2.3
func (r *AddClusterInstancesResponse) ToJSONString() string
ToJSONString defines response to json format
type Client ¶
Client defines the client struct
func NewClient ¶
func NewClient(credential *common.Credential, region string, clientProfile *profile.ClientProfile) (client *Client, err error)
NewClient init new tke client
func (*Client) AddClusterInstances ¶ added in v0.2.3
func (c *Client) AddClusterInstances(request *AddClusterInstancesRequest) (response *AddClusterInstancesResponse, err error)
AddClusterInstances adds new cluster instances to the cluster
func (*Client) CreateCluster ¶
func (c *Client) CreateCluster(request *CreateClusterRequest, emptyCluster bool) (response *CreateClusterResponse, err error)
CreateCluster creates a container cluster
func (*Client) DeleteCluster ¶
func (c *Client) DeleteCluster(request *DeleteClusterRequest) (response *DeleteClusterResponse, err error)
DeleteCluster removes the cluster
func (*Client) DeleteClusterInstances ¶ added in v0.2.3
func (c *Client) DeleteClusterInstances(request *DeleteClusterInstancesRequest) (response *DeleteClusterInstancesResponse, err error)
DeleteClusterInstances removes cluster instances by id
func (*Client) DescribeCluster ¶
func (c *Client) DescribeCluster(request *DescribeClusterRequest) (response *DescribeClusterResponse, err error)
DescribeCluster get the cluster details
func (*Client) DescribeClusterInstance ¶
func (c *Client) DescribeClusterInstance(request *DescribeClusterInstancesRequest) (response *DescribeClusterInstancesResponse, err error)
DescribeClusterInstance get the cluster instances
func (*Client) DescribeClusterSecurityInfo ¶
func (c *Client) DescribeClusterSecurityInfo(request *DescribeClusterSecurityInfoRequest) (response *DescribeClusterSecurityInfoResponse, err error)
DescribeClusterSecurityInfo get the cluster details
func (*Client) ModifyClusterAttributes ¶ added in v0.2.3
func (c *Client) ModifyClusterAttributes(request *ModifyClusterAttributesRequest) (response *ModifyClusterAttributesResponse, err error)
ModifyClusterAttributes update cluster attributes
func (*Client) ModifyProjectID ¶ added in v0.2.3
func (c *Client) ModifyProjectID(request *ModifyProjectIDRequest) (response *ModifyProjectIDResponse, err error)
ModifyProjectID update cluster attributes
func (*Client) OperateClusterVip ¶
func (c *Client) OperateClusterVip(request *OperateClusterVipRequest) (response *OperateClusterVipResponse, err error)
OperateClusterVip create or remove cluster vip
type Cluster ¶
type Cluster struct {
ClusterID string `json:"clusterId" name:"clusterId"`
ClusterName string `json:"clusterName" name:"clusterName"`
Description string `json:"description" name:"description"`
ClusterCIDR string `json:"clusterCIDR" name:"clusterCIDR"`
UnVpcID string `json:"unVpcId" name:"unVpcId"`
VpcID int64 `json:"vpcId" name:"vpcId"`
Status string `json:"status" name:"status"`
NodeNum int64 `json:"nodeNum" name:"nodeNum"`
NodeStatus string `json:"nodeStatus" name:"nodeStatus"`
TotalCPU int64 `json:"totalCpu" name:"totalCpu"`
TotalMem int64 `json:"totalMem" name:"totalMem"`
OS string `json:"os" name:"os"`
CreatedAt int64 `json:"createdAt" name:"createdAt"`
UpdatedAt int64 `json:"updatedAt" name:"updatedAt"`
RegionID string `json:"regionId" name:"regionId"`
Region string `json:"region" name:"region"`
K8sVersion string `json:"k8sVersion" name:"k8sVersion"`
ClusterExternalEndpoint string `json:"clusterExternalEndpoint" name:"clusterExternalEndpoint"`
ProjectID int64 `json:"projectId" name:"projectId"`
}
Cluster defines the cluster response
type CreateClusterRequest ¶
type CreateClusterRequest struct {
*tchttp.BaseRequest
// The name of the cluster
ClusterName string `json:"clusterName" name:"clusterName"`
// The description of the cluster
ClusterDesc string `json:"clusterDesc" name:"clusterDesc"`
// CIDR used to assign cluster containers and service IPs must not conflict with VPC CIDR or with other cluster CIDRs in the same VPC (*required)
ClusterCIDR string `json:"clusterCIDR" name:"clusterCIDR"`
// Whether to ignore the ClusterCIDR conflict error, the default is 0
// 0: Do not ignore the conflict (and return an error); 1: Ignore the conflict (continue to create)
IgnoreClusterCIDRConflict int64 `json:"ignoreClusterCidrConflict" name:"ignoreClusterCidrConflict"`
// The zone id of the cluster
ZoneID string `json:"zoneId" name:"zoneId"`
// The number of nodes purchased, up to 100
GoodsNum int64 `json:"goodsNum" name:"goodsNum"`
// CPU core number
CPU int64 `json:"cpu" name:"cpu"`
// Memory size (GB)
Mem int64 `json:"mem" name:"mem"`
// System name, Centos7.2x86_64 or ubuntu16.04.1 LTSx86_64, all nodes in the cluster use this system,
// the extension node will also automatically use this system (*required)
OsName string `json:"osName" name:"osName"`
// System name, Centos7.2x86_64 or ubuntu16.04.1 LTSx86_64, all nodes in the cluster use this system,
// the extension node will also automatically use this system (*required)
InstanceType string `json:"instanceType" name:"instanceType"`
// See CVM Instance Configuration for details . Default: S1.SMALL1
CvmType string `json:"cvmType" name:"cvmType"`
// The annual renewal fee for the annual subscription, default to NOTIFY_AND_AUTO_RENEW
RenewFlag string `json:"renewFlag" name:"renewFlag"`
// Type of bandwidth
// PayByMonth vm: PayByMonth, PayByTraffic,
// PayByHour vm: PayByHour, PayByTraffic
BandwidthType string `json:"bandwidthType" name:"bandwidthType"`
// Public network bandwidth (Mbps), when the traffic is charged for the public network bandwidth peak
Bandwidth int64 `json:"bandwidth" name:"bandwidth"`
// Whether to open the public network IP, 0: not open 1: open
WanIP int64 `json:"wanIp" name:"wanIp"`
// Private network ID
VpcID string `json:"vpcId" name:"vpcId"`
// Subnet ID
SubnetID string `json:"subnetId" name:"subnetId"`
// Whether it is a public network gateway
// 0: non-public network gateway
// 1: public network gateway
IsVpcGateway int64 `json:"isVpcGateway" name:"isVpcGateway"`
// system disk size. linux system adjustment range is 20 - 50g, step size is 1
RootSize int64 `json:"rootSize" name:"rootSize"`
// System disk type. System disk type restrictions are detailed in the CVM instance configuration.
// default value of the SSD cloud drive : CLOUD_BASIC.
RootType string `json:"rootType" name:"rootType"`
// Data disk size (GB)
StorageSize int64 `json:"storageSize" name:"storageSize"`
// Data disk type
StorageType string `json:"storageType" name:"storageType"`
// Node password
Password string `json:"password" name:"password"`
// Key id
KeyID string `json:"keyId" name:"keyId"`
// The annual subscription period of the annual subscription month, unit month. This parameter is required when cvmType is PayByMonth
Period int64 `json:"period" name:"period"`
// The cluster master occupies the IP of a VPC subnet. This parameter specifies which subnet the IP is occupied by the master.
// This subnet must be in the same VPC as the cluster.
MasterSubnetID string `json:"masterSubnetId" name:"masterSubnetId"`
// Security group ID, default does not bind any security groups, please fill out the inquiry list of security groups sgId field interface returned
SgID string `json:"sgId" name:"sgId"`
// Base64-encoded user script, which is executed after the k8s component is run. The user is required to guarantee the reentrant and retry logic of the script.
UserScript string `json:"userScript" name:"userScript"`
// K8S cluster version
ClusterVersion string `json:"clusterVersion" name:"clusterVersion"`
// Project ID
ProjectID int64 `json:"projectId" name:"projectId"`
}
CreateClusterRequest defines create cluster request parameters
func NewCreateClusterRequest ¶
func NewCreateClusterRequest(emptyCluster bool) (request *CreateClusterRequest)
NewCreateClusterRequest defines create cluster request
func (*CreateClusterRequest) FromJSONString ¶ added in v0.2.0
func (r *CreateClusterRequest) FromJSONString(s string) error
FromJSONString defines request from json format
func (*CreateClusterRequest) ToJSONString ¶ added in v0.2.0
func (r *CreateClusterRequest) ToJSONString() string
ToJSONString defines request to json format
type CreateClusterResponse ¶
type CreateClusterResponse struct {
*tchttp.BaseResponse
// Public error code. 0 means success, other values indicate failure
Code int64 `json:"code" name:"code"`
// Module error message description, related to the interface
Message string `json:"message" name:"message"`
// Service side error code. Returns Success when successful,
// and returns the reason for a specific business error when an error occurs
CodeDesc string `json:"codeDesc" name:"codeDesc"`
// Cluster data
Data struct {
// Request ID
RequestID int64 `json:"requestId" name:"requestId"`
// Cluster ID
ClusterID string `json:"clusterId" name:"clusterId"`
} `json:"data"`
}
CreateClusterResponse defines create cluster response
func NewCreateClusterResponse ¶
func NewCreateClusterResponse() (response *CreateClusterResponse)
NewCreateClusterResponse defines create cluster response
func (*CreateClusterResponse) FromJSONString ¶ added in v0.2.0
func (r *CreateClusterResponse) FromJSONString(s string) error
FromJSONString defines request from json format
func (*CreateClusterResponse) ToJSONString ¶ added in v0.2.0
func (r *CreateClusterResponse) ToJSONString() string
ToJSONString defines request to json format
type DeleteClusterInstancesRequest ¶ added in v0.2.3
type DeleteClusterInstancesRequest struct {
*tchttp.BaseRequest
ClusterID string `json:"clusterId" name:"clusterId"`
InstanceIDs []string `json:"instanceIds" name:"instanceIds"`
NodeDeleteMode string `json:"nodeDeleteMode" name:"nodeDeleteMode"`
}
DeleteClusterInstancesRequest defines the delete cluster instances request
func NewDeleteClusterInstancesRequest ¶ added in v0.2.3
func NewDeleteClusterInstancesRequest() (request *DeleteClusterInstancesRequest)
NewDeleteClusterInstancesRequest defines driver cluster delete instances request
func (*DeleteClusterInstancesRequest) FromJSONString ¶ added in v0.2.3
func (r *DeleteClusterInstancesRequest) FromJSONString(s string) error
FromJSONString defines response from json format
func (*DeleteClusterInstancesRequest) ToJSONString ¶ added in v0.2.3
func (r *DeleteClusterInstancesRequest) ToJSONString() string
ToJSONString defines response to json format
type DeleteClusterInstancesResponse ¶ added in v0.2.3
type DeleteClusterInstancesResponse struct {
*tchttp.BaseResponse
// Public error code. 0 means success, other values indicates failure
Code int64 `json:"code" name:"code"`
// Module error message description, related to the interface
Message string `json:"message" name:"message"`
// Service side error code. Returns Success when successful,
// and returns the reason for a specific business error when an error occurs
CodeDesc string `json:"codeDesc" name:"codeDesc"`
}
DeleteClusterInstancesResponse defines the delete cluster instances response
func NewDeleteClusterInstancesResponse ¶ added in v0.2.3
func NewDeleteClusterInstancesResponse() (response *DeleteClusterInstancesResponse)
NewDeleteClusterInstancesResponse defines driver cluster delete instances response
func (*DeleteClusterInstancesResponse) FromJSONString ¶ added in v0.2.3
func (r *DeleteClusterInstancesResponse) FromJSONString(s string) error
FromJSONString defines response from json format
func (*DeleteClusterInstancesResponse) ToJSONString ¶ added in v0.2.3
func (r *DeleteClusterInstancesResponse) ToJSONString() string
ToJSONString defines response to json format
type DeleteClusterRequest ¶
type DeleteClusterRequest struct {
*tchttp.BaseRequest
ClusterID string `json:"clusterId" name:"clusterId"`
// Cluster node deletion mode, mainly for volume-based billing hosts, the package annual subscription host can only do the removal operation
// RemoveOnly (removal only)
// Return (return)
NodeDeleteMode string `json:"nodeDeleteMode" name:"nodeDeleteMode"`
}
DeleteClusterRequest defines the delete cluster request
func NewDeleteClusterRequest ¶
func NewDeleteClusterRequest() (request *DeleteClusterRequest)
NewDeleteClusterRequest defines delete cluster request
func (*DeleteClusterRequest) FromJSONString ¶ added in v0.2.0
func (r *DeleteClusterRequest) FromJSONString(s string) error
FromJSONString defines request from json format
func (*DeleteClusterRequest) ToJSONString ¶ added in v0.2.0
func (r *DeleteClusterRequest) ToJSONString() string
ToJSONString defines request to json format
type DeleteClusterResponse ¶
type DeleteClusterResponse struct {
*tchttp.BaseResponse
// Cluster data
Data struct {
// Task ID
RequestID int64 `json:"requestId" name:"requestId"`
} `json:"data"`
// Public error code. 0 means success, other values indicate failure
Code int64 `json:"code" name:"code"`
// Module error message description, related to the interface
Message string `json:"message" name:"message"`
// Service side error code. Returns Success when successful,
// and returns the reason for a specific business error when an error occurs
CodeDesc string `json:"codeDesc" name:"codeDesc"`
}
DeleteClusterResponse defines the delete cluster response
func NewDeleteContainerInstanceResponse ¶
func NewDeleteContainerInstanceResponse() (response *DeleteClusterResponse)
NewDeleteContainerInstanceResponse defines delete cluster response
func (*DeleteClusterResponse) FromJSONString ¶ added in v0.2.0
func (r *DeleteClusterResponse) FromJSONString(s string) error
FromJSONString defines request from json format
func (*DeleteClusterResponse) ToJSONString ¶ added in v0.2.0
func (r *DeleteClusterResponse) ToJSONString() string
ToJSONString defines request to json format
type DescribeClusterInstancesRequest ¶
type DescribeClusterInstancesRequest struct {
*tchttp.BaseRequest
//Cluster ID
ClusterID string `json:"clusterId" name:"clusterId"`
// Offset, default 0
Offset string `json:"offset" name:"offset"`
// Maximum output number, default 20
Limit string `json:"limit" name:"limit"`
// Namespace, default is default
Namespace string `json:"Namespace" name:"namespace"`
// List of instances, default is empty
InstancesID []string `json:"instancesId" name:"instancesId"`
}
DescribeClusterInstancesRequest defines cluster instance request
func NewDescribeClusterInstancesRequest ¶
func NewDescribeClusterInstancesRequest() (request *DescribeClusterInstancesRequest)
NewDescribeClusterInstancesRequest defines get driver cluster request
func (*DescribeClusterInstancesRequest) FromJSONString ¶ added in v0.2.0
func (r *DescribeClusterInstancesRequest) FromJSONString(s string) error
FromJSONString defines request from json format
func (*DescribeClusterInstancesRequest) ToJSONString ¶ added in v0.2.0
func (r *DescribeClusterInstancesRequest) ToJSONString() string
ToJSONString defines request to json format
type DescribeClusterInstancesResponse ¶
type DescribeClusterInstancesResponse struct {
*tchttp.BaseResponse
// Cluster data
Data struct {
// Total number of cluster nodes
TotalCount int64 `json:"totalCount" name:"totalCount"`
// Node list, details are as follows
Nodes []Node `json:"nodes" name:"nodes"`
} `json:"data"`
// Public error code. 0 means success, other values indicate failure
Code int64 `json:"code" name:"code"`
// Module error message description, related to interface
Message string `json:"message" name:"message"`
// Business error code. Returns Success when successful, and returns the reason for a specific business error when an error occurs
CodeDesc string `json:"codeDesc" name:"codeDesc"`
}
DescribeClusterInstancesResponse defines describe cluster instance response
func NewDescribeClusterInstancesResponse ¶
func NewDescribeClusterInstancesResponse() (response *DescribeClusterInstancesResponse)
NewDescribeClusterInstancesResponse defines get driver cluster response
func (*DescribeClusterInstancesResponse) FromJSONString ¶ added in v0.2.0
func (r *DescribeClusterInstancesResponse) FromJSONString(s string) error
FromJSONString defines request from json format
func (*DescribeClusterInstancesResponse) ToJSONString ¶ added in v0.2.0
func (r *DescribeClusterInstancesResponse) ToJSONString() string
ToJSONString defines request to json format
type DescribeClusterRequest ¶
type DescribeClusterRequest struct {
*tchttp.BaseRequest
ClusterIds []string `json:"clusterIds" name:"clusterIds"`
ClusterName string `json:"clusterName" name:"clusterName"`
Status string `json:"status" name:"status"`
OrderField string `json:"orderField" name:"orderField"`
OrderType string `json:"orderType" name:"orderType"`
Offset int64 `json:"offset" name:"offset"`
Limit int64 `json:"limit" name:"limit"`
}
DescribeClusterRequest defines the delete cluster request
func NewDescribeClusterRequest ¶
func NewDescribeClusterRequest() (request *DescribeClusterRequest)
NewDescribeClusterRequest defines driver cluster request
func (*DescribeClusterRequest) FromJSONString ¶ added in v0.2.0
func (r *DescribeClusterRequest) FromJSONString(s string) error
FromJSONString defines request from json format
func (*DescribeClusterRequest) ToJSONString ¶ added in v0.2.0
func (r *DescribeClusterRequest) ToJSONString() string
ToJSONString defines request to json format
type DescribeClusterResponse ¶
type DescribeClusterResponse struct {
*tchttp.BaseResponse
// Cluster data
Data struct {
// Total number of cluster nodes
TotalCount int64 `json:"totalCount" name:"totalCount"`
// Cluster list, details are as follows
Clusters []Cluster `json:"clusters" name:"clusters"`
} `json:"data"`
// Public error code. 0 means success, other values indicate failure
Code int64 `json:"code" name:"code"`
// Module error message description, related to the interface
Message string `json:"message" name:"message"`
// Service side error code. Returns Success when successful,
// and returns the reason for a specific business error when an error occurs
CodeDesc string `json:"codeDesc" name:"codeDesc"`
}
DescribeClusterResponse defines the describe cluster response
func NewDescribeClusterResponse ¶
func NewDescribeClusterResponse() (response *DescribeClusterResponse)
NewDescribeClusterResponse defines driver cluster response
func (*DescribeClusterResponse) FromJSONString ¶ added in v0.2.0
func (r *DescribeClusterResponse) FromJSONString(s string) error
FromJSONString defines request from json format
func (*DescribeClusterResponse) ToJSONString ¶ added in v0.2.0
func (r *DescribeClusterResponse) ToJSONString() string
ToJSONString defines request to json format
type DescribeClusterSecurityInfoRequest ¶
type DescribeClusterSecurityInfoRequest struct {
*tchttp.BaseRequest
ClusterID string `json:"clusterId" name:"clusterId"`
}
DescribeClusterSecurityInfoRequest defines the describeClusterSecurityInfo request
func NewDescribeClusterSecurityInfoRequest ¶
func NewDescribeClusterSecurityInfoRequest() (request *DescribeClusterSecurityInfoRequest)
NewDescribeClusterSecurityInfoRequest defines driver cluster security info request
func (*DescribeClusterSecurityInfoRequest) FromJSONString ¶ added in v0.2.0
func (r *DescribeClusterSecurityInfoRequest) FromJSONString(s string) error
FromJSONString defines request from json format
func (*DescribeClusterSecurityInfoRequest) ToJSONString ¶ added in v0.2.0
func (r *DescribeClusterSecurityInfoRequest) ToJSONString() string
ToJSONString defines request to json format
type DescribeClusterSecurityInfoResponse ¶
type DescribeClusterSecurityInfoResponse struct {
*tchttp.BaseResponse
// Cluster data
Data struct {
UserName string `json:"userName" name:"userName"`
Password string `json:"password" name:"password"`
CertificationAuthority string `json:"certificationAuthority" name:"certificationAuthority"`
ClusterExternalEndpoint string `json:"clusterExternalEndpoint" name:"clusterExternalEndpoint"`
PgwEndpoint string `json:"pgwEndpoint" name:"pgwEndpoint"`
Domain string `json:"domain" name:"domain"`
} `json:"data"`
// Public error code. 0 means success, other values indicate failure
Code int64 `json:"code" name:"code"`
// Module error message description, related to the interface
Message string `json:"message" name:"message"`
// Service side error code. Returns Success when successful,
// and returns the reason for a specific business error when an error occurs
CodeDesc string `json:"codeDesc" name:"codeDesc"`
}
DescribeClusterSecurityInfoResponse defines the describeClusterSecurityInfo response
func NewDescribeClusterSecurityInfoResponse ¶
func NewDescribeClusterSecurityInfoResponse() (response *DescribeClusterSecurityInfoResponse)
NewDescribeClusterSecurityInfoResponse defines driver cluster security info response
func (*DescribeClusterSecurityInfoResponse) FromJSONString ¶ added in v0.2.0
func (r *DescribeClusterSecurityInfoResponse) FromJSONString(s string) error
FromJSONString defines request from json format
func (*DescribeClusterSecurityInfoResponse) ToJSONString ¶ added in v0.2.0
func (r *DescribeClusterSecurityInfoResponse) ToJSONString() string
ToJSONString defines request to json format
type ModifyClusterAttributesRequest ¶ added in v0.2.3
type ModifyClusterAttributesRequest struct {
*tchttp.BaseRequest
ClusterID string `json:"clusterId" name:"clusterId"`
ClusterName string `json:"clusterName" name:"clusterName"`
ClusterDesc string `json:"clusterDesc" name:"clusterDesc"`
}
ModifyClusterAttributesRequest defines the modify cluster attributes request
func NewModifyClusterAttributesRequest ¶ added in v0.2.3
func NewModifyClusterAttributesRequest() (request *ModifyClusterAttributesRequest)
NewModifyClusterAttributesRequest defines driver modify cluster attributes request
func (*ModifyClusterAttributesRequest) FromJSONString ¶ added in v0.2.3
func (r *ModifyClusterAttributesRequest) FromJSONString(s string) error
FromJSONString defines request from json format
func (*ModifyClusterAttributesRequest) ToJSONString ¶ added in v0.2.3
func (r *ModifyClusterAttributesRequest) ToJSONString() string
ToJSONString defines request to json format
type ModifyClusterAttributesResponse ¶ added in v0.2.3
type ModifyClusterAttributesResponse struct {
*tchttp.BaseResponse
// Public error code. 0 means success, other values indicates failure
Code int64 `json:"code" name:"code"`
// Module error message description, related to the interface
Message string `json:"message" name:"message"`
// Service side error code. Returns Success when successful,
// and returns the reason for a specific business error when an error occurs
CodeDesc string `json:"codeDesc" name:"codeDesc"`
}
ModifyClusterAttributesResponse defines the response
func NewModifyClusterAttributesResponse ¶ added in v0.2.3
func NewModifyClusterAttributesResponse() (response *ModifyClusterAttributesResponse)
NewModifyClusterAttributesResponse defines driver modify cluster attributes response
func (*ModifyClusterAttributesResponse) FromJSONString ¶ added in v0.2.3
func (r *ModifyClusterAttributesResponse) FromJSONString(s string) error
FromJSONString defines request from json format
func (*ModifyClusterAttributesResponse) ToJSONString ¶ added in v0.2.3
func (r *ModifyClusterAttributesResponse) ToJSONString() string
ToJSONString defines request to json format
type ModifyProjectIDRequest ¶ added in v0.2.3
type ModifyProjectIDRequest struct {
*tchttp.BaseRequest
ClusterID string `json:"clusterId" name:"clusterId"`
ProjectID int64 `json:"projectId" name:"projectId"`
}
ModifyProjectIDRequest defines the modify project ID request
func NewModifyProjectIDRequest ¶ added in v0.2.3
func NewModifyProjectIDRequest() (request *ModifyProjectIDRequest)
NewModifyProjectIDRequest defines driver modify cluster attributes request
func (*ModifyProjectIDRequest) FromJSONString ¶ added in v0.2.3
func (r *ModifyProjectIDRequest) FromJSONString(s string) error
FromJSONString defines request from json format
func (*ModifyProjectIDRequest) ToJSONString ¶ added in v0.2.3
func (r *ModifyProjectIDRequest) ToJSONString() string
ToJSONString defines request to json format
type ModifyProjectIDResponse ¶ added in v0.2.3
type ModifyProjectIDResponse struct {
*tchttp.BaseResponse
// Public error code. 0 means success, other values indicates failure
Code int64 `json:"code" name:"code"`
// Module error message description, related to the interface
Message string `json:"message" name:"message"`
// Service side error code. Returns Success when successful,
// and returns the reason for a specific business error when an error occurs
CodeDesc string `json:"codeDesc" name:"codeDesc"`
}
ModifyProjectIDResponse defines the response
func NewModifyProjectIDResponse ¶ added in v0.2.3
func NewModifyProjectIDResponse() (response *ModifyProjectIDResponse)
NewModifyProjectIDResponse defines driver modify cluster attributes response
func (*ModifyProjectIDResponse) FromJSONString ¶ added in v0.2.3
func (r *ModifyProjectIDResponse) FromJSONString(s string) error
FromJSONString defines request from json format
func (*ModifyProjectIDResponse) ToJSONString ¶ added in v0.2.3
func (r *ModifyProjectIDResponse) ToJSONString() string
ToJSONString defines request to json format
type Node ¶
type Node struct {
InstanceID string `json:"instanceId" name:"instanceId"`
ProjectID int64 `json:"projectId" name:"projectId"`
InstanceName string `json:"instanceName" name:"instanceName"`
InstanceType string `json:"instanceType" name:"instanceType"`
KernelVersion string `json:"kernelVersion" name:"kernelVersion"`
PodCidr string `json:"podCidr" name:"podCidr"`
CPU int64 `json:"cpu" name:"cpu"`
Mem int64 `json:"mem" name:"mem"`
Gpu int64 `json:"gpu" name:"gpu"`
WanIP string `json:"wanIp" name:"wanIp"`
LanIP string `json:"lanIp" name:"lanIp"`
OsImage string `json:"osImage" name:"osImage"`
IsNormal int64 `json:"isNormal" name:"isNormal"`
CvmState int64 `json:"cvmState" name:"cvmState"`
CvmPayMode int64 `json:"cvmPayMode" name:"cvmPayMode"`
NetworkPayMode int64 `json:"networkPayMode" name:"networkPayMode"`
CreatedAt string `json:"createdAt" name:"createdAt"`
InstanceCreateTime string `json:"instanceCreateTime" name:"instanceCreateTime"`
InstanceDeadlineTime string `json:"instanceDeadlineTime" name:"instanceDeadlineTime"`
ZoneID int64 `json:"zoneId" name:"zoneId"`
Zone string `json:"zone" name:"zone"`
AbnormalReason AbnormalReason `json:"abnormalReason" name:"abnormalReason"`
Labels map[string]string `json:"labels" name:"labels"`
AutoScalingGroupID string `json:"autoScalingGroupId" name:"autoScalingGroupId"`
Unschedulable bool `json:"unschedulable" name:"unschedulable"`
DrainStatus string `json:"drainStatus" name:"drainStatus"`
}
Node defines the cluster node responses
type OperateClusterVipRequest ¶
type OperateClusterVipRequest struct {
*tchttp.BaseRequest
ClusterID string `json:"clusterId" name:"clusterId"`
Operation string `json:"operation" name:"operation"`
}
OperateClusterVipRequest defines the clusterVip request
func NewOperateClusterVipRequest ¶
func NewOperateClusterVipRequest() (request *OperateClusterVipRequest)
NewOperateClusterVipRequest defines driver cluster vip request
func (*OperateClusterVipRequest) FromJSONString ¶ added in v0.2.0
func (r *OperateClusterVipRequest) FromJSONString(s string) error
FromJSONString defines request from json format
func (*OperateClusterVipRequest) ToJSONString ¶ added in v0.2.0
func (r *OperateClusterVipRequest) ToJSONString() string
ToJSONString defines request to json format
type OperateClusterVipResponse ¶
type OperateClusterVipResponse struct {
*tchttp.BaseResponse
// Cluster data
Data struct {
RequestID string `json:"requestId" name:"requestId"`
} `json:"data"`
// Public error code. 0 means success, other values indicate failure
Code int64 `json:"code" name:"code"`
// Module error message description, related to the interface
Message string `json:"message" name:"message"`
// Service side error code. Returns Success when successful,
// and returns the reason for a specific business error when an error occurs
CodeDesc string `json:"codeDesc" name:"codeDesc"`
}
OperateClusterVipResponse defines the clusterVip response
func NewOperateClusterVipResponse ¶
func NewOperateClusterVipResponse() (response *OperateClusterVipResponse)
NewOperateClusterVipResponse defines driver cluster vip response
func (*OperateClusterVipResponse) FromJSONString ¶ added in v0.2.0
func (r *OperateClusterVipResponse) FromJSONString(s string) error
FromJSONString defines request from json format
func (*OperateClusterVipResponse) ToJSONString ¶ added in v0.2.0
func (r *OperateClusterVipResponse) ToJSONString() string
ToJSONString defines request to json format