cube

package
v0.21.37 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package cube include resources of ucloud cube product

See also

for detail.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateCubeDeploymentRequest added in v0.21.4

type CreateCubeDeploymentRequest struct {
	request.CommonBase

	// 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Postpay, \\ 后付费;默认为后付费
	ChargeType *string `required:"false"`

	// Cpu平台(V6:Intel、A2:AMD),默认V6。支持的地域(北京2B、北京2E、上海2A、广东、香港 、东京)目前北京2E仅有A2,其余地域仅有V6
	CpuPlatform *string `required:"false"`

	// base64编码的Deployment的yaml。大小不超过16KB
	Deployment *string `required:"true"`

	// base64编码的kubeconfig。大小不超过16KB
	KubeConfig *string `required:"false"`

	// Deployment名称
	Name *string `required:"false"`

	// 购买时长。默认:值 1。 月付时,此参数传0,代表购买至月末。
	Quantity *int `required:"false"`

	// 子网Id
	SubnetId *string `required:"true"`

	// 业务组。默认:Default(Default即为未分组)
	Tag *string `required:"false"`

	// VPCId
	VPCId *string `required:"true"`
}

CreateCubeDeploymentRequest is request schema for CreateCubeDeployment action

type CreateCubeDeploymentResponse added in v0.21.4

type CreateCubeDeploymentResponse struct {
	response.CommonBase

	// 经过base64编码的Deployment的yaml
	Deployment string

	// 控制器ID
	DeploymentId string
}

CreateCubeDeploymentResponse is response schema for CreateCubeDeployment action

type CreateCubePodRequest

type CreateCubePodRequest struct {
	request.CommonBase

	// 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Postpay, \\ 后付费;默认为后付费
	ChargeType *string `required:"false"`

	// 代金券ID。请通过DescribeCoupon接口查询,或登录用户中心查看
	CouponId *string `required:"false"`

	// Cpu平台(V6:Intel、A2:AMD、Auto),默认Auto。支持的地域(北京2B、北京2E、上海2A、广东、香港 、东京)目前北京2E仅有A2,其余地域仅有V6
	CpuPlatform *string `required:"false"`

	// pod所在组
	Group *string `required:"false"`

	// base64编码的kubeconfig。大小不超过16KB
	KubeConfig *string `required:"false"`

	// pod的名字
	Name *string `required:"false"`

	// base64编码的Pod的yaml。大小不超过16KB
	Pod *string `required:"true"`

	// 购买时长。默认:值 1。 月付时,此参数传0,代表购买至月末。
	Quantity *int `required:"false"`

	// 子网Id
	SubnetId *string `required:"true"`

	// 业务组。默认:Default(Default即为未分组)
	Tag *string `required:"false"`

	// VPCId
	VPCId *string `required:"true"`
}

CreateCubePodRequest is request schema for CreateCubePod action

type CreateCubePodResponse

type CreateCubePodResponse struct {
	response.CommonBase

	// 【该字段已废弃,请谨慎使用】
	Action string `deprecated:"true"`

	// cube的资源Id
	CubeId string

	// base64编码的yaml
	Pod string

	// 【该字段已废弃,请谨慎使用】
	RetCode int `deprecated:"true"`
}

CreateCubePodResponse is response schema for CreateCubePod action

type CubeClient

type CubeClient struct {
	*ucloud.Client
}

CubeClient is the client of Cube

func NewClient

func NewClient(config *ucloud.Config, credential *auth.Credential) *CubeClient

NewClient will return a instance of CubeClient

func (*CubeClient) CreateCubeDeployment added in v0.21.4

API: CreateCubeDeployment

创建Cube的Deployment

func (*CubeClient) CreateCubePod

func (c *CubeClient) CreateCubePod(req *CreateCubePodRequest) (*CreateCubePodResponse, error)

API: CreateCubePod

创建Pod

func (*CubeClient) DeleteCubeDeployment added in v0.21.4

API: DeleteCubeDeployment

删除Cube的Deployment

func (*CubeClient) DeleteCubePod

func (c *CubeClient) DeleteCubePod(req *DeleteCubePodRequest) (*DeleteCubePodResponse, error)

API: DeleteCubePod

删除Pod

func (*CubeClient) GetCubeDeployment added in v0.21.4

func (c *CubeClient) GetCubeDeployment(req *GetCubeDeploymentRequest) (*GetCubeDeploymentResponse, error)

API: GetCubeDeployment

获取Deployment的详细信息

func (*CubeClient) GetCubeExecToken added in v0.21.13

func (c *CubeClient) GetCubeExecToken(req *GetCubeExecTokenRequest) (*GetCubeExecTokenResponse, error)

