uhost

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DescribeUHostLiteRequest

type DescribeUHostLiteRequest struct {
	request.CommonBase

	// 可用区。参见 [可用区列表](../summary/regionlist.html)
	Zone *string `required:"false"`

	// UHost主机的资源ID,例如UHostIds.0代表希望获取信息 的主机1,UHostIds.1代表主机2。 如果为空,则返回当前Region 所有符合条件的UHost实例。
	UHostIds []string `required:"false"`

	// 要查询的业务组名称
	Tag *string `required:"false"`

	// 列表起始位置偏移量,默认为0
	Offset *int `required:"false"`

	// 返回数据长度,默认为20,最大10000000
	Limit *int `required:"false"`

	// 云灾备,指明191
	ResourceType *int `required:"false"`
}

DescribeUHostLiteRequest is request schema for DescribeUHostLite action

type DescribeUHostLiteResponse

type DescribeUHostLiteResponse struct {
	response.CommonBase

	// 满足条件的UHostInstance总数
	TotalCount int

	// 云主机实例列表,每项参数可见下面 UHostInstanceSet
	UHostSet []UHostInstanceSet
}

DescribeUHostLiteResponse is response schema for DescribeUHostLite action

type DescribeUHostRecycleRequest

type DescribeUHostRecycleRequest struct {
	request.CommonBase

	// 可用区。参见 [可用区列表](../summary/regionlist.html)
	Zone *string `required:"false"`

	// UHost主机的资源ID,例如UHostIds.0代表希望获取信息 的主机1,UHostIds.1代表主机2。 如果为空,则返回当前Region 所有符合条件的UHost实例。
	UHostIds []string `required:"false"`

	// 列表起始位置偏移量,默认为0
	Offset *int `required:"false"`

	// 返回数据长度,默认为20,最大10000000
	Limit *int `required:"false"`
}

DescribeUHostRecycleRequest is request schema for DescribeUHostRecycle action

type DescribeUHostRecycleResponse

type DescribeUHostRecycleResponse struct {
	response.CommonBase

	// 满足条件的UHostInstance总数
	TotalCount int

	// 云主机实例列表,每项参数可见下面 UHostInstanceSet
	UHostSet []UHostInstanceSet
}

DescribeUHostRecycleResponse is response schema for DescribeUHostRecycle action

type GetImageCopyProgressRequest

type GetImageCopyProgressRequest struct {
	request.CommonBase

	// 可用区。参见 [可用区列表](../summary/regionlist.html)
	Zone *string `required:"false"`

	// 镜像Id, 参见 [DescribeImage](describe_image.html)
	ImageId *string `required:"true"`
}

GetImageCopyProgressRequest is request schema for GetImageCopyProgress action

type GetImageCopyProgressResponse

type GetImageCopyProgressResponse struct {
	response.CommonBase

	// 镜像复制进度百分比,精确到小数点后两位。100表示复制完成
	ProgressInfo string
}

GetImageCopyProgressResponse is response schema for GetImageCopyProgress action

type GetRestResourceRequest

type GetRestResourceRequest struct {
	request.CommonBase

	// 可用区。参见 [可用区列表](../summary/regionlist.html)
	Zone *string `required:"false"`

	// Normal: 普通资源;SSD: ssd资源;BigData:大数据资源; GPU: gpu资源; 默认为GPU(目前只支持GPU)
	ResourceType *string `required:"false"`

	// UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html)
	UHostId *string `required:"false"`

	// 目标虚拟CPU核数,单位:个,范围:[2,32]。默认值为当前实例的CPU核数
	CPU *int `required:"false"`

	// 内存大小,单位:MB,范围[2048,65536],步长:2048,默认值为当前实例的内存大小
	Memory *int `required:"false"`

	// 数据盘大小,单位:GB,范围[10,1000]; SSD机型,单位:GB,范围[100,500];步长:10,默认值为当前实例的数据盘大小,数据盘不支持缩容,因此不允许输入比当前实例数据盘大小的值
	DiskSpace *int `required:"false"`

	// 系统盘大小,单位:GB,范围[20,100],步长:10,系统盘不支持缩容,因此不允许输入比当前实例系统盘小的值
	BootDiskSpace *int `required:"false"`
}

GetRestResourceRequest is request schema for GetRestResource action

type GetRestResourceResponse

type GetRestResourceResponse struct {
	response.CommonBase

	// 返回资源数组
	ResourceInfos []ResourceInfoSet

	// 是否能成功升级
	UpgradeStatus bool
}

