uhost

package
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: May 10, 2019 License: Apache-2.0 Imports: 9 Imported by: 28

Documentation

Overview

Package uhost include resources of ucloud host product

See also

for detail.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CopyCustomImageRequest

type CopyCustomImageRequest struct {
	request.CommonBase

	// 源镜像Id, 参见 DescribeImage
	SourceImageId *string `required:"true"`

	// 目标项目Id, 参见 GetProjectList
	TargetProjectId *string `required:"true"`

	// 目标地域,不跨地域不用填
	TargetRegion *string `required:"false"`

	// 目标镜像名称
	TargetImageName *string `required:"false"`

	// 目标镜像描述
	TargetImageDescription *string `required:"false"`
}

CopyCustomImageRequest is request schema for CopyCustomImage action

type CopyCustomImageResponse

type CopyCustomImageResponse struct {
	response.CommonBase

	// 目标镜像Id
	TargetImageId string
}

CopyCustomImageResponse is response schema for CopyCustomImage action

type CreateCustomImageRequest

type CreateCustomImageRequest struct {
	request.CommonBase

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

	// 镜像名称
	ImageName *string `required:"true"`

	// 镜像描述
	ImageDescription *string `required:"false"`
}

CreateCustomImageRequest is request schema for CreateCustomImage action

type CreateCustomImageResponse

type CreateCustomImageResponse struct {
	response.CommonBase

	// 镜像Id
	ImageId string
}

CreateCustomImageResponse is response schema for CreateCustomImage action

type CreateUHostInstanceRequest

