cube

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 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 CreateCubePodRequest

type CreateCubePodRequest struct {
	request.CommonBase

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

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

	// Cpu平台(V6:Intel、A2:AMD),默认V6。支持的地域(北京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

	// cube的资源Id
	CubeId string

	// base64编码的yaml
	Pod string

	// 返回码
	RetCode int
}

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) CreateCubePod

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

API: CreateCubePod

创建Pod

func (*CubeClient) DeleteCubePod

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

API: DeleteCubePod

删除Pod

func (*CubeClient) GetCubeExtendInfo

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

API: GetCubeExtendInfo

获取Cube的额外信息

func (*CubeClient) GetCubePod

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

API: GetCubePod

获取Pod的详细信息

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) NewCreateCubePodRequest

func (c *CubeClient) NewCreateCubePodRequest() *CreateCubePodRequest

NewCreateCubePodRequest will create request of CreateCubePod action.

func (*CubeClient) NewDeleteCubePodRequest

func (c *CubeClient) NewDeleteCubePodRequest() *DeleteCubePodRequest

NewDeleteCubePodRequest will create request of DeleteCubePod action.

func (*CubeClient) NewGetCubeExtendInfoRequest

func (c *CubeClient) NewGetCubeExtendInfoRequest() *GetCubeExtendInfoRequest

NewGetCubeExtendInfoRequest will create request of GetCubeExtendInfo action.

func (*CubeClient) NewGetCubePodRequest

func (c *CubeClient) NewGetCubePodRequest() *GetCubePodRequest

NewGetCubePodRequest will create request of GetCubePod 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) RenewCubePod

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

API: RenewCubePod

更新Pod

type CubeExtendInfo

type CubeExtendInfo struct {

	// Cube的Id
	CubeId string

	// EIPSet
	Eip []EIPSet

	// 资源有效期
	Expiration int

	// Cube的名称
	Name string

	// 业务组名称
	Tag string
}

CubeExtendInfo - Cube的额外信息

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 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 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 ListCubePodRequest

type ListCubePodRequest struct {
	request.CommonBase

	// 组名称
	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 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

Jump to

Keyboard shortcuts

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