API: GetCubeExecToken

获取登录容器的token

func (*CubeClient) GetCubeExtendInfo

func (c *CubeClient) GetCubeExtendInfo(req *GetCubeExtendInfoRequest) (*GetCubeExtendInfoResponse, error)

API: GetCubeExtendInfo

获取Cube的额外信息

func (*CubeClient) GetCubeMetrics added in v0.21.4

func (c *CubeClient) GetCubeMetrics(req *GetCubeMetricsRequest) (*GetCubeMetricsResponse, error)

API: GetCubeMetrics

获取Cube实例(Pod,PodX,Deploy等)监控数据时间序列

func (*CubeClient) GetCubePod

func (c *CubeClient) GetCubePod(req *GetCubePodRequest) (*GetCubePodResponse, error)

API: GetCubePod

获取Pod的详细信息

func (*CubeClient) GetCubePrice added in v0.21.4

func (c *CubeClient) GetCubePrice(req *GetCubePriceRequest) (*GetCubePriceResponse, error)

API: GetCubePrice

获取cube的价格

func (*CubeClient) GetCubeToken added in v0.21.17

func (c *CubeClient) GetCubeToken(req *GetCubeTokenRequest) (*GetCubeTokenResponse, error)

API: GetCubeToken

获取Cube的token,可用于terminal登录、log获取

func (*CubeClient) ListCubeDeployment added in v0.21.13

func (c *CubeClient) ListCubeDeployment(req *ListCubeDeploymentRequest) (*ListCubeDeploymentResponse, error)

API: ListCubeDeployment

获取Cube的Deployment列表

func (*CubeClient) ListCubePod

func (c *CubeClient) ListCubePod(req *ListCubePodRequest) (*ListCubePodResponse, error)

API: ListCubePod

获取Pods列表

func (*CubeClient) ModifyCubeExtendInfo

API: ModifyCubeExtendInfo

修改Cube额外信息

func (*CubeClient) ModifyCubeTag added in v0.19.1

func (c *CubeClient) ModifyCubeTag(req *ModifyCubeTagRequest) (*ModifyCubeTagResponse, error)

API: ModifyCubeTag

修改业务组名字

func (*CubeClient) NewCreateCubeDeploymentRequest added in v0.21.4

func (c *CubeClient) NewCreateCubeDeploymentRequest() *CreateCubeDeploymentRequest

NewCreateCubeDeploymentRequest will create request of CreateCubeDeployment action.

func (*CubeClient) NewCreateCubePodRequest

func (c *CubeClient) NewCreateCubePodRequest() *CreateCubePodRequest

NewCreateCubePodRequest will create request of CreateCubePod action.

func (*CubeClient) NewDeleteCubeDeploymentRequest added in v0.21.4

func (c *CubeClient) NewDeleteCubeDeploymentRequest() *DeleteCubeDeploymentRequest

NewDeleteCubeDeploymentRequest will create request of DeleteCubeDeployment action.

func (*CubeClient) NewDeleteCubePodRequest

func (c *CubeClient) NewDeleteCubePodRequest() *DeleteCubePodRequest

NewDeleteCubePodRequest will create request of DeleteCubePod action.

func (*CubeClient) NewGetCubeDeploymentRequest added in v0.21.4

func (c *CubeClient) NewGetCubeDeploymentRequest() *GetCubeDeploymentRequest

NewGetCubeDeploymentRequest will create request of GetCubeDeployment action.

func (*CubeClient) NewGetCubeExecTokenRequest added in v0.21.13

func (c *CubeClient) NewGetCubeExecTokenRequest() *GetCubeExecTokenRequest

NewGetCubeExecTokenRequest will create request of GetCubeExecToken action.

func (*CubeClient) NewGetCubeExtendInfoRequest

func (c *CubeClient) NewGetCubeExtendInfoRequest() *GetCubeExtendInfoRequest

NewGetCubeExtendInfoRequest will create request of GetCubeExtendInfo action.

func (*CubeClient) NewGetCubeMetricsRequest added in v0.21.4

func (c *CubeClient) NewGetCubeMetricsRequest() *GetCubeMetricsRequest

NewGetCubeMetricsRequest will create request of GetCubeMetrics action.

func (*CubeClient) NewGetCubePodRequest

func (c *CubeClient) NewGetCubePodRequest() *GetCubePodRequest

NewGetCubePodRequest will create request of GetCubePod action.

func (*CubeClient) NewGetCubePriceRequest added in v0.21.4

func (c *CubeClient) NewGetCubePriceRequest() *GetCubePriceRequest