type CreateUHostInstanceRequest struct {
	request.CommonBase

	// 镜像ID。 请通过 [DescribeImage](describe_image.html)获取
	ImageId *string `required:"true"`

	// UHost密码,LoginMode为Password时此项必须(密码需使用base64进行编码)
	Password *string `required:"true"`

	// 磁盘列表
	Disks []UHostDisk `required:"true"`

	// UHost实例名称。默认:UHost
	Name *string `required:"false"`

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

	// 计费模式。枚举值为: Year,按年付费; Month,按月付费; Dynamic,按小时付费(需开启权限)。默认为月付
	ChargeType *string `required:"false"`

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

	// 云主机机型。枚举值:N1:系列1标准型;N2:系列2标准型;I1: 系列1高IO型;I2,系列2高IO型; D1: 系列1大数据机型;G1: 系列1GPU型,型号为K80;G2:系列2GPU型,型号为P40;G3:系列2GPU型,型号为V100;北京A、北京C、上海二A、香港A可用区默认N1,其他机房默认N2。不同机房的主机类型支持情况不同。详情请参考控制台。
	UHostType *string `required:"false"`

	// 虚拟CPU核数。 单位:个。可选参数:{1,2,4,8,12,16,24,32}。默认值: 4
	CPU *int `required:"false"`

	// 内存大小。单位:MB。范围 :[1024, 131072], 取值为2的幂次方。默认值:8192。
	Memory *int `required:"false"`

	// GPU卡核心数。仅GPU机型支持此字段;系列1可选1,2;系列2可选1,2,3,4。GPU可选数量与CPU有关联,详情请参考控制台。
	GPU *int `required:"false"`

	// 主机登陆模式。密码(默认选项): Password,key: KeyPair(此项暂不支持)
	LoginMode *string `required:"false"`

	// 【暂不支持】Keypair公钥,LoginMode为KeyPair时此项必须
	KeyPair *string `required:"false"`

	// 【待废弃,不建议调用】磁盘类型,同时设定系统盘和数据盘的磁盘类型。枚举值为:LocalDisk,本地磁盘; UDisk,云硬盘;默认为LocalDisk。仅部分可用区支持云硬盘方式的主机存储方式,具体请查询控制台。
	StorageType *string `required:"false"`

	// 【待废弃,不建议调用】系统盘大小。 单位:GB, 范围[20,100], 步长:10
	BootDiskSpace *int `required:"false"`

	// 【待废弃,不建议调用】数据盘大小。 单位:GB, 范围[0,8000], 步长:10, 默认值:20,云盘支持0-8000;本地普通盘支持0-2000;本地SSD盘(包括所有GPU机型)支持100-1000
	DiskSpace *int `required:"false"`

	// 网络增强。目前仅Normal(不开启) 和Super(开启)可用。默认Normal。 不同机房的网络增强支持情况不同。详情请参考控制台。
	NetCapability *string `required:"false"`

	// 是否开启方舟特性。Yes为开启方舟,No为关闭方舟。目前仅选择普通本地盘+普通本地盘 或 SSD云盘+普通云盘的组合支持开启方舟。
	TimemachineFeature *string `required:"false"`

	// 是否开启热升级特性。True为开启,False为未开启,默认False。仅系列1云主机需要使用此字段,系列2云主机根据镜像是否支持云主机。
	HotplugFeature *bool `required:"false"`

	// 网络ID(VPC2.0情况下无需填写)。VPC1.0情况下,若不填写,代表选择基础网络; 若填写,代表选择子网。参见DescribeSubnet。
	NetworkId *string `required:"false"`

	// VPC ID。VPC2.0下需要填写此字段。
	VPCId *string `required:"false"`

	// 子网ID。VPC2.0下需要填写此字段。
	SubnetId *string `required:"false"`

	// 【数组】创建云主机时指定内网IP。当前只支持一个内网IP。调用方式举例:PrivateIp.0=x.x.x.x。
	PrivateIp []string `required:"false"`

	// 创建云主机时指定Mac。调用方式举例:PrivateMac="xx:xx:xx:xx:xx:xx"。
	PrivateMac *string `required:"false"`

	// 防火墙Id,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeSecurityGroup](../unet-api/describe_security_group.html)
	SecurityGroupId *string `required:"false"`

	// 【暂不支持】cloudinit方式下,用户初始化脚本
	UserDataScript *string `required:"false"`

	// 【已废弃】宿主机类型,N2,N1
	HostType *string `required:"false"`

	// 【暂不支持】是否安装UGA。'yes': 安装;其他或者不填:不安装。
	InstallAgent *string `required:"false"`

	// 【内部参数】资源类型
	ResourceType *int `required:"false"`

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

CreateUHostInstanceRequest is request schema for CreateUHostInstance action

type CreateUHostInstanceResponse

type CreateUHostInstanceResponse struct {
	response.CommonBase

	// UHost实例Id集合
	UHostIds []string

	// IP信息
	IPs []string
}

CreateUHostInstanceResponse is response schema for CreateUHostInstance action

type DescribeImageRequest

type DescribeImageRequest struct {
	request.CommonBase

	// 镜像类型。标准镜像:Base,镜像市场:Business, 自定义镜像:Custom,默认返回所有类型
	ImageType *string `required:"false"`

	// 操作系统类型:Linux, Windows 默认返回所有类型
	OsType *string `required:"false"`

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

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

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

	// 是否返回价格:1返回,0不返回;默认不返回
	PriceSet *int `required:"false"`
}

DescribeImageRequest is request schema for DescribeImage action

type DescribeImageResponse

type DescribeImageResponse struct {
	response.CommonBase

	// 满足条件的镜像总数
	TotalCount int

	// 镜像列表详见 UHostImageSet
	ImageSet []UHostImageSet
}

DescribeImageResponse is response schema for DescribeImage action

type DescribeUHostInstanceRequest

type DescribeUHostInstanceRequest struct {
	request.CommonBase

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

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

	// 1:普通云主机;2:抢占型云主机;如不传此参数,默认全部获取
	LifeCycle *int `required:"false"`

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

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

	// 硬件隔离组id
	IsolationGroup *string `required:"false"`

	// 云主机ip对应的vpc id
	VPCId *string `required:"false"`

	// 云主机ip对应的子网id
	SubnetId *string `required:"false"`
}

DescribeUHostInstanceRequest is request schema for DescribeUHostInstance action

type DescribeUHostInstanceResponse

type DescribeUHostInstanceResponse struct {
	response.CommonBase

	// UHostInstance总数
	TotalCount int

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

DescribeUHostInstanceResponse is response schema for DescribeUHostInstance action

type DescribeUHostTagsRequest

type DescribeUHostTagsRequest struct {
	request.CommonBase
}

DescribeUHostTagsRequest is request schema for DescribeUHostTags action

type DescribeUHostTagsResponse

type DescribeUHostTagsResponse struct {
	response.CommonBase

	// 已有主机的业务组总个数
	TotalCount int

	// 业务组集合见 UHostTagSet
	TagSet []UHostTagSet
}

DescribeUHostTagsResponse is response schema for DescribeUHostTags action

type GetUHostInstancePriceRequest

type GetUHostInstancePriceRequest struct {
	request.CommonBase

	// 镜像Id,可通过 [DescribeImage](describe_image.html) 获取镜像ID
	ImageId *string `required:"true"`

	// 虚拟CPU核数。可选参数:1-32(可选范围与UHostType相关)。默认值: 4
	CPU *int `required:"true"`

	// 内存大小。单位:MB。范围 :[1024, 262144],取值为1024的倍数(可选范围与UHostType相关)。默认值:8192
	Memory *int `required:"true"`

	// 【未启用】购买台数,范围[1,5]
	Count *int `required:"false"`

	// 磁盘列表
	Disks []UHostDisk

	// GPU卡核心数。仅GPU机型支持此字段(可选范围与UHostType相关)。
	GPU *int `required:"false"`

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

	// 【待废弃】磁盘类型,同时设定系统盘和数据盘, 枚举值为:LocalDisk,本地磁盘; UDisk,云硬盘; 默认为LocalDisk 仅部分可用区支持云硬盘方式的主机存储方式,具体请查询控制台。
	StorageType *string `required:"false"`

	// 【待废弃】数据盘大小,单位: GB,范围[0,1000],步长: 10,默认值: 0
	DiskSpace *int `required:"false"`

	// 网络增强。枚举值:\\ > Normal,不开启 \\ > Super,开启 \\ 默认值未为Normal。
	NetCapability *string `required:"false"`

	// 【待废弃】方舟机型。No,Yes。默认是No。
	TimemachineFeature *string `required:"false"`

	// 主机类型 Normal: 标准机型 SSD:SSD机型 BigData:大数据    GPU:GPU型G1(原GPU型)   GPU_G2:GPU型G2 GPU_G3:GPU型G3  不同机房的主机类型支持情况不同。详情请参考控制台。
	UHostType *string `required:"false"`
	// 【未支持】1:普通云主机;2:抢占性云主机;默认普通
	LifeCycle *int `required:"false"`

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

GetUHostInstancePriceRequest is request schema for GetUHostInstancePrice action

type GetUHostInstancePriceResponse

type GetUHostInstancePriceResponse struct {
	response.CommonBase

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

GetUHostInstancePriceResponse is response schema for GetUHostInstancePrice action

type GetUHostInstanceVncInfoRequest

type GetUHostInstanceVncInfoRequest struct {
	request.CommonBase

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

GetUHostInstanceVncInfoRequest is request schema for GetUHostInstanceVncInfo action

type GetUHostInstanceVncInfoResponse

type GetUHostInstanceVncInfoResponse struct {
	response.CommonBase

	// UHost实例ID
	UhostId string

	// Vnc登录IP
	VncIP string

	// Vnc登录端口
	VncPort int

	// Vnc 登录密码
	VncPassword string
}

GetUHostInstanceVncInfoResponse is response schema for GetUHostInstanceVncInfo action

type GetUHostUpgradePriceRequest

type GetUHostUpgradePriceRequest struct {
	request.CommonBase

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

	// 虚拟CPU核数。可选参数:1-32(可选范围与UHostType相关)。默认值为当前实例的CPU核数。
	CPU *int `required:"false"`

	// 内存大小。单位:MB。范围 :[1024, 262144],取值为1024的倍数(可选范围与UHostType相关)。默认值为当前实例的内存大小。
	Memory *int `required:"false"`

	// 【待废弃】数据盘大小,单位: GB,范围[0,1000],步长: 10, 默认值是该主机当前数据盘大小。
	DiskSpace *int `required:"false"`

	// 【待废弃】系统大小,单位: GB,范围[20,100],步长: 10。
	BootDiskSpace *int `required:"false"`

	// 方舟机型。No,Yes。默认是No。
	TimemachineFeature *string `required:"false"`

	// 网卡升降级(1,表示升级,2表示降级,0表示不变)
	NetCapValue *int `required:"false"`

	// 【待废弃】主机系列,目前支持N1,N2
	HostType *string `required:"false"`
}

GetUHostUpgradePriceRequest is request schema for GetUHostUpgradePrice action

type GetUHostUpgradePriceResponse

type GetUHostUpgradePriceResponse struct {
	response.CommonBase

	// 规格调整差价。精确到小数点后2位。
	Price float64
}

GetUHostUpgradePriceResponse is response schema for GetUHostUpgradePrice action

type ImportCustomImageRequest added in v0.6.3

type ImportCustomImageRequest struct {
	request.CommonBase

	// 镜像名称
	ImageName *string `required:"true"`

	// UFile私有空间地址
	UFileUrl *string `required:"true"`

	// 操作系统平台,比如CentOS、Ubuntu、Windows、RedHat等,请参考控制台的镜像版本;若导入控制台上没有的操作系统,参数为Other
	OsType *string `required:"true"`

	// 操作系统详细版本,请参考控制台的镜像版本;OsType为Other时,输入参数为Other
	OsName *string `required:"true"`

	// 镜像格式,可选RAW、VHD、VMDK、qcow2
	Format *string `required:"true"`

	// 是否授权。必须填true
	Auth *bool `required:"true"`

	// 镜像描述
	ImageDescription *string `required:"false"`
}

ImportCustomImageRequest is request schema for ImportCustomImage action

type ImportCustomImageResponse added in v0.6.3

type ImportCustomImageResponse struct {
	response.CommonBase

	// 镜像Id
	ImageId string
}

ImportCustomImageResponse is response schema for ImportCustomImage action

type ModifyUHostInstanceNameRequest

type ModifyUHostInstanceNameRequest struct {
	request.CommonBase

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

	// UHost实例名称
	Name *string `required:"false"`
}

ModifyUHostInstanceNameRequest is request schema for ModifyUHostInstanceName action

type ModifyUHostInstanceNameResponse

type ModifyUHostInstanceNameResponse struct {
	response.CommonBase

	// UHost实例ID
	UhostId string
}

ModifyUHostInstanceNameResponse is response schema for ModifyUHostInstanceName action

type ModifyUHostInstanceRemarkRequest

type ModifyUHostInstanceRemarkRequest struct {
	request.CommonBase

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

	// 备注
	Remark *string `required:"false"`
}

ModifyUHostInstanceRemarkRequest is request schema for ModifyUHostInstanceRemark action

type ModifyUHostInstanceRemarkResponse

type ModifyUHostInstanceRemarkResponse struct {
	response.CommonBase

	// UHost实例ID
	UhostId string
}

ModifyUHostInstanceRemarkResponse is response schema for ModifyUHostInstanceRemark action

type ModifyUHostInstanceTagRequest

type ModifyUHostInstanceTagRequest struct {
	request.CommonBase

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

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

ModifyUHostInstanceTagRequest is request schema for ModifyUHostInstanceTag action

type ModifyUHostInstanceTagResponse

type ModifyUHostInstanceTagResponse struct {
	response.CommonBase

	// UHost实例ID
	UhostId string
}

ModifyUHostInstanceTagResponse is response schema for ModifyUHostInstanceTag action

type PoweroffUHostInstanceRequest

type PoweroffUHostInstanceRequest struct {
	request.CommonBase

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

PoweroffUHostInstanceRequest is request schema for PoweroffUHostInstance action

type PoweroffUHostInstanceResponse

type PoweroffUHostInstanceResponse struct {
	response.CommonBase

	// UHost实例ID
	UhostId string
}

PoweroffUHostInstanceResponse is response schema for PoweroffUHostInstance action

type RebootUHostInstanceRequest

type RebootUHostInstanceRequest struct {
	request.CommonBase

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

	// 加密盘密码
	DiskPassword *string `required:"false"`
}

RebootUHostInstanceRequest is request schema for RebootUHostInstance action

type RebootUHostInstanceResponse

type RebootUHostInstanceResponse struct {
	response.CommonBase

	// UHost实例ID
	UhostId string
}

RebootUHostInstanceResponse is response schema for RebootUHostInstance action

type ReinstallUHostInstanceRequest

type ReinstallUHostInstanceRequest struct {
	request.CommonBase

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

	// 如果创建UHost实例时LoginMode为Password,则必须填写,如果LoginMode为KeyPair,不需要填写 (密码格式使用BASE64编码;LoginMode不可变更)
	Password *string `required:"false"`

	// 镜像Id,默认使用原镜像 参见 [DescribeImage](describe_image.html)
	ImageId *string `required:"false"`

	// 系统盘大小。 单位:GB, 范围[20,100], 步长:10
	BootDiskSpace *int `required:"false"`

	// 是否保留数据盘,保留:Yes,不报留:No, 默认:Yes;如果是从Windows重装为Linux或反之,则无法保留数据盘
	ReserveDisk *string `required:"false"`

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

	// 针对非私有子网主机,可自定义DNS。n可为0-2
	DNSServers []string `required:"false"`
}

ReinstallUHostInstanceRequest is request schema for ReinstallUHostInstance action

type ReinstallUHostInstanceResponse

type ReinstallUHostInstanceResponse struct {
	response.CommonBase

	// UHost实例资源ID
	UhostId string
}

ReinstallUHostInstanceResponse is response schema for ReinstallUHostInstance action

type ResetUHostInstancePasswordRequest

type ResetUHostInstancePasswordRequest struct {
	request.CommonBase

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

	// UHost新密码(密码格式使用BASE64编码)
	Password *string `required:"true"`
}

ResetUHostInstancePasswordRequest is request schema for ResetUHostInstancePassword action

type ResetUHostInstancePasswordResponse

type ResetUHostInstancePasswordResponse struct {
	response.CommonBase

	// UHost实例ID
	UhostId string
}

ResetUHostInstancePasswordResponse is response schema for ResetUHostInstancePassword action

type ResizeAttachedDiskRequest added in v0.7.2

type ResizeAttachedDiskRequest struct {
	request.CommonBase

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

	// 磁盘大小,单位GB,步长为10。取值范围需大于当前磁盘大小,最大值请参考[[api:uhost-api:disk_type|磁盘类型]]。
	DiskSpace *int `required:"true"`

	// 磁盘ID。参见 [DescribeUHostInstance](describe_uhost_instance.html)返回值中的DiskSet。
	DiskId *string `required:"true"`
}

ResizeAttachedDiskRequest is request schema for ResizeAttachedDisk action

type ResizeAttachedDiskResponse added in v0.7.2

type ResizeAttachedDiskResponse struct {
	response.CommonBase

	// 改配成功的磁盘id
	DiskId string
}

ResizeAttachedDiskResponse is response schema for ResizeAttachedDisk action

type ResizeUHostInstanceRequest

type ResizeUHostInstanceRequest struct {
	request.CommonBase

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

	// 虚拟CPU核数。可选参数:1-32(可选范围与UHostType相关)。默认值为当前实例的CPU核数
	CPU *int `required:"false"`

	// 内存大小。单位:MB。范围 :[1024, 262144],取值为1024的倍数(可选范围与UHostType相关)。默认值为当前实例的内存大小。
	Memory *int `required:"false"`

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

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

	// 网卡升降级(1,表示升级,2表示降级,0表示不变)
	NetCapValue *int `required:"false"`
}

ResizeUHostInstanceRequest is request schema for ResizeUHostInstance action

type ResizeUHostInstanceResponse

type ResizeUHostInstanceResponse struct {
	response.CommonBase

	// UHost实例ID
	UhostId string
}

ResizeUHostInstanceResponse is response schema for ResizeUHostInstance action

type StartUHostInstanceRequest

type StartUHostInstanceRequest struct {
	request.CommonBase

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

	// 加密盘密码
	DiskPassword *string `required:"false"`
}

StartUHostInstanceRequest is request schema for StartUHostInstance action

type StartUHostInstanceResponse

type StartUHostInstanceResponse struct {
	response.CommonBase

	// UHost实例ID
	UhostId string
}

StartUHostInstanceResponse is response schema for StartUHostInstance action

type State

type State string

State is the state of UHost instance

const (
	StateInitializing State = "Initializing"
	StateStarting     State = "Starting"
	StateRunning      State = "Running"
	StateStopping     State = "Stopping"
	StateStopped      State = "Stopped"
	StateInstallFail  State = "InstallFail"
	StateRebooting    State = "Rebooting"
)

Enum values for State

func (State) MarshalValue

func (enum State) MarshalValue() (string, error)

MarshalValue will marshal state value to string

type StopUHostInstanceRequest

type StopUHostInstanceRequest struct {
	request.CommonBase

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

StopUHostInstanceRequest is request schema for StopUHostInstance action

type StopUHostInstanceResponse

type StopUHostInstanceResponse struct {
	response.CommonBase

	// UHost实例ID
	UhostId string
}

StopUHostInstanceResponse is response schema for StopUHostInstance action

type TerminateCustomImageRequest

type TerminateCustomImageRequest struct {
	request.CommonBase

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

TerminateCustomImageRequest is request schema for TerminateCustomImage action

type TerminateCustomImageResponse

type TerminateCustomImageResponse struct {
	response.CommonBase

	// 自制镜像Id
	ImageId string
}

TerminateCustomImageResponse is response schema for TerminateCustomImage action

type TerminateUHostInstanceRequest

type TerminateUHostInstanceRequest struct {
	request.CommonBase

	// UHost资源Id 参见 [DescribeUHostInstance](describe_uhost_instance.html)
	UHostId *string `required:"true"`

	// 是否直接删除,0表示按照原来的逻辑(有回收站权限,则进入回收站),1表示直接删除
	Destroy *int `required:"false"`

	// 是否释放绑定的EIP。true: 解绑EIP后,并释放;其他值或不填:解绑EIP。
	ReleaseEIP *bool `required:"false"`

	// 是否删除挂载的数据盘。true删除,其他不删除。
	ReleaseUDisk *bool `required:"false"`
}

TerminateUHostInstanceRequest is request schema for TerminateUHostInstance action

type TerminateUHostInstanceResponse

type TerminateUHostInstanceResponse struct {
	response.CommonBase

	// 放入回收站:"Yes", 彻底删除:“No”
	InRecycle string

	// UHost 实例 Id
	UHostId string
}

TerminateUHostInstanceResponse is response schema for TerminateUHostInstance action

type UHostClient

type UHostClient struct {
	*ucloud.Client
}

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

func (c *UHostClient) CopyCustomImage(req *CopyCustomImageRequest) (*CopyCustomImageResponse, error)

CopyCustomImage - 复制自制镜像

func (*UHostClient) CreateCustomImage

CreateCustomImage - 从指定UHost实例,生成自定义镜像。

func (*UHostClient) CreateUHostInstance

CreateUHostInstance - 指定数据中心,根据资源使用量创建指定数量的UHost实例。

func (*UHostClient) DescribeImage

func (c *UHostClient) DescribeImage(req *DescribeImageRequest) (*DescribeImageResponse, error)

DescribeImage - 获取指定数据中心镜像列表,用户可通过指定操作系统类型,镜像Id进行过滤。

func (*UHostClient) DescribeUHostInstance

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

func (*UHostClient) DescribeUHostTags

DescribeUHostTags - 获取指定数据中心的业务组列表。

func (*UHostClient) GetUHostInstancePrice

GetUHostInstancePrice - 根据UHost实例配置,获取UHost实例的价格。

func (*UHostClient) GetUHostInstanceVncInfo

GetUHostInstanceVncInfo - 获取指定UHost实例的管理VNC配置详细信息。

func (*UHostClient) GetUHostUpgradePrice

GetUHostUpgradePrice - 获取UHost实例升级配置的价格。可选配置范围请参考[[api:uhost-api:uhost_type|云主机机型说明]]。

func (*UHostClient) ImportCustomImage added in v0.6.3

ImportCustomImage - 把UFile的镜像文件导入到UHost,生成自定义镜像

func (*UHostClient) ModifyUHostInstanceName

ModifyUHostInstanceName - 修改指定UHost实例名称,需要给出数据中心,UHostId,及新的实例名称。

func (*UHostClient) ModifyUHostInstanceRemark

ModifyUHostInstanceRemark - 修改指定UHost实例备注信息。

func (*UHostClient) ModifyUHostInstanceTag

ModifyUHostInstanceTag - 修改指定UHost实例业务组标识。

func (*UHostClient) NewCopyCustomImageRequest

func (c *UHostClient) NewCopyCustomImageRequest() *CopyCustomImageRequest

NewCopyCustomImageRequest will create request of CopyCustomImage action.

func (*UHostClient) NewCreateCustomImageRequest

func (c *UHostClient) NewCreateCustomImageRequest() *CreateCustomImageRequest

NewCreateCustomImageRequest will create request of CreateCustomImage action.

func (*UHostClient) NewCreateUHostInstanceRequest

func (c *UHostClient) NewCreateUHostInstanceRequest() *CreateUHostInstanceRequest

NewCreateUHostInstanceRequest will create request of CreateUHostInstance action.

func (*UHostClient) NewDescribeImageRequest

func (c *UHostClient) NewDescribeImageRequest() *DescribeImageRequest

NewDescribeImageRequest will create request of DescribeImage action.

func (*UHostClient) NewDescribeUHostInstanceRequest

func (c *UHostClient) NewDescribeUHostInstanceRequest() *DescribeUHostInstanceRequest

NewDescribeUHostInstanceRequest will create request of DescribeUHostInstance action.

func (*UHostClient) NewDescribeUHostTagsRequest

func (c *UHostClient) NewDescribeUHostTagsRequest() *DescribeUHostTagsRequest

NewDescribeUHostTagsRequest will create request of DescribeUHostTags action.

func (*UHostClient) NewGetUHostInstancePriceRequest

func (c *UHostClient) NewGetUHostInstancePriceRequest() *GetUHostInstancePriceRequest

NewGetUHostInstancePriceRequest will create request of GetUHostInstancePrice action.

func (*UHostClient) NewGetUHostInstanceVncInfoRequest

func (c *UHostClient) NewGetUHostInstanceVncInfoRequest() *GetUHostInstanceVncInfoRequest

NewGetUHostInstanceVncInfoRequest will create request of GetUHostInstanceVncInfo action.

func (*UHostClient) NewGetUHostUpgradePriceRequest

func (c *UHostClient) NewGetUHostUpgradePriceRequest() *GetUHostUpgradePriceRequest

NewGetUHostUpgradePriceRequest will create request of GetUHostUpgradePrice action.

func (*UHostClient) NewImportCustomImageRequest added in v0.6.3

func (c *UHostClient) NewImportCustomImageRequest() *ImportCustomImageRequest

NewImportCustomImageRequest will create request of ImportCustomImage action.

func (*UHostClient) NewModifyUHostInstanceNameRequest

func (c *UHostClient) NewModifyUHostInstanceNameRequest() *ModifyUHostInstanceNameRequest

NewModifyUHostInstanceNameRequest will create request of ModifyUHostInstanceName action.

func (*UHostClient) NewModifyUHostInstanceRemarkRequest

func (c *UHostClient) NewModifyUHostInstanceRemarkRequest() *ModifyUHostInstanceRemarkRequest

NewModifyUHostInstanceRemarkRequest will create request of ModifyUHostInstanceRemark action.

func (*UHostClient) NewModifyUHostInstanceTagRequest

func (c *UHostClient) NewModifyUHostInstanceTagRequest() *ModifyUHostInstanceTagRequest

NewModifyUHostInstanceTagRequest will create request of ModifyUHostInstanceTag action.

func (*UHostClient) NewPoweroffUHostInstanceRequest

func (c *UHostClient) NewPoweroffUHostInstanceRequest() *PoweroffUHostInstanceRequest

NewPoweroffUHostInstanceRequest will create request of PoweroffUHostInstance action.

func (*UHostClient) NewRebootUHostInstanceRequest

func (c *UHostClient) NewRebootUHostInstanceRequest() *RebootUHostInstanceRequest

NewRebootUHostInstanceRequest will create request of RebootUHostInstance action.

func (*UHostClient) NewReinstallUHostInstanceRequest

func (c *UHostClient) NewReinstallUHostInstanceRequest() *ReinstallUHostInstanceRequest

NewReinstallUHostInstanceRequest will create request of ReinstallUHostInstance action.

func (*UHostClient) NewResetUHostInstancePasswordRequest

func (c *UHostClient) NewResetUHostInstancePasswordRequest() *ResetUHostInstancePasswordRequest

NewResetUHostInstancePasswordRequest will create request of ResetUHostInstancePassword action.

func (*UHostClient) NewResizeAttachedDiskRequest added in v0.7.2

func (c *UHostClient) NewResizeAttachedDiskRequest() *ResizeAttachedDiskRequest

NewResizeAttachedDiskRequest will create request of ResizeAttachedDisk action.

func (*UHostClient) NewResizeUHostInstanceRequest

func (c *UHostClient) NewResizeUHostInstanceRequest() *ResizeUHostInstanceRequest

NewResizeUHostInstanceRequest will create request of ResizeUHostInstance action.

func (*UHostClient) NewStartUHostInstanceRequest

func (c *UHostClient) NewStartUHostInstanceRequest() *StartUHostInstanceRequest

NewStartUHostInstanceRequest will create request of StartUHostInstance action.

func (*UHostClient) NewStopUHostInstanceRequest

func (c *UHostClient) NewStopUHostInstanceRequest() *StopUHostInstanceRequest

NewStopUHostInstanceRequest will create request of StopUHostInstance action.

func (*UHostClient) NewTerminateCustomImageRequest

func (c *UHostClient) NewTerminateCustomImageRequest() *TerminateCustomImageRequest

NewTerminateCustomImageRequest will create request of TerminateCustomImage action.

func (*UHostClient) NewTerminateUHostInstanceRequest

func (c *UHostClient) NewTerminateUHostInstanceRequest() *TerminateUHostInstanceRequest

NewTerminateUHostInstanceRequest will create request of TerminateUHostInstance action.

func (*UHostClient) NewUpgradeToArkUHostInstanceRequest

func (c *UHostClient) NewUpgradeToArkUHostInstanceRequest() *UpgradeToArkUHostInstanceRequest

NewUpgradeToArkUHostInstanceRequest will create request of UpgradeToArkUHostInstance action.

func (*UHostClient) NewWaitUntilUHostInstanceStateRequest

func (c *UHostClient) NewWaitUntilUHostInstanceStateRequest() *WaitUntilUHostInstanceStateRequest

NewWaitUntilUHostInstanceStateRequest will create request of WaitUntilUHostInstanceState action.

func (*UHostClient) PoweroffUHostInstance

PoweroffUHostInstance - 直接关闭UHost实例电源,无需等待实例正常关闭。

func (*UHostClient) RebootUHostInstance

RebootUHostInstance - 重新启动UHost实例,需要指定数据中心及UHostID两个参数的值。

func (*UHostClient) ReinstallUHostInstance

ReinstallUHostInstance - 重新安装指定UHost实例的操作系统

func (*UHostClient) ResetUHostInstancePassword

ResetUHostInstancePassword - 重置UHost实例的管理员密码。

func (*UHostClient) ResizeAttachedDisk added in v0.7.2

ResizeAttachedDisk - 修改挂载的磁盘大小,包含系统盘和数据盘

func (*UHostClient) ResizeUHostInstance

ResizeUHostInstance - 修改指定UHost实例的资源配置,如CPU核心数,内存容量大小,网络增强等。可选配置范围请参考[[api:uhost-api:uhost_type|云主机机型说明]]。

func (*UHostClient) StartUHostInstance

StartUHostInstance - 启动处于关闭状态的UHost实例,需要指定数据中心及UHostID两个参数的值。

func (*UHostClient) StopUHostInstance

StopUHostInstance - 指停止处于运行状态的UHost实例,需指定数据中心及UhostID。

func (*UHostClient) TerminateCustomImage

TerminateCustomImage - 删除用户自定义镜像

func (*UHostClient) TerminateUHostInstance

TerminateUHostInstance - 删除指定数据中心的UHost实例。

func (*UHostClient) UpgradeToArkUHostInstance

UpgradeToArkUHostInstance - 普通升级为方舟机型

func (*UHostClient) WaitUntilUHostInstanceState

func (c *UHostClient) WaitUntilUHostInstanceState(req *WaitUntilUHostInstanceStateRequest) error

WaitUntilUHostInstanceState will pending current goroutine until the state has changed to expected state.

type UHostDisk

type UHostDisk struct {
	// 磁盘大小,单位GB。
	Size *int `required:"true"`

	// 磁盘类型。枚举值:LOCAL_NORMAL 普通本地盘 | CLOUD_NORMAL 普通云盘 |LOCAL_SSD SSD本地盘 | CLOUD_SSD SSD云盘,默认为LOCAL_NORMAL。磁盘仅支持有限组合,详情请查询控制台。
	Type *string `required:"true"`

	// 是否是系统盘。枚举值:True|False
	IsBoot *string `required:"true"`

	// NONE|DATAARK
	BackupType *string `required:"false"`
}

UHostDisk - the request query for disk of uhost

type UHostDiskSet

type UHostDiskSet struct {

	// 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。
	DiskType string

	// 是否是系统盘。枚举值:\\ > True,是系统盘 \\ > False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。
	IsBoot string

	// true: 加密盘 false:非加密盘
	Encrypted bool

	// 【建议不再使用】磁盘类型。系统盘: Boot,数据盘: Data,网络盘:Udisk
	Type string

	// 磁盘ID
	DiskId string

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

	// 磁盘盘符
	Drive string

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

	// 备份方案。若开通了数据方舟,则为DataArk
	BackupType string
}

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 {

	// 【暂未支持】是否为默认网卡。True: 是默认网卡;其他值:不是。
	Default string

	// 当前网卡的Mac。
	Mac string

	// 当前EIP的权重。权重最大的为当前的出口IP。
	Weight int

	// 国际: Internation,BGP: Bgp,内网: Private
	Type string

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

	// IP地址
	IP string

	// IP对应的带宽, 单位: Mb  (内网IP不显示带宽信息)
	Bandwidth int

	// IP地址对应的VPC ID。(北京一不支持,字段返回为空)
	VPCId string

	// IP地址对应的子网 ID。(北京一不支持,字段返回为空)
	SubnetId string
}

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 UHostImageSet

type UHostImageSet struct {

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

	// 镜像ID
	ImageId string

	// 镜像名称
	ImageName string

	// 操作系统类型:Liunx,Windows
	OsType string

	// 操作系统名称
	OsName string

	// 镜像类型 标准镜像:Base, 行业镜像:Business,自定义镜像:Custom
	ImageType string

	// 特殊状态标识, 目前包含NetEnhnced(网络增强1.0), NetEnhanced_Ultra](网络增强2.0)
	Features []string

	// 行业镜像类型(仅行业镜像将返回这个值)
	FuncType string

	// 集成软件名称(仅行业镜像将返回这个值)
	IntegratedSoftware string

	// 供应商(仅行业镜像将返回这个值)
	Vendor string

	// 介绍链接(仅行业镜像将返回这个值)
	Links string

	// 镜像状态, 可用:Available,制作中:Making, 不可用:Unavailable
	State string

	// 镜像描述
	ImageDescription string

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

	// 镜像大小
	ImageSize int

	// 默认值为空”'。当CentOS 7.3/7.4/7.5等镜像会标记为“Broadwell”
	MinimalCPU string
}

UHostImageSet - DescribeImage

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

	// 云主机机型。参考[[api:uhost-api:uhost_type|云主机机型说明]]。
	UHostType string

	// 【建议不再使用】主机磁盘类型。 枚举值为:\\ > LocalDisk,本地磁盘; \\ > UDisk 云盘。\\只要有一块磁盘为本地盘,即返回LocalDisk。
	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: 网络增强1.0; Ultra: 网络增强2.0
	NetCapability string

	// 【建议不再使用】网络状态。 连接:Connected, 断开:NotConnected
	NetworkState string

	// 【建议不再使用】数据方舟模式。枚举值:\\ > Yes: 开启方舟; \\ > no,未开启方舟
	TimemachineFeature string

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

	// 【建议不再使用】仅北京A的云主机会返回此字段。基础网络模式:Default;子网模式:Private
	SubnetType string

	// 内网的IP地址
	IPs []string

	// 创建主机的最初来源镜像的操作系统名称(若直接通过基础镜像创建,此处返回和BasicImageName一致)
	OsName string

	// 操作系统类别。返回"Linux"或者"Windows"
	OsType string

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

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

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

	// GPU个数
	GPU int

	// 系统盘状态 Normal表示初始化完成;Initializing表示在初始化。仍在初始化的系统盘无法制作镜像。
	BootDiskState string

	// 总的数据盘存储空间。
	TotalDiskSpace int

	// 隔离组id,不在隔离组则返回""
	IsolationGroup 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 float64
}

UHostPriceSet - 主机价格

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

type UHostTagSet

type UHostTagSet struct {

	// 业务组名称
	Tag string

	// 该业务组中包含的主机个数
	TotalCount int

	// 可用区
	Zone string
}

UHostTagSet - DescribeUHostTags

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

type UpgradeToArkUHostInstanceRequest

type UpgradeToArkUHostInstanceRequest struct {
	request.CommonBase

	// UHost主机的资源ID,例如UHostIds.0代表希望升级的主机1,UHostIds.1代表主机2。
	UHostIds []string `required:"true"`

	// 代金券ID 请参考DescribeCoupon接口
	CouponId *string `required:"false"`
}

UpgradeToArkUHostInstanceRequest is request schema for UpgradeToArkUHostInstance action

type UpgradeToArkUHostInstanceResponse

type UpgradeToArkUHostInstanceResponse struct {
	response.CommonBase

	// UHost主机的资源ID数组
	UHostSet []string
}

UpgradeToArkUHostInstanceResponse is response schema for UpgradeToArkUHostInstance action

type WaitUntilUHostInstanceStateRequest

type WaitUntilUHostInstanceStateRequest struct {
	request.CommonBase

	Interval        *time.Duration
	MaxAttempts     *int
	DescribeRequest *DescribeUHostInstanceRequest
	State           State
	IgnoreError     *bool
}

WaitUntilUHostInstanceStateRequest is the request of uhost instance state waiter

Jump to

Keyboard shortcuts

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