GetRestResourceResponse is response schema for GetRestResource action

type GetUHostRenewPriceRequest

type GetUHostRenewPriceRequest struct {
	request.CommonBase

	// UHost实例ID
	UHostId *string `required:"true"`

	// 计费类型。Year,Month,Dynamic,默认返回全部计费方式对应的价格
	ChargeType *string `required:"true"`
}

GetUHostRenewPriceRequest is request schema for GetUHostRenewPrice action

type GetUHostRenewPriceResponse

type GetUHostRenewPriceResponse struct {
	response.CommonBase

	// 价格列表 UHostPriceSet
	PriceSet []UHostPriceSet
}

GetUHostRenewPriceResponse is response schema for GetUHostRenewPrice action

type GetUImagePriceRequest

type GetUImagePriceRequest struct {
	request.CommonBase

	// 镜像Id
	ImageId *string `required:"true"`

	// 购买个数,范围[1,5]
	Count *int `required:"true"`

	// 计费类型。Year,Month,Dynamic,默认返回全部计费方式对应的价格
	ChargeType *string `required:"false"`

	// 购买时长, 默认为1
	Quantity *int `required:"false"`
}

GetUImagePriceRequest is request schema for GetUImagePrice action

type GetUImagePriceResponse

type GetUImagePriceResponse struct {
	response.CommonBase

	// 价格列表 UHostPriceSet
	PriceSet []UHostPriceSet
}

GetUImagePriceResponse is response schema for GetUImagePrice action

type ResourceInfoSet

type ResourceInfoSet struct {

	// 地域, 参见 [地域和可用区列表](../summary/regionlist.html)
	Region string

	// 可用区,参见 [可用区列表](../summary/regionlist.html)
	Zone string

	// Normal:标准机型, SATA_SSD: SATA SSD机型, BigData: 大数据机型,GPU: GPU型G1(原GPU型),GPU_G2:GPU型G2
	UHostType string
}

ResourceInfoSet - 资源信息

this model is auto created by ucloud code generater for open api, you can also see https://docs.ucloud.cn for detail.

type UHostClient

type UHostClient struct {
	// contains filtered or unexported fields
}

UHostClient is the client of UHost

func NewClient

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

NewClient will return a instance of UHostClient

func (*UHostClient) DescribeUHostLite

DescribeUHostLite - 内部调用,列出UHost实例

func (*UHostClient) DescribeUHostRecycle

DescribeUHostRecycle - 获取回收站中主机列表信息,并可根据数据中心,主机ID等参数进行过滤。

func (*UHostClient) GetImageCopyProgress

GetImageCopyProgress - 获取镜像复制进度,通过镜像id,显示迁移进度百分比

func (*UHostClient) GetRestResource

func (c *UHostClient) GetRestResource(req *GetRestResourceRequest) (*GetRestResourceResponse, error)

GetRestResource - 获取某种类型是否有剩余资源;主机升级配置前获取资源是否充足

func (*UHostClient) GetUHostRenewPrice

GetUHostRenewPrice - 获取主机续费价格

func (*UHostClient) GetUImagePrice

func (c *UHostClient) GetUImagePrice(req *GetUImagePriceRequest) (*GetUImagePriceResponse, error)

GetUImagePrice - 获取镜像价格

func (*UHostClient) NewDescribeUHostLiteRequest

func (c *UHostClient) NewDescribeUHostLiteRequest() *DescribeUHostLiteRequest

NewDescribeUHostLiteRequest will create request of DescribeUHostLite action.

func (*UHostClient) NewDescribeUHostRecycleRequest

func (c *UHostClient) NewDescribeUHostRecycleRequest() *DescribeUHostRecycleRequest

NewDescribeUHostRecycleRequest will create request of DescribeUHostRecycle action.

func (*UHostClient) NewGetImageCopyProgressRequest

func (c *UHostClient) NewGetImageCopyProgressRequest() *GetImageCopyProgressRequest

NewGetImageCopyProgressRequest will create request of GetImageCopyProgress action.

func (*UHostClient) NewGetRestResourceRequest

func (c *UHostClient) NewGetRestResourceRequest() *GetRestResourceRequest

NewGetRestResourceRequest will create request of GetRestResource action.

func (*UHostClient) NewGetUHostRenewPriceRequest

func (c *UHostClient) NewGetUHostRenewPriceRequest() *GetUHostRenewPriceRequest

NewGetUHostRenewPriceRequest will create request of GetUHostRenewPrice action.