NewGetCubePriceRequest will create request of GetCubePrice action.

func (*CubeClient) NewGetCubeTokenRequest added in v0.21.17

func (c *CubeClient) NewGetCubeTokenRequest() *GetCubeTokenRequest

NewGetCubeTokenRequest will create request of GetCubeToken action.

func (*CubeClient) NewListCubeDeploymentRequest added in v0.21.13

func (c *CubeClient) NewListCubeDeploymentRequest() *ListCubeDeploymentRequest

NewListCubeDeploymentRequest will create request of ListCubeDeployment action.

func (*CubeClient) NewListCubePodRequest

func (c *CubeClient) NewListCubePodRequest() *ListCubePodRequest

NewListCubePodRequest will create request of ListCubePod action.

func (*CubeClient) NewModifyCubeExtendInfoRequest

func (c *CubeClient) NewModifyCubeExtendInfoRequest() *ModifyCubeExtendInfoRequest

NewModifyCubeExtendInfoRequest will create request of ModifyCubeExtendInfo action.

func (*CubeClient) NewModifyCubeTagRequest added in v0.19.1

func (c *CubeClient) NewModifyCubeTagRequest() *ModifyCubeTagRequest

NewModifyCubeTagRequest will create request of ModifyCubeTag action.

func (*CubeClient) NewRenewCubePodRequest

func (c *CubeClient) NewRenewCubePodRequest() *RenewCubePodRequest

NewRenewCubePodRequest will create request of RenewCubePod action.

func (*CubeClient) NewUpdateCubeDeploymentRequest added in v0.21.4

func (c *CubeClient) NewUpdateCubeDeploymentRequest() *UpdateCubeDeploymentRequest

NewUpdateCubeDeploymentRequest will create request of UpdateCubeDeployment action.

func (*CubeClient) RenewCubePod

func (c *CubeClient) RenewCubePod(req *RenewCubePodRequest) (*RenewCubePodResponse, error)

API: RenewCubePod

更新Pod

func (*CubeClient) UpdateCubeDeployment added in v0.21.4

API: UpdateCubeDeployment

更新Deployment

type CubeExtendInfo

type CubeExtendInfo struct {

	// Cube的Id
	CubeId string

	// EIPSet
	Eip []EIPSet

	// 资源有效期
	Expiration int

	// Cube的名称
	Name string

	// 业务组名称
	Tag string
}

CubeExtendInfo - Cube的额外信息

type DeleteCubeDeploymentRequest added in v0.21.4

type DeleteCubeDeploymentRequest struct {
	request.CommonBase

	// 控制器Id
	DeploymentId *string `required:"true"`
}

DeleteCubeDeploymentRequest is request schema for DeleteCubeDeployment action

type DeleteCubeDeploymentResponse added in v0.21.4

type DeleteCubeDeploymentResponse struct {
	response.CommonBase
}

DeleteCubeDeploymentResponse is response schema for DeleteCubeDeployment action

type DeleteCubePodRequest

type DeleteCubePodRequest struct {
	request.CommonBase

	// cubeid和uid任意一个(必须)
	CubeId *string `required:"false"`

	// 删除cube时是否释放绑定的EIP。默认为false。
	ReleaseEIP *bool `required:"false"`

	// cubeid和uid任意一个(必须)
	Uid *string `required:"false"`
}

DeleteCubePodRequest is request schema for DeleteCubePod action

type DeleteCubePodResponse

type DeleteCubePodResponse struct {
	response.CommonBase
}

DeleteCubePodResponse is response schema for DeleteCubePod action

type EIPAddr

type EIPAddr struct {

	// IP地址
	IP string

	// 线路名称BGP或者internalation
	OperatorName string
}

EIPAddr - EIP地址

type EIPSet

type EIPSet struct {

	// EIP带宽值
	Bandwidth int

	// 带宽类型0标准普通带宽,1表示共享带宽
	BandwidthType int

	// EIP创建时间
	CreateTime int

	// EIP地址
	EIPAddr []EIPAddr

	// EIPId
	EIPId string

	// 付费模式,带宽付费或者流量付费
	PayMode string

	// EIP绑定对象的资源Id
	Resource string

	// EIP状态,表示使用中或者空闲
	Status string

	// EIP权重
	Weight int
}

EIPSet - EIP信息

type GetCubeDeploymentRequest added in v0.21.4

type GetCubeDeploymentRequest struct {
	request.CommonBase

	// Deployment的Id
	DeploymentId *string `required:"true"`
}

GetCubeDeploymentRequest is request schema for GetCubeDeployment action

