Documentation
¶
Index ¶
- Constants
- Variables
- func ResetPassword(c *golangsdk.ServiceClient, clusterId string, opts ResetPasswordOpts) (*golangsdk.Result, error)
- func Resize(c *golangsdk.ServiceClient, clusterId string, scaleOutCount int) (*golangsdk.Result, error)
- type Cluster
- type ClusterDetail
- type ClusterDetailsRst
- type CreateClusterRst
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- type CreateRsp
- type DeleteResult
- type Endpoints
- type FailInfo
- type FailedReasons
- type GetResult
- type IdObject
- type ListClustersRst
- type ListOpts
- type MaintainWindow
- type NodeDetail
- type ParameterGroup
- type PublicEndpoints
- type PublicIp
- type PublicIpOpts
- type ResetPasswordOpts
- type ResizeInfo
Constants ¶
View Source
const ( PublicBindTypeAuto = "auto_assign" PublicBindTypeNotUse = "not_use" PublicBindTypeBindExisting = "bind_existing" )
Variables ¶
View Source
var RequestOpts = golangsdk.RequestOpts{ MoreHeaders: map[string]string{"Content-Type": "application/json", "X-Language": "en-us"}, }
Functions ¶
func ResetPassword ¶
func ResetPassword(c *golangsdk.ServiceClient, clusterId string, opts ResetPasswordOpts) (*golangsdk.Result, error)
Types ¶
type Cluster ¶
type Cluster struct {
Status string `json:"status"`
SubStatus string `json:"sub_status"`
Updated string `json:"updated"` //ISO8601:YYYY-MM-DDThh:mm:ssZ
Endpoints []Endpoints `json:"endPoints"`
Name string `json:"name"`
NumberOfNode int `json:"number_of_node"`
AvailabilityZone string `json:"availability_zone"`
SubnetID string `json:"subnet_id"`
PublicEndpoints []PublicEndpoints `json:"public_endpoints"`
Created string `json:"created"` //ISO8601:YYYY-MM-DDThh:mm:ssZ
SecurityGroupID string `json:"security_group_id"`
Port int `json:"port"`
NodeType string `json:"node_type"`
Version string `json:"version"`
PublicIp *PublicIp `json:"public_ip"`
FailedReasons *FailInfo `json:"failed_reasons"`
VpcID string `json:"vpc_id"`
TaskStatus string `json:"task_status"`
UserName string `json:"user_name"`
ID string `json:"id"`
ActionProgress map[string]string `json:"action_progress"`
RecentEvent int `json:"recent_event"`
Tags []tags.ResourceTag `json:"tags"`
EnterpriseProjectId string `json:"enterprise_project_id"`
}
type ClusterDetail ¶
type ClusterDetail struct {
Cluster
PrivateIp []string `json:"private_ip"`
ParameterGroup *ParameterGroup `json:"parameter_group"`
NodeTypeId string `json:"node_type_id"`
NodeDetail *NodeDetail `json:"node_detail"`
MaintainWindow *MaintainWindow `json:"maintain_window"`
ResizeInfo *ResizeInfo `json:"resize_info"`
}
func Get ¶
func Get(c *golangsdk.ServiceClient, id string) (*ClusterDetail, error)
type ClusterDetailsRst ¶
type ClusterDetailsRst struct {
Cluster ClusterDetail `json:"cluster"`
}
type CreateClusterRst ¶
type CreateClusterRst struct {
Cluster IdObject `json:"cluster"`
}
func Create ¶
func Create(c *golangsdk.ServiceClient, opts CreateOptsBuilder) (*CreateClusterRst, error)
type CreateOpts ¶
type CreateOpts struct {
Name string `json:"name" required:"true"`
NumberOfNode int `json:"number_of_node" required:"true"`
AvailabilityZone string `json:"availability_zone,omitempty"`
SubnetID string `json:"subnet_id" required:"true"`
UserPwd string `json:"user_pwd" required:"true"`
SecurityGroupID string `json:"security_group_id" required:"true"`
PublicIp *PublicIpOpts `json:"public_ip,omitempty"`
NodeType string `json:"node_type" required:"true"`
VpcID string `json:"vpc_id" required:"true"`
UserName string `json:"user_name" required:"true"`
Port int `json:"port,omitempty"` //default:8000
NumberOfCn *int `json:"number_of_cn,omitempty"` //default:2
EnterpriseProjectId string `json:"enterprise_project_id,omitempty"`
}
func (CreateOpts) ToClusterCreateMap ¶
func (opts CreateOpts) ToClusterCreateMap() (map[string]interface{}, error)
type CreateOptsBuilder ¶
type CreateResult ¶
type DeleteResult ¶
func Delete ¶
func Delete(c *golangsdk.ServiceClient, id string) (r DeleteResult)
type FailedReasons ¶
type FailedReasons struct {
FailInfo FailInfo `json:"fail_info"`
}
type ListClustersRst ¶
type ListClustersRst struct {
Clusters []Cluster `json:"clusters"`
}
func List ¶
func List(c *golangsdk.ServiceClient, opts ListOpts) (*ListClustersRst, error)
type MaintainWindow ¶
type NodeDetail ¶
type ParameterGroup ¶
type PublicEndpoints ¶
type PublicIpOpts ¶
type ResetPasswordOpts ¶
type ResetPasswordOpts struct {
NewPassword string `json:"new_password" required:"true"`
}
Click to show internal directories.
Click to hide internal directories.