func (*UHostClient) NewGetUImagePriceRequest

func (c *UHostClient) NewGetUImagePriceRequest() *GetUImagePriceRequest

NewGetUImagePriceRequest will create request of GetUImagePrice action.

type UHostDiskSet

type UHostDiskSet struct {

	// 磁盘类型。系统盘: Boot,数据盘: Data,网络盘:Udisk
	Type string

	// 磁盘ID
	DiskId string

	// UDisk名字(仅当磁盘是UDisk时返回)
	Name string

	// 磁盘盘符
	Drive string

	// 磁盘大小,单位: GB
	Size int
}

UHostDiskSet - DescribeUHostInstance

this model is auto created by ucloud code generater for open api, you can also see https://docs.ucloud.cn for detail.

type UHostIPSet

type UHostIPSet struct {

	// 电信: China-telecom,联通: China-unicom, 国际: International,BGP: Bgp,内网: Private 双线: Duplet
	Type string

	// IP资源ID (内网IP无对应的资源ID)
	IPId string

	// IP地址
	IP string
	// contains filtered or unexported fields
}

UHostIPSet - DescribeUHostInstance

this model is auto created by ucloud code generater for open api, you can also see https://docs.ucloud.cn for detail.

type UHostInstanceSet

type UHostInstanceSet struct {

	// 可用区。参见 [可用区列表](../summary/regionlist.html)
	Zone string

	// UHost实例ID
	UHostId string

	// UHost类型,枚举为:N1:标准型系列1;N2:标准型系列2 ;I1:高IO型系列1;I2:高IO型系列2;D1:大数据型系列1;G1:GPU型系列1;G2:GPU型系列2;G3:GPU型系列2
	UHostType string

	// 系统盘与数据盘的磁盘类型。 枚举值为:LocalDisk,本地磁盘; UDisk,云硬盘
	StorageType string

	// 镜像ID
	ImageId string

	// 基础镜像ID(指当前自定义镜像的来源镜像)
	BasicImageId string

	// 基础镜像名称(指当前自定义镜像的来源镜像)
	BasicImageName string

	// 业务组名称
	Tag string

	// 备注
	Remark string

	// UHost实例名称
	Name string

	// 实例状态, 初始化: Initializing; 启动中: Starting; 运行中: Running; 关机中: Stopping; 关机: Stopped 安装失败: Install Fail; 重启中: Rebooting
	State string

	// 创建时间,格式为Unix时间戳
	CreateTime int

	// 计费模式,枚举值为: Year,按年付费; Month,按月付费; Dynamic,按需付费(需开启权限);
	ChargeType string

	// 到期时间,格式为Unix时间戳
	ExpireTime int

	// 虚拟CPU核数,单位: 个
	CPU int

	// 内存大小,单位: MB
	Memory int

	// 是否自动续费,自动续费:“Yes”,不自动续费:“No”
	AutoRenew string

	// 磁盘信息见 UHostDiskSet
	DiskSet []UHostDiskSet

	// 详细信息见 UHostIPSet
	IPSet []UHostIPSet

	// 网络增强。目前仅支持Normal和Super
	NetCapability string

	// 网络状态 连接:Connected, 断开:NotConnected
	NetworkState string

	// yes: 开启方舟; no,未开启方舟
	TimemachineFeature string

	// true: 开启热升级; false,未开启热升级
	HotplugFeature bool

	// 基础网络:Default;子网:Private
	SubnetType string

	// 内网或者子网的IP地址
	IPs []string

	// Os名称
	OsName string

	// "Linux"或者"Windows"
	OsType string

	// 删除时间,格式为Unix时间戳
	DeleteTime int

	// 主机系列:N2,表示系列2;N1,表示系列1
	HostType string

	// 主机的生命周期类型。目前仅支持Normal:普通;
	LifeCycle string

	// 主机的 GPU 数量
	GPU int

	// 系统盘状态 Normal: 已初始化完成
	BootDiskState string
}

UHostInstanceSet - DescribeUHostInstance

this model is auto created by ucloud code generater for open api, you can also see https://docs.ucloud.cn for detail.

type UHostPriceSet

type UHostPriceSet struct {

	// 计费类型。Year,Month,Dynamic
	ChargeType string

	// 价格,单位: 元,保留小数点后两位有效数字
	Price float32
}

UHostPriceSet - 主机价格

this model is auto created by ucloud code generater for open api, you can also see https://docs.ucloud.cn for detail.

Jump to

Keyboard shortcuts

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