type GetCubeDeploymentResponse added in v0.21.4

type GetCubeDeploymentResponse struct {
	response.CommonBase

	// 经过base64编码的Deployment的yaml
	Deployment string
}

GetCubeDeploymentResponse is response schema for GetCubeDeployment action

type GetCubeExecTokenRequest added in v0.21.13

type GetCubeExecTokenRequest struct {
	request.CommonBase

	// 容器名称
	ContainerName *string `required:"true"`

	// CubeId 和 Uid 中必须填写任意一个。CubeId 是所有 Cube 资源的唯一 ID,如非在 UK8S 通过 Virtual Kubelet 插件创建的 Cube, 则必填 CubeId
	CubeId *string `required:"false"`

	// CubeId 和 Uid 中必须填写任意一个。Uid 是在 UK8S 中通过 Virtual Kubelet 插件创建出的 Cube 的唯一标识
	Uid *string `required:"false"`
}

GetCubeExecTokenRequest is request schema for GetCubeExecToken action

type GetCubeExecTokenResponse added in v0.21.13

type GetCubeExecTokenResponse struct {
	response.CommonBase

	// terminal的登录连接地址,限单点登录,有效时间5min
	TerminalUrl string

	// 有效时间5min
	Token string
}

GetCubeExecTokenResponse is response schema for GetCubeExecToken action

type GetCubeExtendInfoRequest

type GetCubeExtendInfoRequest struct {
	request.CommonBase

	// id列表以逗号(,)分割
	CubeIds *string `required:"true"`
}

GetCubeExtendInfoRequest is request schema for GetCubeExtendInfo action

type GetCubeExtendInfoResponse

type GetCubeExtendInfoResponse struct {
	response.CommonBase

	// CubeExtendInfo
	ExtendInfo []CubeExtendInfo
}

GetCubeExtendInfoResponse is response schema for GetCubeExtendInfo action

type GetCubeMetricsRequest added in v0.21.4

type GetCubeMetricsRequest struct {
	request.CommonBase

	// 开始时间
	BeginTime *int `required:"true"`

	// Pod内容器名称
	ContainerName *string `required:"true"`

	// 结束时间,必须大于开始时间
	EndTime *int `required:"true"`

	// 监控指标名称
	MetricName []string `required:"true"`

	// Cube实例资源ID
	ResourceId *string `required:"true"`
}

GetCubeMetricsRequest is request schema for GetCubeMetrics action

type GetCubeMetricsResponse added in v0.21.4

type GetCubeMetricsResponse struct {
	response.CommonBase

	// 时间序列集合
	DataSets []MetricDataSet

	// 错误信息
	Message string
}

GetCubeMetricsResponse is response schema for GetCubeMetrics action

type GetCubePodRequest

type GetCubePodRequest struct {
	request.CommonBase

	// CubeId和Uid任意一个
	CubeId *string `required:"false"`

	// CubeId和Uid任意一个
	Uid *string `required:"false"`
}

GetCubePodRequest is request schema for GetCubePod action

type GetCubePodResponse

type GetCubePodResponse struct {
	response.CommonBase

	// base64编码的pod的yaml
	Pod string
}

GetCubePodResponse is response schema for GetCubePod action

type GetCubePriceRequest added in v0.21.4

type GetCubePriceRequest struct {
	request.CommonBase

	// 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按秒后付费,默认为月付
	ChargeType *string `required:"true"`

	// 购买数量
	Count *string `required:"true"`

	// CPU 配置,单位为毫核,例如如 1 核则须输入 1000
	Cpu *string `required:"true"`

	// 内存配置,单位为 Mi,例如 1Gi 须输入 1024
	Mem *string `required:"true"`

	// 购买时长。默认:值 1。按小时购买(Dynamic/Postpay)时无需此参数。 月付时,此参数传0,代表购买至月末。
	Quantity *int `required:"true"`
}

GetCubePriceRequest is request schema for GetCubePrice action

type GetCubePriceResponse added in v0.21.4

type GetCubePriceResponse struct {
	response.CommonBase

	// 列表价格,单位为分
	OriginalPrice int

	// 折扣后价格,单位为分
	Price int
}

GetCubePriceResponse is response schema for GetCubePrice action

type GetCubeTokenRequest added in v0.21.17

type GetCubeTokenRequest struct {
	request.CommonBase

	// 容器名称
	ContainerName *string `required:"true"`

	// CubeId 和 Uid 中必须填写任意一个。CubeId 是所有 Cube 资源的唯一 ID,如非在 UK8S 通过 Virtual Kubelet 插件创建的 Cube, 则必填 CubeId
	CubeId *string `required:"false"`

	// CubeId 和 Uid 中必须填写任意一个。Uid 是在 UK8S 中通过 Virtual Kubelet 插件创建出的 Cube 的唯一标识
	Uid *string `required:"false"`
}

