uhost

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: 8 Imported by: 28

Documentation

Overview

Package uhost include resources of ucloud uhost 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"`

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

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

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

	// 目标地域,不跨地域不用填
	TargetRegion *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

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

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

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

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 CreateIsolationGroupRequest added in v0.8.8

type CreateIsolationGroupRequest struct {
	request.CommonBase

	// 硬件隔离组名称。请遵照[[api:uhost-api:specification|字段规范]]设定隔离组名称。
	GroupName *string `required:"true"`

	// 备注。请遵照[[api:uhost-api:specification|字段规范]]设定隔离组备注。
	Remark *string `required:"false"`
}

CreateIsolationGroupRequest is request schema for CreateIsolationGroup action

type CreateIsolationGroupResponse added in v0.8.8

type CreateIsolationGroupResponse struct {
	response.CommonBase

	// 硬件隔离组id
	GroupId string
}

CreateIsolationGroupResponse is response schema for CreateIsolationGroup action

type CreateUHostInstanceParamNetworkInterface added in v0.8.7

type CreateUHostInstanceParamNetworkInterface struct {

	// 申请并绑定一个教育网EIP。True为申请并绑定,False为不会申请绑定,默认False。当前只支持具有HPC特性的机型。
	CreateCernetIp *bool `required:"false"`

	//
	EIP *CreateUHostInstanceParamNetworkInterfaceEIP `required:"false"`
}

CreateUHostInstanceParamNetworkInterface is request schema for complex param

type CreateUHostInstanceParamNetworkInterfaceEIP added in v0.8.7

type CreateUHostInstanceParamNetworkInterfaceEIP struct {

	// 【若绑定EIP,此参数必填】弹性IP的外网带宽, 单位为Mbps. 共享带宽模式必须指定0M带宽, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-800]
	Bandwidth *int `required:"false"`

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

	//
	GlobalSSH *CreateUHostInstanceParamNetworkInterfaceEIPGlobalSSH `required:"false"`

	// 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International BGP: Bgp 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International
	OperatorName *string `required:"false"`

	// 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. "Free":免费带宽模式,默认为 "Bandwidth"
	PayMode *string `required:"false"`

	// 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效
	ShareBandwidthId *string `required:"false"`
}

CreateUHostInstanceParamNetworkInterfaceEIP is request schema for complex param

type CreateUHostInstanceParamNetworkInterfaceEIPGlobalSSH added in v0.8.7

type CreateUHostInstanceParamNetworkInterfaceEIPGlobalSSH struct {

	// 填写支持SSH访问IP的地区名称,如“洛杉矶”,“新加坡”,“香港”,“东京”,“华盛顿”,“法兰克福”。Area和AreaCode两者必填其中之一。
	Area *string `required:"false"`

	// GlobalSSH的地区编码,格式为区域航空港国际通用代码。Area和AreaCode两者必填其中之一。
	AreaCode *string `required:"false"`

	// SSH端口,1-65535且不能使用80,443端口
	Port *int `required:"false"`
}

CreateUHostInstanceParamNetworkInterfaceEIPGlobalSSH is request schema for complex param

type CreateUHostInstanceParamNetworkInterfaceIPv6 added in v0.17.0

type CreateUHostInstanceParamNetworkInterfaceIPv6 struct {
}

CreateUHostInstanceParamNetworkInterfaceIPv6 is request schema for complex param

type CreateUHostInstanceParamVirtualGpu added in v0.20.2

type CreateUHostInstanceParamVirtualGpu struct {
}

CreateUHostInstanceParamVirtualGpu is request schema for complex param

type CreateUHostInstanceParamVirtualGpuGPUVirtualGpu added in v0.20.2

type CreateUHostInstanceParamVirtualGpuGPUVirtualGpu struct {
}

CreateUHostInstanceParamVirtualGpuGPUVirtualGpu is request schema for complex param

type CreateUHostInstanceParamVolumes added in v0.18.1

type CreateUHostInstanceParamVolumes struct {

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

	// 【该字段已废弃,请谨慎使用】
	IsBoot *string `required:"false" deprecated:"true"`
}

CreateUHostInstanceParamVolumes is request schema for complex param

type CreateUHostInstanceRequest

type CreateUHostInstanceRequest struct {
	request.CommonBase

	// 告警模板id,如果传了告警模板id,且告警模板id正确,则绑定告警模板。绑定告警模板失败只会在后台有日志,不会影响创建主机流程,也不会在前端报错。
	AlarmTemplateId *int `required:"false"`

	// 数据盘是否需要自动分区挂载。当镜像支持“Cloud-init”Feature时可填写此字段。取值 >“On” 自动挂载(默认值)> “Off” 不自动挂载。
	AutoDataDiskInit *string `required:"false"`

	// 【该字段已废弃,请谨慎使用】
	BootDiskSpace *int `required:"false" deprecated:"true"`

	// 虚拟CPU核数。可选参数:1-64(具体机型与CPU的对应关系参照控制台)。默认值: 4。
	CPU *int `required:"false"`

	// 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按小时后付费(支持关机不收费,目前仅部分可用区支持,请联系您的客户经理) \\Preemptive计费为抢占式实例 \\ 默认为月付
	ChargeType *string `required:"false"`

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

	// 【该字段已废弃,请谨慎使用】
	DiskSpace *int `required:"false" deprecated:"true"`

	//
	Disks []UHostDisk `required:"false"`

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

	// GPU类型,枚举值["K80", "P40", "V100", "T4", "T4S","2080Ti","2080Ti-4C","1080Ti"],MachineType为G时必填
	GpuType *string `required:"false"`

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

	// 热升级特性。True为开启,False为未开启,默认False。
	HotplugFeature *bool `required:"false"`

	// HPC特性,主要涉及绑核操作。True为开启,False为未开启,默认False。
	HpcEnhanced *bool `required:"false"`

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

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

	// 硬件隔离组id。可通过DescribeIsolationGroup获取。
	IsolationGroup *string `required:"false"`

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

	// 主机登陆模式。密码(默认选项): Password。
	LoginMode *string `required:"true"`

	// 云主机机型(V2.0),在本字段和字段UHostType中,仅需要其中1个字段即可。枚举值["N", "C", "G", "O", "OS", "OPRO", "OMAX", "O.BM"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。
	MachineType *string `required:"false"`

	// 本次最大创建主机数量,取值范围是[1,100],默认值为1。
	MaxCount *int `required:"false"`

	// 内存大小。单位:MB。范围 :[1024, 262144],取值为1024的倍数(可选范围参考控制台)。默认值:8192
	Memory *int `required:"false"`

	// 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake";"Intel/CascadelakeR"; “Amd/Epyc2”,"Amd/Auto"],默认值是"Intel/Auto"。
	MinimalCpuPlatform *string `required:"false"`

	// UHost实例名称。默认:UHost。请遵照[[api:uhost-api:specification|字段规范]]设定实例名称。
	Name *string `required:"false"`

	// 网络增强特性。枚举值:Normal(默认),不开启;  Super,开启网络增强1.0; Ultra,开启网络增强2.0(仅支持部分可用区,请参考控制台)
	NetCapability *string `required:"false"`

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

	//
	NetworkInterface []CreateUHostInstanceParamNetworkInterface `required:"false"`

	// UHost密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,举例如下:# echo -n Password1 | base64UGFzc3dvcmQx。
	Password *string `required:"true"`

	// 【数组】创建云主机时指定内网IP。若不传值,则随机分配当前子网下的IP。调用方式举例:PrivateIp.0=x.x.x.x。当前只支持一个内网IP。
	PrivateIp []string `required:"false"`

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

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

	// 【该字段已废弃,请谨慎使用】
	ResourceType *int `required:"false" deprecated:"true"`

	// 抢占式实例限制模式,仅在ChargeType为"Preemptive"生效。可选模式为PowerOff:代表关机,LowSpeed代码限速 //默认为PowerOff
	RestrictMode *string `required:"false"`

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

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

	// 子网 ID。默认为当前地域的默认子网。
	SubnetId *string `required:"false"`

	// 业务组。默认:Default(Default即为未分组)。请遵照[[api:uhost-api:specification|字段规范]]设定业务组。
	Tag *string `required:"false"`

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

	// 【建议后续不再使用】云主机机型(V1.0),在本字段和字段MachineType中,仅需要其中1个字段即可。参考[[api:uhost-api:uhost_type|云主机机型说明]]。
	UHostType *string `required:"false"`

	// 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码
	UserData *string `required:"false"`

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

	// VPC ID。默认为当前地域的默认VPC。
	VPCId *string `required:"false"`

	// 【该字段已废弃,请谨慎使用】
	Volumes []CreateUHostInstanceParamVolumes `required:"false" deprecated:"true"`
}

CreateUHostInstanceRequest is request schema for CreateUHostInstance action

type CreateUHostInstanceResponse

type CreateUHostInstanceResponse struct {
	response.CommonBase

	// 【批量创建不会返回】IP信息
	IPs []string

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

CreateUHostInstanceResponse is response schema for CreateUHostInstance action

type DeleteIsolationGroupRequest added in v0.8.8

type DeleteIsolationGroupRequest struct {
	request.CommonBase

	// 硬件隔离组id
	GroupId *string `required:"true"`
}

DeleteIsolationGroupRequest is request schema for DeleteIsolationGroup action

type DeleteIsolationGroupResponse added in v0.8.8

type DeleteIsolationGroupResponse struct {
	response.CommonBase

	// 硬件隔离组id
	GroupId string
}

DeleteIsolationGroupResponse is response schema for DeleteIsolationGroup action

type DescribeImageRequest

type DescribeImageRequest struct {
	request.CommonBase

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

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

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

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

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

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

DescribeImageRequest is request schema for DescribeImage action

type DescribeImageResponse

type DescribeImageResponse struct {
	response.CommonBase

	// 操作名称
	Action string

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

	// 返回码
	RetCode int

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

DescribeImageResponse is response schema for DescribeImage action

type DescribeIsolationGroupRequest added in v0.8.8

type DescribeIsolationGroupRequest struct {
	request.CommonBase

	// 待查的硬件隔离组id
	GroupId *string `required:"false"`

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

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

DescribeIsolationGroupRequest is request schema for DescribeIsolationGroup action

type DescribeIsolationGroupResponse added in v0.8.8

type DescribeIsolationGroupResponse struct {
	response.CommonBase

	// 硬件隔离组集合。参见数据结构IsolationGroup。
	IsolationGroupSet []IsolationGroup

	// 硬件隔离组总数
	TotalCount int
}

DescribeIsolationGroupResponse is response schema for DescribeIsolationGroup action

type DescribeUHostInstanceRequest

type DescribeUHostInstanceRequest struct {
	request.CommonBase

	// 硬件隔离组id。通过硬件隔离组筛选主机。
	IsolationGroup *string `required:"false"`

	// 【该字段已废弃,请谨慎使用】
	LifeCycle *int `required:"false" deprecated:"true"`

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

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

	// 子网id。通过子网筛选主机。北京一地域无效。
	SubnetId *string `required:"false"`

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

	// 要挂载的云盘id,过滤返回能被UDiskId挂载的云主机。目前主要针对rssd云盘使用
	UDiskIdForAttachment *string `required:"false"`

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

	// vpc id。通过VPC筛选主机。北京一地域无效。
	VPCId *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

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

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

DescribeUHostTagsResponse is response schema for DescribeUHostTags action

type GetAttachedDiskUpgradePriceRequest added in v0.14.0

type GetAttachedDiskUpgradePriceRequest struct {
	request.CommonBase

	// 磁盘备份方案。枚举值:\\ > NONE,无备份 \\ > DATAARK,数据方舟 \\> SNAPSHOT(SNAPSHOT模式目前仅在上海C支持),快照 \\ 当前磁盘支持的备份模式参考 [[api:uhost-api:disk_type|磁盘类型]]。默认值为当前的备份模式。
	BackupMode *string `required:"false"`

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

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

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

GetAttachedDiskUpgradePriceRequest is request schema for GetAttachedDiskUpgradePrice action

type GetAttachedDiskUpgradePriceResponse added in v0.14.0

type GetAttachedDiskUpgradePriceResponse struct {
	response.CommonBase

	// 升级差价。精度为小数点后2位。
	Price float64
}

GetAttachedDiskUpgradePriceResponse is response schema for GetAttachedDiskUpgradePrice action

type GetUHostInstancePriceParamVolumes added in v0.18.1

type GetUHostInstancePriceParamVolumes struct {

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

	// 【该字段已废弃,请谨慎使用】
	Size *int `required:"false" deprecated:"true"`

	// 【该字段已废弃,请谨慎使用】
	Type *string `required:"false" deprecated:"true"`
}

GetUHostInstancePriceParamVolumes is request schema for complex param

type GetUHostInstancePriceRequest

type GetUHostInstancePriceRequest struct {
	request.CommonBase

	// CPU核数。可选参数:1-64。可选范围参照控制台。默认值: 4
	CPU *int `required:"true"`

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

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

	// 取值"Intel" "Amd",默认值“Intel”
	CpuPlatform *string `required:"false"`

	// 【该字段已废弃,请谨慎使用】
	DiskSpace *int `required:"false" deprecated:"true"`

	//
	Disks []UHostDisk `required:"false"`

	// GPU卡核心数。仅GPU机型支持此字段。
	GPU *int `required:"false"`

	// GPU类型,枚举值["K80", "P40", "V100", "T4"]
	GpuType *string `required:"false"`

	// 镜像Id,可通过 [DescribeImage](describe_image.html) 获取镜像ID, 如果镜像ID不传,系统盘大小必传
	ImageId *string `required:"false"`

	// 【该字段已废弃,请谨慎使用】
	LifeCycle *int `required:"false" deprecated:"true"`

	// 云主机机型(V2版本概念)。枚举值["N", "C", "G", "O", "OS", "OPRO", "OMAX", "O.BM"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。
	MachineType *string `required:"false"`

	// 内存大小。单位:MB。范围 :[1024, 262144],取值为1024的倍数(可选范围参照好控制台)。默认值:8192
	Memory *int `required:"true"`

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

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

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

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

	// 【待废弃】云主机机型(V1版本概念)。参考[[api:uhost-api:uhost_type|云主机机型说明]]。
	UHostType *string `required:"false"`

	// 【该字段已废弃,请谨慎使用】
	Volumes []GetUHostInstancePriceParamVolumes `required:"false" deprecated:"true"`
}

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

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

	// Vnc登录IP
	VncIP string

	// Vnc 登录密码
	VncPassword string

	// Vnc登录端口
	VncPort int
}

GetUHostInstanceVncInfoResponse is response schema for GetUHostInstanceVncInfo action

type GetUHostUpgradePriceRequest

type GetUHostUpgradePriceRequest struct {
	request.CommonBase

	// 【该字段已废弃,请谨慎使用】
	BootDiskSpace *int `required:"false" deprecated:"true"`

	// 虚拟CPU核数。可选参数:1-64(可选范围参考控制台)。默认值为当前实例的CPU核数。
	CPU *int `required:"false"`

	// 【该字段已废弃,请谨慎使用】
	DiskSpace *int `required:"false" deprecated:"true"`

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

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

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

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

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

GetUHostUpgradePriceRequest is request schema for GetUHostUpgradePrice action

type GetUHostUpgradePriceResponse

type GetUHostUpgradePriceResponse struct {
	response.CommonBase

	// 限时优惠的折前原价
	OriginalPrice float64

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

GetUHostUpgradePriceResponse is response schema for GetUHostUpgradePrice action

type ImportCustomImageRequest added in v0.6.3

type ImportCustomImageRequest struct {
	request.CommonBase

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

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

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

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

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

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

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

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 IsolationGroup added in v0.8.8

type IsolationGroup struct {

	// 硬件隔离组id
	GroupId string

	// 硬件隔离组名称
	GroupName string

	// 备注
	Remark string

	// 每个可用区中的机器数量。参见数据结构SpreadInfo。
	SpreadInfoSet []SpreadInfo
}

IsolationGroup - 硬件隔离组信息

type LeaveIsolationGroupRequest added in v0.8.8

type LeaveIsolationGroupRequest struct {
	request.CommonBase

	// 硬件隔离组id
	GroupId *string `required:"true"`

	// 主机id
	UHostId *string `required:"true"`
}

LeaveIsolationGroupRequest is request schema for LeaveIsolationGroup action

type LeaveIsolationGroupResponse added in v0.8.8

type LeaveIsolationGroupResponse struct {
	response.CommonBase

	// 主机id
	UHostId string
}

LeaveIsolationGroupResponse is response schema for LeaveIsolationGroup action

type ModifyUHostIPRequest added in v0.16.2

type ModifyUHostIPRequest struct {
	request.CommonBase

	// 需要修改为的 IP 地址。新的IP地址和旧IP地址必须属于统一子网,且和主机内部的配置文件一致。
	PresentIpAddress *string `required:"true"`

	// 所需修改的原 IP 地址 ,当云主机只有一个IP地址时,此参数不必填写。
	PreviousIpAddress *string `required:"false"`

	// 指定云主机 ID。
	UHostId *string `required:"true"`
}

ModifyUHostIPRequest is request schema for ModifyUHostIP action

type ModifyUHostIPResponse added in v0.16.2

type ModifyUHostIPResponse struct {
	response.CommonBase

	// 输出错误的信息
	Message string

	// 目标云主机 ID
	UHostId string
}

ModifyUHostIPResponse is response schema for ModifyUHostIP action

type ModifyUHostInstanceNameRequest

type ModifyUHostInstanceNameRequest struct {
	request.CommonBase

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

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

ModifyUHostInstanceNameRequest is request schema for ModifyUHostInstanceName action

type ModifyUHostInstanceNameResponse

type ModifyUHostInstanceNameResponse struct {
	response.CommonBase

	// UHost实例ID
	UHostId string

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

ModifyUHostInstanceNameResponse is response schema for ModifyUHostInstanceName action

type ModifyUHostInstanceRemarkRequest

type ModifyUHostInstanceRemarkRequest struct {
	request.CommonBase

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

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

ModifyUHostInstanceRemarkRequest is request schema for ModifyUHostInstanceRemark action

type ModifyUHostInstanceRemarkResponse

type ModifyUHostInstanceRemarkResponse struct {
	response.CommonBase

	// UHost实例ID
	UHostId string

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

ModifyUHostInstanceRemarkResponse is response schema for ModifyUHostInstanceRemark action

type ModifyUHostInstanceTagRequest

type ModifyUHostInstanceTagRequest struct {
	request.CommonBase

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

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

ModifyUHostInstanceTagRequest is request schema for ModifyUHostInstanceTag action

type ModifyUHostInstanceTagResponse

type ModifyUHostInstanceTagResponse struct {
	response.CommonBase

	// UHost实例ID
	UHostId string

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

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

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

PoweroffUHostInstanceResponse is response schema for PoweroffUHostInstance action

type RebootUHostInstanceRequest

type RebootUHostInstanceRequest struct {
	request.CommonBase

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

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

RebootUHostInstanceRequest is request schema for RebootUHostInstance action

type RebootUHostInstanceResponse

type RebootUHostInstanceResponse struct {
	response.CommonBase

	// UHost实例ID
	UHostId string

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

RebootUHostInstanceResponse is response schema for RebootUHostInstance action

type ReinstallUHostInstanceRequest

type ReinstallUHostInstanceRequest struct {
	request.CommonBase

	// 数据盘是否需要自动分区挂载。当镜像支持Cloud-init Feature时可填写此字段。取值“On”(默认值), “Off”
	AutoDataDiskInit *string `required:"false"`

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

	// 【该字段已废弃,请谨慎使用】
	DNSServers []string `required:"false" deprecated:"true"`

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

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

	// 是否保留数据盘,保留:Yes,不报留:No, 默认:Yes;如果是从Windows重装为Linux或反之,则无法保留数据盘(该参数目前仅对本地数据盘起作用)
	ReserveDisk *string `required:"false"`

	// 【该字段已废弃,请谨慎使用】
	ResourceType *int `required:"false" deprecated:"true"`

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

	// cloudinit初始化使用。注意:1、总数据量大小不超多16K 2、使用base64编码
	UserData *string `required:"false"`
}

ReinstallUHostInstanceRequest is request schema for ReinstallUHostInstance action

type ReinstallUHostInstanceResponse

type ReinstallUHostInstanceResponse struct {
	response.CommonBase

	// UHost实例资源ID
	UHostId string

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

ReinstallUHostInstanceResponse is response schema for ReinstallUHostInstance action

type ResetUHostInstancePasswordRequest

type ResetUHostInstancePasswordRequest struct {
	request.CommonBase

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

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

ResetUHostInstancePasswordRequest is request schema for ResetUHostInstancePassword action

type ResetUHostInstancePasswordResponse

type ResetUHostInstancePasswordResponse struct {
	response.CommonBase

	// UHost实例ID
	UHostId string

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

ResetUHostInstancePasswordResponse is response schema for ResetUHostInstancePassword action

type ResizeAttachedDiskRequest added in v0.7.2

type ResizeAttachedDiskRequest struct {
	request.CommonBase

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

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

	// 用于测试磁盘是否支持在线扩容。DryRun=true,不会执行实际操作,只会返回操作的预期结果。DryRun = false ,正常执行扩容操作。
	DryRun *bool `required:"false"`

	// UHost实例ID。 参见 [DescribeUHostInstance](describe_uhost_instance.html)。
	UHostId *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

	// 扩容后的状态。NeedRestart = true,必须关闭后启动实例才能使用扩容的磁盘空间。NeedRestart = false,磁盘扩容后无需重启操作。
	NeedRestart bool
}

ResizeAttachedDiskResponse is response schema for ResizeAttachedDisk action

type ResizeUHostInstanceRequest

type ResizeUHostInstanceRequest struct {
	request.CommonBase

	// 【该字段已废弃,请谨慎使用】
	BootDiskSpace *int `required:"false" deprecated:"true"`

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

	// 【该字段已废弃,请谨慎使用】
	DiskSpace *int `required:"false" deprecated:"true"`

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

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

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

ResizeUHostInstanceRequest is request schema for ResizeUHostInstance action

type ResizeUHostInstanceResponse

type ResizeUHostInstanceResponse struct {
	response.CommonBase

	// UHost实例ID
	UHostId string

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

ResizeUHostInstanceResponse is response schema for ResizeUHostInstance action

type SpreadInfo added in v0.8.8

type SpreadInfo struct {

	// 当前地域所有可用区中硬件隔离组中云主机的数量,不超过7。
	UHostCount int

	// 可用区信息
	Zone string
}

SpreadInfo - 每个可用区中硬件隔离组信息

type StartUHostInstanceRequest

type StartUHostInstanceRequest struct {
	request.CommonBase

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

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

StartUHostInstanceRequest is request schema for StartUHostInstance action

type StartUHostInstanceResponse

type StartUHostInstanceResponse struct {
	response.CommonBase

	// UHost实例ID
	UHostId string

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

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

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

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

	// 【该字段已废弃,请谨慎使用】
	Destroy *int `required:"false" deprecated:"true"`

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

	// 删除主机时是否同时删除挂载的数据盘。默认为false。
	ReleaseUDisk *bool `required:"false"`

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

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)

API: CopyCustomImage

复制自制镜像

func (*UHostClient) CreateCustomImage

API: CreateCustomImage

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

func (*UHostClient) CreateIsolationGroup added in v0.8.8

API: CreateIsolationGroup

创建硬件隔离组,组内机器严格隔离在不同宿主机上。

func (*UHostClient) CreateUHostInstance

API: CreateUHostInstance

创建UHost实例。

func (*UHostClient) DeleteIsolationGroup added in v0.8.8

API: DeleteIsolationGroup

删除硬件隔离组。

func (*UHostClient) DescribeImage

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

API: DescribeImage

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

func (*UHostClient) DescribeIsolationGroup added in v0.8.8

API: DescribeIsolationGroup

查询硬件隔离组列表。

func (*UHostClient) DescribeUHostInstance

API: DescribeUHostInstance

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

func (*UHostClient) DescribeUHostTags

API: DescribeUHostTags

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

func (*UHostClient) GetAttachedDiskUpgradePrice added in v0.14.0

API: GetAttachedDiskUpgradePrice

获取挂载磁盘的升级价格

func (*UHostClient) GetUHostInstancePrice

API: GetUHostInstancePrice

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

func (*UHostClient) GetUHostInstanceVncInfo

API: GetUHostInstanceVncInfo

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

func (*UHostClient) GetUHostUpgradePrice

API: GetUHostUpgradePrice

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

func (*UHostClient) ImportCustomImage added in v0.6.3

API: ImportCustomImage

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

func (*UHostClient) LeaveIsolationGroup added in v0.8.8

API: LeaveIsolationGroup

移除硬件隔离组中的主机

func (*UHostClient) ModifyUHostIP added in v0.16.2

func (c *UHostClient) ModifyUHostIP(req *ModifyUHostIPRequest) (*ModifyUHostIPResponse, error)

API: ModifyUHostIP

修改云主机内网 IP 地址

func (*UHostClient) ModifyUHostInstanceName

API: ModifyUHostInstanceName

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

func (*UHostClient) ModifyUHostInstanceRemark

API: ModifyUHostInstanceRemark

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

func (*UHostClient) ModifyUHostInstanceTag

API: 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) NewCreateIsolationGroupRequest added in v0.8.8

func (c *UHostClient) NewCreateIsolationGroupRequest() *CreateIsolationGroupRequest

NewCreateIsolationGroupRequest will create request of CreateIsolationGroup action.

func (*UHostClient) NewCreateUHostInstanceRequest

func (c *UHostClient) NewCreateUHostInstanceRequest() *CreateUHostInstanceRequest

NewCreateUHostInstanceRequest will create request of CreateUHostInstance action.

func (*UHostClient) NewDeleteIsolationGroupRequest added in v0.8.8

func (c *UHostClient) NewDeleteIsolationGroupRequest() *DeleteIsolationGroupRequest

NewDeleteIsolationGroupRequest will create request of DeleteIsolationGroup action.

func (*UHostClient) NewDescribeImageRequest

func (c *UHostClient) NewDescribeImageRequest() *DescribeImageRequest

NewDescribeImageRequest will create request of DescribeImage action.

func (*UHostClient) NewDescribeIsolationGroupRequest added in v0.8.8

func (c *UHostClient) NewDescribeIsolationGroupRequest() *DescribeIsolationGroupRequest

NewDescribeIsolationGroupRequest will create request of DescribeIsolationGroup 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) NewGetAttachedDiskUpgradePriceRequest added in v0.14.0

func (c *UHostClient) NewGetAttachedDiskUpgradePriceRequest() *GetAttachedDiskUpgradePriceRequest

NewGetAttachedDiskUpgradePriceRequest will create request of GetAttachedDiskUpgradePrice 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) NewLeaveIsolationGroupRequest added in v0.8.8

func (c *UHostClient) NewLeaveIsolationGroupRequest() *LeaveIsolationGroupRequest

NewLeaveIsolationGroupRequest will create request of LeaveIsolationGroup action.

func (*UHostClient) NewModifyUHostIPRequest added in v0.16.2

func (c *UHostClient) NewModifyUHostIPRequest() *ModifyUHostIPRequest

NewModifyUHostIPRequest will create request of ModifyUHostIP 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

API: PoweroffUHostInstance

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

func (*UHostClient) RebootUHostInstance

API: RebootUHostInstance

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

func (*UHostClient) ReinstallUHostInstance

API: ReinstallUHostInstance

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

func (*UHostClient) ResetUHostInstancePassword

API: ResetUHostInstancePassword

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

func (*UHostClient) ResizeAttachedDisk added in v0.7.2

API: ResizeAttachedDisk

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

func (*UHostClient) ResizeUHostInstance

API: ResizeUHostInstance

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

func (*UHostClient) StartUHostInstance

API: StartUHostInstance

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

func (*UHostClient) StopUHostInstance

API: StopUHostInstance

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

func (*UHostClient) TerminateCustomImage

API: TerminateCustomImage

删除用户自定义镜像

func (*UHostClient) TerminateUHostInstance

API: TerminateUHostInstance

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

func (*UHostClient) UpgradeToArkUHostInstance

API: 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 {

	// 磁盘备份方案。枚举值:\\ > NONE,无备份 \\ > DATAARK,数据方舟 \\ > SNAPSHOT(SNAPSHOT模式目前仅在上海C支持),快照 \\当前磁盘支持的备份模式参考 [[api:uhost-api:disk_type|磁盘类型]],默认值:NONE
	BackupType *string `required:"false"`

	// 云盘代金券id。不适用于系统盘/本地盘。请通过DescribeCoupon接口查询,或登录用户中心查看
	CouponId *string `required:"false"`

	// 【功能仅部分可用区开放,详询技术支持】磁盘是否加密。加密:true, 不加密: false加密必须传入对应的的KmsKeyId,默认值false
	Encrypted *bool `required:"false"`

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

	// 【功能仅部分可用区开放,详询技术支持】kms key id。选择加密盘时必填。
	KmsKeyId *string `required:"false"`

	// 磁盘大小,单位GB,必须是10GB的整数倍。请参考[[api:uhost-api:disk_type|磁盘类型]]。
	Size *int `required:"true"`

	// 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。
	Type *string `required:"true"`
}

UHostDisk is request schema for complex param

type UHostDiskSet

type UHostDiskSet struct {

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

	// 磁盘ID
	DiskId string

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

	// 磁盘盘符
	Drive string

	// "true": 加密盘 "false":非加密盘
	Encrypted string

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

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

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

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

UHostDiskSet - DescribeUHostInstance

type UHostIPSet

type UHostIPSet struct {

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

	// 内网 Private 类型下,表示是否为默认网卡。true: 是默认网卡;其他值:不是。
	Default string

	// IP地址
	IP string

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

	// IPv4/IPv6;
	IPMode string

	// 内网 Private 类型下,当前网卡的Mac。
	Mac string

	// 弹性网卡为默认网卡时,返回对应的 ID 值
	NetworkInterfaceId string

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

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

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

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

UHostIPSet - DescribeUHostInstance

type UHostImageSet

type UHostImageSet struct {

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

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

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

	// 镜像描述
	ImageDescription string

	// 镜像ID
	ImageId string

	// 镜像名称
	ImageName string

	// 镜像大小
	ImageSize int

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

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

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

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

	// 操作系统名称
	OsName string

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

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

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

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

UHostImageSet - DescribeImage

type UHostInstanceSet

type UHostInstanceSet struct {

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

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

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

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

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

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

	// true,支持cloutinit方式初始化;false,不支持
	CloudInitFeature bool

	// 云主机CPU平台。参考[[api:uhost-api:uhost_type#主机概念20版本|云主机机型说明]]。
	CpuPlatform string

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

	//
	DeleteTime int `deprecated:"true"`

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

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

	// GPU个数
	GPU int

	// 【建议不再使用】主机系列:N2,表示系列2;N1,表示系列1
	HostType string

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

	// true: 开启 hpc 系列功能;false: 未开启
	HpcFeature bool

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

	//
	IPs []string `deprecated:"true"`

	// true:有ipv6特性;false,没有ipv6特性
	IPv6Feature bool

	// 【建议不再使用】主机的系统盘ID。
	ImageId string

	// 隔离组id,不在隔离组则返回""
	IsolationGroup string

	// 密钥信息见 UHostKeyPair
	KeyPair UHostKeyPair

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

	// 云主机机型(新)。参考[[api:uhost-api:uhost_type#主机概念20版本|云主机机型说明]]。
	MachineType string

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

	// UHost实例名称
	Name string

	// 网络增强。Normal: 无;Super: 网络增强1.0; Ultra: 网络增强2.0
	NetCapability string

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

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

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

	// RDMA集群id,仅快杰云主机返回该值;其他类型云主机返回""。当云主机的此值与RSSD云盘的RdmaClusterId相同时,RSSD可以挂载到这台云主机。
	RdmaClusterId string

	// 备注
	Remark string

	// 仅抢占式实例返回,LowSpeed为低速模式,PowerOff为关机模式
	RestrictMode string

	// 实例状态,枚举值:\\ >初始化: Initializing; \\ >启动中: Starting; \\> 运行中: Running; \\> 关机中: Stopping; \\ >关机: Stopped \\ >安装失败: Install Fail; \\ >重启中: Rebooting; \\ > 未知(空字符串,获取状态超时或出错):""
	State string

	// 【建议不再使用】主机磁盘类型。 枚举值为:\\ > LocalDisk,本地磁盘; \\ > UDisk 云盘。\\只要有一块磁盘为本地盘,即返回LocalDisk。
	StorageType string

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

	// 业务组名称
	Tag string

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

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

	// UHost实例ID
	UHostId string

	// 【建议不再使用】云主机机型(旧)。参考[[api:uhost-api:uhost_type|云主机机型说明]]。
	UHostType string

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

UHostInstanceSet - DescribeUHostInstance

type UHostKeyPair added in v0.21.1

type UHostKeyPair struct {

	// 密钥对ID
	KeyPairId string

	// 主机密钥对状态,Normal 正常,Deleted 删除
	KeyPairState string
}

UHostKeyPair - 主机密钥信息

type UHostPriceSet

type UHostPriceSet struct {

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

	// 产品列表价。
	ListPrice float64

	// 限时优惠的折前原价(即列表价乘以商务折扣后的单价)。
	OriginalPrice float64

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

UHostPriceSet - 主机价格

type UHostTagSet

type UHostTagSet struct {

	// 业务组名称
	Tag string

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

	// 可用区
	Zone string
}

UHostTagSet - DescribeUHostTags

type UpgradeToArkUHostInstanceRequest

type UpgradeToArkUHostInstanceRequest struct {
	request.CommonBase

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

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

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