GetCubeTokenRequest is request schema for GetCubeToken action

type GetCubeTokenResponse added in v0.21.17

type GetCubeTokenResponse struct {
	response.CommonBase

	// 有效时间5min
	Token string
}

GetCubeTokenResponse is response schema for GetCubeToken action

type ListCubeDeploymentRequest added in v0.21.13

type ListCubeDeploymentRequest struct {
	request.CommonBase

	// 默认20
	Limit *int `required:"true"`

	// 默认0
	Offset *int `required:"true"`
}

ListCubeDeploymentRequest is request schema for ListCubeDeployment action

type ListCubeDeploymentResponse added in v0.21.13

type ListCubeDeploymentResponse struct {
	response.CommonBase

	// DeploymentInfo
	Deployments []string

	//
	TotalCount int
}

ListCubeDeploymentResponse is response schema for ListCubeDeployment action

type ListCubePodRequest

type ListCubePodRequest struct {
	request.CommonBase

	// Deployment的Id
	DeploymentId *string `required:"false"`

	// 组名称
	Group *string `required:"false"`

	// 默认20
	Limit *int `required:"false"`

	// 默认0
	Offset *int `required:"false"`

	// 子网Id
	SubnetId *string `required:"false"`

	// VPC的Id
	VPCId *string `required:"false"`
}

ListCubePodRequest is request schema for ListCubePod action

type ListCubePodResponse

type ListCubePodResponse struct {
	response.CommonBase

	// Pod列表,每条数据都做了base64编码
	Pods []string

	// Cube的总数
	TotalCount int
}

ListCubePodResponse is response schema for ListCubePod action

type MetricDataSet added in v0.21.4

type MetricDataSet struct {

	//
	MetricName string

	//
	Values []ValueSet
}

MetricDataSet - 监控数据集合

type ModifyCubeExtendInfoRequest

type ModifyCubeExtendInfoRequest struct {
	request.CommonBase

	// cube的id
	CubeId *string `required:"true"`

	// 修改的名字,规则(^[a-zA-Z0-9-_.\u4e00-\u9fa5]{1,32})
	Name *string `required:"false"`
}

ModifyCubeExtendInfoRequest is request schema for ModifyCubeExtendInfo action

type ModifyCubeExtendInfoResponse

type ModifyCubeExtendInfoResponse struct {
	response.CommonBase
}

ModifyCubeExtendInfoResponse is response schema for ModifyCubeExtendInfo action

type ModifyCubeTagRequest added in v0.19.1

type ModifyCubeTagRequest struct {
	request.CommonBase

	// CubeId
	CubeId *string `required:"true"`

	// 业务组名称
	Tag *string `required:"true"`
}

ModifyCubeTagRequest is request schema for ModifyCubeTag action

type ModifyCubeTagResponse added in v0.19.1

type ModifyCubeTagResponse struct {
	response.CommonBase

	// CubeId
	CubeId string
}

ModifyCubeTagResponse is response schema for ModifyCubeTag action

type RenewCubePodRequest

type RenewCubePodRequest struct {
	request.CommonBase

	// 容器Id
	CubeId *string `required:"true"`

	// base64编码的Pod的yaml
	Pod *string `required:"true"`
}

RenewCubePodRequest is request schema for RenewCubePod action

type RenewCubePodResponse

type RenewCubePodResponse struct {
	response.CommonBase

	// base64编码过的yaml,需要解码获取信息
	Pod string
}

RenewCubePodResponse is response schema for RenewCubePod action

type UpdateCubeDeploymentRequest added in v0.21.4

type UpdateCubeDeploymentRequest struct {
	request.CommonBase

	// base64编码的Deployment的yaml。大小不超过16KB
	Deployment *string `required:"true"`

	// Deployment的Id
	DeploymentId *string `required:"true"`

	// Deployment的name
	Name *string `required:"false"`
}

UpdateCubeDeploymentRequest is request schema for UpdateCubeDeployment action

type UpdateCubeDeploymentResponse added in v0.21.4

type UpdateCubeDeploymentResponse struct {
	response.CommonBase

	// 经过base64编码的Deployment的yaml
	Deployment string
}

UpdateCubeDeploymentResponse is response schema for UpdateCubeDeployment action

type ValueSet added in v0.21.4

type ValueSet struct {

	//
	Timestamp int

	//
	Value float64
}

ValueSet -

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL