Documentation ¶
Overview ¶
Package uhost include resources of ucloud uhost product
See also
- API: https://docs.ucloud.cn/api/uhost-api/index
- Product: https://www.ucloud.cn/site/product/uhost.html
for detail.
Index ¶
- type AvailableInstanceTypes
- type BootDiskInfo
- type Collection
- type CopyCustomImageRequest
- type CopyCustomImageResponse
- type CpuPlatforms
- type CreateCustomImageRequest
- type CreateCustomImageResponse
- type CreateIsolationGroupRequest
- type CreateIsolationGroupResponse
- type CreateUHostInstanceParamFeatures
- type CreateUHostInstanceParamNetworkInterface
- type CreateUHostInstanceParamNetworkInterfaceEIP
- type CreateUHostInstanceParamNetworkInterfaceEIPGlobalSSH
- type CreateUHostInstanceParamNetworkInterfaceIPv6
- type CreateUHostInstanceParamSecGroupId
- type CreateUHostInstanceParamVolumes
- type CreateUHostInstanceRequest
- type CreateUHostInstanceResponse
- type CreateUHostKeyPairRequest
- type CreateUHostKeyPairResponse
- type DataDiskInfo
- type DeleteIsolationGroupRequest
- type DeleteIsolationGroupResponse
- type DeleteUHostKeyPairsRequest
- type DeleteUHostKeyPairsResponse
- type DescribeAvailableInstanceTypesRequest
- type DescribeAvailableInstanceTypesResponse
- type DescribeImageRequest
- type DescribeImageResponse
- type DescribeIsolationGroupRequest
- type DescribeIsolationGroupResponse
- type DescribeUHostInstanceRequest
- type DescribeUHostInstanceResponse
- type DescribeUHostKeyPairsRequest
- type DescribeUHostKeyPairsResponse
- type DescribeUHostTagsRequest
- type DescribeUHostTagsResponse
- type Disks
- type FeatureModes
- type Features
- type GetAttachedDiskUpgradePriceRequest
- type GetAttachedDiskUpgradePriceResponse
- type GetUHostInstancePriceParamVirtualGpu
- type GetUHostInstancePriceParamVolumes
- type GetUHostInstancePriceRequest
- type GetUHostInstancePriceResponse
- type GetUHostInstanceVncInfoRequest
- type GetUHostInstanceVncInfoResponse
- type GetUHostUpgradePriceRequest
- type GetUHostUpgradePriceResponse
- type GraphicsMemory
- type ImportCustomImageRequest
- type ImportCustomImageResponse
- type ImportUHostKeyPairsRequest
- type ImportUHostKeyPairsResponse
- type IsolationGroup
- type KeyPair
- type KeyPairDesc
- type LeaveIsolationGroupRequest
- type LeaveIsolationGroupResponse
- type MachineSizes
- type ModifyUHostIPRequest
- type ModifyUHostIPResponse
- type ModifyUHostInstanceNameRequest
- type ModifyUHostInstanceNameResponse
- type ModifyUHostInstanceRemarkRequest
- type ModifyUHostInstanceRemarkResponse
- type ModifyUHostInstanceTagRequest
- type ModifyUHostInstanceTagResponse
- type Performance
- type PoweroffUHostInstanceRequest
- type PoweroffUHostInstanceResponse
- type RebootUHostInstanceRequest
- type RebootUHostInstanceResponse
- type ReinstallUHostInstanceRequest
- type ReinstallUHostInstanceResponse
- type ResetUHostInstancePasswordRequest
- type ResetUHostInstancePasswordResponse
- type ResizeAttachedDiskRequest
- type ResizeAttachedDiskResponse
- type ResizeUHostInstanceRequest
- type ResizeUHostInstanceResponse
- type SpreadInfo
- type StartUHostInstanceRequest
- type StartUHostInstanceResponse
- type State
- type StopUHostInstanceRequest
- type StopUHostInstanceResponse
- type TerminateCustomImageRequest
- type TerminateCustomImageResponse
- type TerminateUHostInstanceRequest
- type TerminateUHostInstanceResponse
- type UHostClient
- func (c *UHostClient) CopyCustomImage(req *CopyCustomImageRequest) (*CopyCustomImageResponse, error)
- func (c *UHostClient) CreateCustomImage(req *CreateCustomImageRequest) (*CreateCustomImageResponse, error)
- func (c *UHostClient) CreateIsolationGroup(req *CreateIsolationGroupRequest) (*CreateIsolationGroupResponse, error)
- func (c *UHostClient) CreateUHostInstance(req *CreateUHostInstanceRequest) (*CreateUHostInstanceResponse, error)
- func (c *UHostClient) CreateUHostKeyPair(req *CreateUHostKeyPairRequest) (*CreateUHostKeyPairResponse, error)
- func (c *UHostClient) DeleteIsolationGroup(req *DeleteIsolationGroupRequest) (*DeleteIsolationGroupResponse, error)
- func (c *UHostClient) DeleteUHostKeyPairs(req *DeleteUHostKeyPairsRequest) (*DeleteUHostKeyPairsResponse, error)
- func (c *UHostClient) DescribeAvailableInstanceTypes(req *DescribeAvailableInstanceTypesRequest) (*DescribeAvailableInstanceTypesResponse, error)
- func (c *UHostClient) DescribeImage(req *DescribeImageRequest) (*DescribeImageResponse, error)
- func (c *UHostClient) DescribeIsolationGroup(req *DescribeIsolationGroupRequest) (*DescribeIsolationGroupResponse, error)
- func (c *UHostClient) DescribeUHostInstance(req *DescribeUHostInstanceRequest) (*DescribeUHostInstanceResponse, error)
- func (c *UHostClient) DescribeUHostKeyPairs(req *DescribeUHostKeyPairsRequest) (*DescribeUHostKeyPairsResponse, error)
- func (c *UHostClient) DescribeUHostTags(req *DescribeUHostTagsRequest) (*DescribeUHostTagsResponse, error)
- func (c *UHostClient) GetAttachedDiskUpgradePrice(req *GetAttachedDiskUpgradePriceRequest) (*GetAttachedDiskUpgradePriceResponse, error)
- func (c *UHostClient) GetUHostInstancePrice(req *GetUHostInstancePriceRequest) (*GetUHostInstancePriceResponse, error)
- func (c *UHostClient) GetUHostInstanceVncInfo(req *GetUHostInstanceVncInfoRequest) (*GetUHostInstanceVncInfoResponse, error)
- func (c *UHostClient) GetUHostUpgradePrice(req *GetUHostUpgradePriceRequest) (*GetUHostUpgradePriceResponse, error)
- func (c *UHostClient) ImportCustomImage(req *ImportCustomImageRequest) (*ImportCustomImageResponse, error)
- func (c *UHostClient) ImportUHostKeyPairs(req *ImportUHostKeyPairsRequest) (*ImportUHostKeyPairsResponse, error)
- func (c *UHostClient) LeaveIsolationGroup(req *LeaveIsolationGroupRequest) (*LeaveIsolationGroupResponse, error)
- func (c *UHostClient) ModifyUHostIP(req *ModifyUHostIPRequest) (*ModifyUHostIPResponse, error)
- func (c *UHostClient) ModifyUHostInstanceName(req *ModifyUHostInstanceNameRequest) (*ModifyUHostInstanceNameResponse, error)
- func (c *UHostClient) ModifyUHostInstanceRemark(req *ModifyUHostInstanceRemarkRequest) (*ModifyUHostInstanceRemarkResponse, error)
- func (c *UHostClient) ModifyUHostInstanceTag(req *ModifyUHostInstanceTagRequest) (*ModifyUHostInstanceTagResponse, error)
- func (c *UHostClient) NewCopyCustomImageRequest() *CopyCustomImageRequest
- func (c *UHostClient) NewCreateCustomImageRequest() *CreateCustomImageRequest
- func (c *UHostClient) NewCreateIsolationGroupRequest() *CreateIsolationGroupRequest
- func (c *UHostClient) NewCreateUHostInstanceRequest() *CreateUHostInstanceRequest
- func (c *UHostClient) NewCreateUHostKeyPairRequest() *CreateUHostKeyPairRequest
- func (c *UHostClient) NewDeleteIsolationGroupRequest() *DeleteIsolationGroupRequest
- func (c *UHostClient) NewDeleteUHostKeyPairsRequest() *DeleteUHostKeyPairsRequest
- func (c *UHostClient) NewDescribeAvailableInstanceTypesRequest() *DescribeAvailableInstanceTypesRequest
- func (c *UHostClient) NewDescribeImageRequest() *DescribeImageRequest
- func (c *UHostClient) NewDescribeIsolationGroupRequest() *DescribeIsolationGroupRequest
- func (c *UHostClient) NewDescribeUHostInstanceRequest() *DescribeUHostInstanceRequest
- func (c *UHostClient) NewDescribeUHostKeyPairsRequest() *DescribeUHostKeyPairsRequest
- func (c *UHostClient) NewDescribeUHostTagsRequest() *DescribeUHostTagsRequest
- func (c *UHostClient) NewGetAttachedDiskUpgradePriceRequest() *GetAttachedDiskUpgradePriceRequest
- func (c *UHostClient) NewGetUHostInstancePriceRequest() *GetUHostInstancePriceRequest
- func (c *UHostClient) NewGetUHostInstanceVncInfoRequest() *GetUHostInstanceVncInfoRequest
- func (c *UHostClient) NewGetUHostUpgradePriceRequest() *GetUHostUpgradePriceRequest
- func (c *UHostClient) NewImportCustomImageRequest() *ImportCustomImageRequest
- func (c *UHostClient) NewImportUHostKeyPairsRequest() *ImportUHostKeyPairsRequest
- func (c *UHostClient) NewLeaveIsolationGroupRequest() *LeaveIsolationGroupRequest
- func (c *UHostClient) NewModifyUHostIPRequest() *ModifyUHostIPRequest
- func (c *UHostClient) NewModifyUHostInstanceNameRequest() *ModifyUHostInstanceNameRequest
- func (c *UHostClient) NewModifyUHostInstanceRemarkRequest() *ModifyUHostInstanceRemarkRequest
- func (c *UHostClient) NewModifyUHostInstanceTagRequest() *ModifyUHostInstanceTagRequest
- func (c *UHostClient) NewPoweroffUHostInstanceRequest() *PoweroffUHostInstanceRequest
- func (c *UHostClient) NewRebootUHostInstanceRequest() *RebootUHostInstanceRequest
- func (c *UHostClient) NewReinstallUHostInstanceRequest() *ReinstallUHostInstanceRequest
- func (c *UHostClient) NewResetUHostInstancePasswordRequest() *ResetUHostInstancePasswordRequest
- func (c *UHostClient) NewResizeAttachedDiskRequest() *ResizeAttachedDiskRequest
- func (c *UHostClient) NewResizeUHostInstanceRequest() *ResizeUHostInstanceRequest
- func (c *UHostClient) NewStartUHostInstanceRequest() *StartUHostInstanceRequest
- func (c *UHostClient) NewStopUHostInstanceRequest() *StopUHostInstanceRequest
- func (c *UHostClient) NewTerminateCustomImageRequest() *TerminateCustomImageRequest
- func (c *UHostClient) NewTerminateUHostInstanceRequest() *TerminateUHostInstanceRequest
- func (c *UHostClient) NewUpgradeToArkUHostInstanceRequest() *UpgradeToArkUHostInstanceRequest
- func (c *UHostClient) NewWaitUntilUHostInstanceStateRequest() *WaitUntilUHostInstanceStateRequest
- func (c *UHostClient) PoweroffUHostInstance(req *PoweroffUHostInstanceRequest) (*PoweroffUHostInstanceResponse, error)
- func (c *UHostClient) RebootUHostInstance(req *RebootUHostInstanceRequest) (*RebootUHostInstanceResponse, error)
- func (c *UHostClient) ReinstallUHostInstance(req *ReinstallUHostInstanceRequest) (*ReinstallUHostInstanceResponse, error)
- func (c *UHostClient) ResetUHostInstancePassword(req *ResetUHostInstancePasswordRequest) (*ResetUHostInstancePasswordResponse, error)
- func (c *UHostClient) ResizeAttachedDisk(req *ResizeAttachedDiskRequest) (*ResizeAttachedDiskResponse, error)
- func (c *UHostClient) ResizeUHostInstance(req *ResizeUHostInstanceRequest) (*ResizeUHostInstanceResponse, error)
- func (c *UHostClient) StartUHostInstance(req *StartUHostInstanceRequest) (*StartUHostInstanceResponse, error)
- func (c *UHostClient) StopUHostInstance(req *StopUHostInstanceRequest) (*StopUHostInstanceResponse, error)
- func (c *UHostClient) TerminateCustomImage(req *TerminateCustomImageRequest) (*TerminateCustomImageResponse, error)
- func (c *UHostClient) TerminateUHostInstance(req *TerminateUHostInstanceRequest) (*TerminateUHostInstanceResponse, error)
- func (c *UHostClient) UpgradeToArkUHostInstance(req *UpgradeToArkUHostInstanceRequest) (*UpgradeToArkUHostInstanceResponse, error)
- func (c *UHostClient) WaitUntilUHostInstanceState(req *WaitUntilUHostInstanceStateRequest) error
- type UHostDisk
- type UHostDiskCustomBackup
- type UHostDiskSet
- type UHostIPSet
- type UHostImageSet
- type UHostInstanceSet
- type UHostKeyPair
- type UHostPriceSet
- type UHostTagSet
- type UpgradeToArkUHostInstanceRequest
- type UpgradeToArkUHostInstanceResponse
- type WaitUntilUHostInstanceStateRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AvailableInstanceTypes ¶ added in v0.21.35
type AvailableInstanceTypes struct { // 支持的CPU平台,并且按照Intel、AMD和Ampere分类返回 CpuPlatforms CpuPlatforms // 磁盘信息。磁盘主要分类如下:云盘|cloudDisk、普通本地盘|normalLocalDisk和SSD本地盘|ssdLocalDisk。其中云盘主要包含普通云盘|CLOUD_NORMAL、SSD云盘|CLOUD_SSD和RSSD云盘|CLOUD_RSSD。普通本地盘只包含普通本地盘|LOCAL_NORMAL一种。SSD本地盘只包含SSD本地盘|LOCAL_SSD一种。MinimalSize为磁盘最小值,如果没有该字段,最小值取基础镜像Size值即可(linux为20G,windows为40G)。MaximalSize为磁盘最大值。InstantResize表示系统盘是否允许扩容,如果是本地盘,则不允许扩容,InstantResize为false。Features为磁盘可支持的服务:数据方舟|DATAARK,快照服务|SNAPSHOT,加密盘|Encrypted。 Disks []Disks // 虚机可支持的特性。目前支持的特性网络增强|NetCapability、热升级|Hotplug。网络增强分为关闭|Normal、网络增强1.0|Super和网络增强2.0|Ultra。Name为可支持的特性名称,Modes为可以提供的模式类别等,RelatedToImageFeature为镜像上支持这个特性的标签。例如DescribeImage返回的字段Features包含HotPlug,说明该镜像支持热升级。MinimalCpuPlatform表示这个特性必须是列出来的CPU平台及以上的CPU才支持。 Features []Features // GPU的显存指标,value为值,单位是GB。 GraphicsMemory GraphicsMemory // 区分是否是GPU机型:GPU机型|GPU,非GPU机型|Normal。 MachineClass string // GPU、CPU和内存信息。Gpu为GPU可支持的规格,Cpu和Memory分别为CPU和内存可支持的规格。如果非GPU机型,GPU为0。MinimalCpuPlatform代表含义这个CPU和内存规格只能在列出来的CPU平台支持。 MachineSizes []MachineSizes // 机型名称:快杰O型|O 、快杰共享型|OM 、快杰内存型|OMEM 、 快杰PRO型|OPRO、通用N型|N、高主频C型|C和GPU G型|G等 Name string // GPU的性能指标,value为值,单位是TFlops。 Performance Performance // 机型状态:可售|Normal 、 公测|Beta、售罄|Soldout、隐藏|Hidden Status string }
AvailableInstanceTypes - https://ushare.ucloudadmin.com/pages/viewpage.action?pageId=104662646
type BootDiskInfo ¶ added in v0.21.38
type BootDiskInfo struct { // 磁盘可支持的服务 Features []string // 系统盘是否允许扩容,如果是本地盘,则不允许扩容,InstantResize为false。 InstantResize bool // MaximalSize为磁盘最大值 MaximalSize int // 系统盘类别,包含普通云盘|CLOUD_NORMAL、SSD云盘|CLOUD_SSD和RSSD云盘|CLOUD_RSSD。普通本地盘只包含普通本地盘|LOCAL_NORMAL一种。SSD本地盘只包含SSD本地盘|LOCAL_SSD一种。 Name string }
BootDiskInfo - 系统盘信息
type Collection ¶ added in v0.21.38
type Collection struct { // CPU规格 Cpu int // 内存规格 Memory []int // CPU和内存规格只能在列出来的CPU平台支持 MinimalCpuPlatform []string }
Collection - CPU和内存可支持的规格
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 CpuPlatforms ¶ added in v0.21.38
type CpuPlatforms struct { // 返回AMD的CPU平台信息,例如:AMD: ['Amd/Epyc2'] Amd []string // 返回Arm的CPU平台信息,例如:Ampere: ['Ampere/Altra'] Ampere []string // 返回Intel的CPU平台信息,例如:Intel: ['Intel/CascadeLake','Intel/CascadelakeR','Intel/IceLake'] Intel []string }
CpuPlatforms - CPU平台信息
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 CreateUHostInstanceParamFeatures ¶ added in v0.21.35
type CreateUHostInstanceParamFeatures struct { // 弹性网卡特性。开启了弹性网卡权限位,此特性才生效,默认 false 未开启,true 开启,仅与 NetCapability Normal 兼容。 UNI *bool `required:"false"` }
CreateUHostInstanceParamFeatures is request schema for complex param
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" deprecated:"true"` // 【若绑定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"` 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 CreateUHostInstanceParamSecGroupId ¶ added in v0.21.38
type CreateUHostInstanceParamSecGroupId struct { }
CreateUHostInstanceParamSecGroupId 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"` // Features *CreateUHostInstanceParamFeatures `required:"false"` // GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关) GPU *int `required:"false"` // GPU类型,枚举值["K80", "P40", "V100", "T4", "T4S","2080Ti","2080Ti-4C","1080Ti", "T4/4", "MI100", "V100S"],MachineType为G时必填 GpuType *string `required:"false"` // 【该字段已废弃,请谨慎使用】 HostType *string `required:"false" deprecated:"true"` // 热升级特性。True为开启,False为未开启,默认False。 HotplugFeature *bool `required:"false"` // 【该字段已废弃,请谨慎使用】 HpcEnhanced *bool `required:"false" deprecated:"true"` // 镜像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"` // KeypairId 密钥对ID,LoginMode为KeyPair时此项必须。 KeyPairId *string `required:"false"` // 主机登陆模式。密码(默认选项): Password,密钥:KeyPair。 LoginMode *string `required:"true"` // 云主机机型(V2.0),在本字段和字段UHostType中,仅需要其中1个字段即可。枚举值["N", "C", "G", "O", "OS", "OM", "OPRO", "OMAX", "O.BM", "O.EPC"]。参考[[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", "Intel/IceLake", "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:"false"` // 【数组】创建云主机时指定内网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"` // 【该字段已废弃,请谨慎使用】 RestrictMode *string `required:"false" deprecated:"true"` // 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/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 CreateUHostKeyPairRequest ¶ added in v0.21.10
type CreateUHostKeyPairRequest struct { request.CommonBase // 密钥对名称。 由字母,数字,符号组成,长度为1-63位。 KeyPairName *string `required:"true"` }
CreateUHostKeyPairRequest is request schema for CreateUHostKeyPair action
type CreateUHostKeyPairResponse ¶ added in v0.21.10
type CreateUHostKeyPairResponse struct { response.CommonBase // 密钥信息 KeyPair KeyPair }
CreateUHostKeyPairResponse is response schema for CreateUHostKeyPair action
type DataDiskInfo ¶ added in v0.21.38
type DataDiskInfo struct { // 数据盘可支持的服务 Features []string // MaximalSize为磁盘最大值 MaximalSize int // 磁盘最小值,如果没有该字段,最小值取基础镜像Size值即可(linux为20G,windows为40G)。 MinimalSize int // 数据盘类别,包含普通云盘|CLOUD_NORMAL、SSD云盘|CLOUD_SSD和RSSD云盘|CLOUD_RSSD。普通本地盘只包含普通本地盘|LOCAL_NORMAL一种。SSD本地盘只包含SSD本地盘|LOCAL_SSD一种。 Name string }
DataDiskInfo - 数据盘信息
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 DeleteUHostKeyPairsRequest ¶ added in v0.21.10
type DeleteUHostKeyPairsRequest struct { request.CommonBase // 密钥对ID,最多支持 100 对。 KeyPairIds []string `required:"true"` }
DeleteUHostKeyPairsRequest is request schema for DeleteUHostKeyPairs action
type DeleteUHostKeyPairsResponse ¶ added in v0.21.10
type DeleteUHostKeyPairsResponse struct {
response.CommonBase
}
DeleteUHostKeyPairsResponse is response schema for DeleteUHostKeyPairs action
type DescribeAvailableInstanceTypesRequest ¶ added in v0.21.35
type DescribeAvailableInstanceTypesRequest struct {
request.CommonBase
}
DescribeAvailableInstanceTypesRequest is request schema for DescribeAvailableInstanceTypes action
type DescribeAvailableInstanceTypesResponse ¶ added in v0.21.35
type DescribeAvailableInstanceTypesResponse struct { response.CommonBase // AvailableInstanceTypes AvailableInstanceTypes []AvailableInstanceTypes }
DescribeAvailableInstanceTypesResponse is response schema for DescribeAvailableInstanceTypes 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 DescribeUHostKeyPairsRequest ¶ added in v0.21.10
type DescribeUHostKeyPairsRequest struct { request.CommonBase // 密钥对的指纹。 KeyPairFingerPrint *string `required:"false"` // 密钥对名称。 KeyPairName *string `required:"false"` // 返回数据长度,默认为20,最大100 Limit *int `required:"false"` // 列表起始位置偏移量,默认为0 Offset *int `required:"false"` }
DescribeUHostKeyPairsRequest is request schema for DescribeUHostKeyPairs action
type DescribeUHostKeyPairsResponse ¶ added in v0.21.10
type DescribeUHostKeyPairsResponse struct { response.CommonBase // 密钥对信息集合 KeyPairs []KeyPairDesc // 密钥对总数 TotalCount int }
DescribeUHostKeyPairsResponse is response schema for DescribeUHostKeyPairs 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 Disks ¶ added in v0.21.38
type Disks struct { // 系统盘信息 BootDisk []BootDiskInfo // 数据盘信息 DataDisk []DataDiskInfo // 磁盘介质类别信息,磁盘主要分类如下:云盘|cloudDisk、普通本地盘|normalLocalDisk和SSD本地盘|ssdLocalDisk。 Name string }
Disks - 磁盘信息
type FeatureModes ¶ added in v0.21.38
type FeatureModes struct { // 这个特性必须是列出来的CPU平台及以上的CPU才支持 MinimalCpuPlatform []string // 模式|特性名称 Name string // 为镜像上支持这个特性的标签。例如DescribeImage返回的字段Features包含HotPlug,说明该镜像支持热升级。 RelatedToImageFeature []string }
FeatureModes - 可以支持的模式类别
type Features ¶ added in v0.21.38
type Features struct { // 可以提供的模式类别 Modes []FeatureModes // 可支持的特性名称。目前支持的特性网络增强|NetCapability、热升级|Hotplug Name string }
Features - 虚机可支持的特性
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 GetUHostInstancePriceParamVirtualGpu ¶ added in v0.21.10
type GetUHostInstancePriceParamVirtualGpu struct { }
GetUHostInstancePriceParamVirtualGpu is request schema for complex param
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","T4S","2080Ti","2080Ti-4C","1080Ti"] 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 GraphicsMemory ¶ added in v0.21.38
GraphicsMemory - GPU的显存指标
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 ImportUHostKeyPairsRequest ¶ added in v0.21.10
type ImportUHostKeyPairsRequest struct { request.CommonBase // 密钥对名称。由字母,数字,符号组成,长度为1-63位。 KeyPairName *string `required:"true"` // 密钥对的公钥内容。 PublicKeyBody *string `required:"true"` }
ImportUHostKeyPairsRequest is request schema for ImportUHostKeyPairs action
type ImportUHostKeyPairsResponse ¶ added in v0.21.10
type ImportUHostKeyPairsResponse struct { response.CommonBase // 密钥对指纹。根据RFC4716定义的公钥指纹格式,采用MD5信息摘要算法。算法处理的具体信息格式:`ProjectIdKeyPairId|PublicKeyBody`。 KeyPairFingerPrint string // 密钥对标识 KeyPairId string // 密钥对名称 KeyPairName string }
ImportUHostKeyPairsResponse is response schema for ImportUHostKeyPairs action
type IsolationGroup ¶ added in v0.8.8
type IsolationGroup struct { // 硬件隔离组id GroupId string // 硬件隔离组名称 GroupName string // 备注 Remark string // 每个可用区中的机器数量。参见数据结构SpreadInfo。 SpreadInfoSet []SpreadInfo }
IsolationGroup - 硬件隔离组信息
type KeyPair ¶ added in v0.21.10
type KeyPair struct { // 密钥对的创建时间,格式为Unix Timestamp。 CreateTime int // 密钥对指纹。md5(ProjectId|KeyPairId|PublicKey) KeyPairFingerPrint string // 密钥对ID。 KeyPairId string // 密钥对名称。 长度为1~63个英文或中文字符。 KeyPairName string // 密钥对的私钥内容。只有创建接口才会返回。 PrivateKeyBody string // 项目ID。 ProjectId string }
KeyPair - 密钥对信息
type KeyPairDesc ¶ added in v0.21.10
type KeyPairDesc struct { // 密钥对的创建时间,格式为Unix Timestamp。 CreateTime int // 密钥对指纹。md5(ProjectId|KeyPairId|PublicKey) KeyPairFingerPrint string // 密钥对ID。 KeyPairId string // 密钥对名称。 长度为1~63个英文或中文字符。 KeyPairName string // 项目ID。 ProjectId string }
KeyPairDesc - 密钥对信息,不包含私钥内容。
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 MachineSizes ¶ added in v0.21.38
type MachineSizes struct { // CPU和内存可支持的规格 Collection []Collection // Gpu为GPU可支持的规格即GPU颗数,非GPU机型,Gpu为0 Gpu int }
MachineSizes - GPU、CPU和内存信息
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 Performance ¶ added in v0.21.38
Performance - GPU的性能指标
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"` // KeypairId 密钥对ID,LoginMode为KeyPair时此项必须。 KeyPairId *string `required:"false"` // 主机登陆模式。密码(默认选项): Password,密钥 KeyPair。 LoginMode *string `required:"false"` // 如果重装UHost实例时LoginMode为Password,则必须填写,如果LoginMode为KeyPair,不需要填写 (密码格式使用BASE64编码;举例如下:# echo -n Password1 | base64UGFzc3dvcmQx。) 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
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 ¶
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 ¶
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 ¶
func (c *UHostClient) CreateCustomImage(req *CreateCustomImageRequest) (*CreateCustomImageResponse, error)
API: CreateCustomImage
从指定UHost实例,生成自定义镜像。
func (*UHostClient) CreateIsolationGroup ¶ added in v0.8.8
func (c *UHostClient) CreateIsolationGroup(req *CreateIsolationGroupRequest) (*CreateIsolationGroupResponse, error)
API: CreateIsolationGroup
创建硬件隔离组,组内机器严格隔离在不同宿主机上。
func (*UHostClient) CreateUHostInstance ¶
func (c *UHostClient) CreateUHostInstance(req *CreateUHostInstanceRequest) (*CreateUHostInstanceResponse, error)
API: CreateUHostInstance
创建UHost实例。
func (*UHostClient) CreateUHostKeyPair ¶ added in v0.21.10
func (c *UHostClient) CreateUHostKeyPair(req *CreateUHostKeyPairRequest) (*CreateUHostKeyPairResponse, error)
API: CreateUHostKeyPair
创建主机密钥对信息
func (*UHostClient) DeleteIsolationGroup ¶ added in v0.8.8
func (c *UHostClient) DeleteIsolationGroup(req *DeleteIsolationGroupRequest) (*DeleteIsolationGroupResponse, error)
API: DeleteIsolationGroup
删除硬件隔离组。
func (*UHostClient) DeleteUHostKeyPairs ¶ added in v0.21.10
func (c *UHostClient) DeleteUHostKeyPairs(req *DeleteUHostKeyPairsRequest) (*DeleteUHostKeyPairsResponse, error)
API: DeleteUHostKeyPairs
删除一对或者多对密钥对。
func (*UHostClient) DescribeAvailableInstanceTypes ¶ added in v0.21.35
func (c *UHostClient) DescribeAvailableInstanceTypes(req *DescribeAvailableInstanceTypesRequest) (*DescribeAvailableInstanceTypesResponse, error)
API: DescribeAvailableInstanceTypes
DescribeAvailableInstanceTypes
func (*UHostClient) DescribeImage ¶
func (c *UHostClient) DescribeImage(req *DescribeImageRequest) (*DescribeImageResponse, error)
API: DescribeImage
获取指定数据中心镜像列表,用户可通过指定操作系统类型,镜像Id进行过滤。
func (*UHostClient) DescribeIsolationGroup ¶ added in v0.8.8
func (c *UHostClient) DescribeIsolationGroup(req *DescribeIsolationGroupRequest) (*DescribeIsolationGroupResponse, error)
API: DescribeIsolationGroup
查询硬件隔离组列表。
func (*UHostClient) DescribeUHostInstance ¶
func (c *UHostClient) DescribeUHostInstance(req *DescribeUHostInstanceRequest) (*DescribeUHostInstanceResponse, error)
API: DescribeUHostInstance
获取主机或主机列表信息,并可根据数据中心,主机ID等参数进行过滤。
func (*UHostClient) DescribeUHostKeyPairs ¶ added in v0.21.10
func (c *UHostClient) DescribeUHostKeyPairs(req *DescribeUHostKeyPairsRequest) (*DescribeUHostKeyPairsResponse, error)
API: DescribeUHostKeyPairs
查询一个或多个密钥对。
func (*UHostClient) DescribeUHostTags ¶
func (c *UHostClient) DescribeUHostTags(req *DescribeUHostTagsRequest) (*DescribeUHostTagsResponse, error)
API: DescribeUHostTags
获取指定数据中心的业务组列表。
func (*UHostClient) GetAttachedDiskUpgradePrice ¶ added in v0.14.0
func (c *UHostClient) GetAttachedDiskUpgradePrice(req *GetAttachedDiskUpgradePriceRequest) (*GetAttachedDiskUpgradePriceResponse, error)
API: GetAttachedDiskUpgradePrice
获取挂载磁盘的升级价格
func (*UHostClient) GetUHostInstancePrice ¶
func (c *UHostClient) GetUHostInstancePrice(req *GetUHostInstancePriceRequest) (*GetUHostInstancePriceResponse, error)
API: GetUHostInstancePrice
根据UHost实例配置,获取UHost实例的价格。
func (*UHostClient) GetUHostInstanceVncInfo ¶
func (c *UHostClient) GetUHostInstanceVncInfo(req *GetUHostInstanceVncInfoRequest) (*GetUHostInstanceVncInfoResponse, error)
API: GetUHostInstanceVncInfo
获取指定UHost实例的管理VNC配置详细信息。
func (*UHostClient) GetUHostUpgradePrice ¶
func (c *UHostClient) GetUHostUpgradePrice(req *GetUHostUpgradePriceRequest) (*GetUHostUpgradePriceResponse, error)
API: GetUHostUpgradePrice
获取UHost实例升级配置的价格。可选配置范围请参考[[api:uhost-api:uhost_type|云主机机型说明]]。
func (*UHostClient) ImportCustomImage ¶ added in v0.6.3
func (c *UHostClient) ImportCustomImage(req *ImportCustomImageRequest) (*ImportCustomImageResponse, error)
API: ImportCustomImage
把UFile的镜像文件导入到UHost,生成自定义镜像
func (*UHostClient) ImportUHostKeyPairs ¶ added in v0.21.10
func (c *UHostClient) ImportUHostKeyPairs(req *ImportUHostKeyPairsRequest) (*ImportUHostKeyPairsResponse, error)
API: ImportUHostKeyPairs
导入密钥对后,仅保管公钥部分,需自行妥善保存密钥对的私钥部分。
func (*UHostClient) LeaveIsolationGroup ¶ added in v0.8.8
func (c *UHostClient) LeaveIsolationGroup(req *LeaveIsolationGroupRequest) (*LeaveIsolationGroupResponse, error)
API: LeaveIsolationGroup
移除硬件隔离组中的主机
func (*UHostClient) ModifyUHostIP ¶ added in v0.16.2
func (c *UHostClient) ModifyUHostIP(req *ModifyUHostIPRequest) (*ModifyUHostIPResponse, error)
API: ModifyUHostIP
修改云主机内网 IP 地址
func (*UHostClient) ModifyUHostInstanceName ¶
func (c *UHostClient) ModifyUHostInstanceName(req *ModifyUHostInstanceNameRequest) (*ModifyUHostInstanceNameResponse, error)
API: ModifyUHostInstanceName
修改指定UHost实例名称,需要给出数据中心,UHostId,及新的实例名称。
func (*UHostClient) ModifyUHostInstanceRemark ¶
func (c *UHostClient) ModifyUHostInstanceRemark(req *ModifyUHostInstanceRemarkRequest) (*ModifyUHostInstanceRemarkResponse, error)
API: ModifyUHostInstanceRemark
修改指定UHost实例备注信息。
func (*UHostClient) ModifyUHostInstanceTag ¶
func (c *UHostClient) ModifyUHostInstanceTag(req *ModifyUHostInstanceTagRequest) (*ModifyUHostInstanceTagResponse, error)
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) NewCreateUHostKeyPairRequest ¶ added in v0.21.10
func (c *UHostClient) NewCreateUHostKeyPairRequest() *CreateUHostKeyPairRequest
NewCreateUHostKeyPairRequest will create request of CreateUHostKeyPair action.
func (*UHostClient) NewDeleteIsolationGroupRequest ¶ added in v0.8.8
func (c *UHostClient) NewDeleteIsolationGroupRequest() *DeleteIsolationGroupRequest
NewDeleteIsolationGroupRequest will create request of DeleteIsolationGroup action.
func (*UHostClient) NewDeleteUHostKeyPairsRequest ¶ added in v0.21.10
func (c *UHostClient) NewDeleteUHostKeyPairsRequest() *DeleteUHostKeyPairsRequest
NewDeleteUHostKeyPairsRequest will create request of DeleteUHostKeyPairs action.
func (*UHostClient) NewDescribeAvailableInstanceTypesRequest ¶ added in v0.21.35
func (c *UHostClient) NewDescribeAvailableInstanceTypesRequest() *DescribeAvailableInstanceTypesRequest
NewDescribeAvailableInstanceTypesRequest will create request of DescribeAvailableInstanceTypes 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) NewDescribeUHostKeyPairsRequest ¶ added in v0.21.10
func (c *UHostClient) NewDescribeUHostKeyPairsRequest() *DescribeUHostKeyPairsRequest
NewDescribeUHostKeyPairsRequest will create request of DescribeUHostKeyPairs 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) NewImportUHostKeyPairsRequest ¶ added in v0.21.10
func (c *UHostClient) NewImportUHostKeyPairsRequest() *ImportUHostKeyPairsRequest
NewImportUHostKeyPairsRequest will create request of ImportUHostKeyPairs 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 ¶
func (c *UHostClient) PoweroffUHostInstance(req *PoweroffUHostInstanceRequest) (*PoweroffUHostInstanceResponse, error)
API: PoweroffUHostInstance
直接关闭UHost实例电源,无需等待实例正常关闭。
func (*UHostClient) RebootUHostInstance ¶
func (c *UHostClient) RebootUHostInstance(req *RebootUHostInstanceRequest) (*RebootUHostInstanceResponse, error)
API: RebootUHostInstance
重新启动UHost实例,需要指定数据中心及UHostID两个参数的值。
func (*UHostClient) ReinstallUHostInstance ¶
func (c *UHostClient) ReinstallUHostInstance(req *ReinstallUHostInstanceRequest) (*ReinstallUHostInstanceResponse, error)
API: ReinstallUHostInstance
重新安装指定UHost实例的操作系统
func (*UHostClient) ResetUHostInstancePassword ¶
func (c *UHostClient) ResetUHostInstancePassword(req *ResetUHostInstancePasswordRequest) (*ResetUHostInstancePasswordResponse, error)
API: ResetUHostInstancePassword
重置UHost实例的管理员密码。
func (*UHostClient) ResizeAttachedDisk ¶ added in v0.7.2
func (c *UHostClient) ResizeAttachedDisk(req *ResizeAttachedDiskRequest) (*ResizeAttachedDiskResponse, error)
API: ResizeAttachedDisk
修改挂载的磁盘大小,包含系统盘和数据盘
func (*UHostClient) ResizeUHostInstance ¶
func (c *UHostClient) ResizeUHostInstance(req *ResizeUHostInstanceRequest) (*ResizeUHostInstanceResponse, error)
API: ResizeUHostInstance
修改指定UHost实例的资源配置,如CPU核心数,内存容量大小,网络增强等。可选配置范围请参考[[api:uhost-api:uhost_type|云主机机型说明]]。
func (*UHostClient) StartUHostInstance ¶
func (c *UHostClient) StartUHostInstance(req *StartUHostInstanceRequest) (*StartUHostInstanceResponse, error)
API: StartUHostInstance
启动处于关闭状态的UHost实例,需要指定数据中心及UHostID两个参数的值。
func (*UHostClient) StopUHostInstance ¶
func (c *UHostClient) StopUHostInstance(req *StopUHostInstanceRequest) (*StopUHostInstanceResponse, error)
API: StopUHostInstance
指停止处于运行状态的UHost实例,需指定数据中心及UhostID。
func (*UHostClient) TerminateCustomImage ¶
func (c *UHostClient) TerminateCustomImage(req *TerminateCustomImageRequest) (*TerminateCustomImageResponse, error)
API: TerminateCustomImage
删除用户自定义镜像
func (*UHostClient) TerminateUHostInstance ¶
func (c *UHostClient) TerminateUHostInstance(req *TerminateUHostInstanceRequest) (*TerminateUHostInstanceResponse, error)
API: TerminateUHostInstance
删除指定数据中心的UHost实例。
func (*UHostClient) UpgradeToArkUHostInstance ¶
func (c *UHostClient) UpgradeToArkUHostInstance(req *UpgradeToArkUHostInstanceRequest) (*UpgradeToArkUHostInstanceResponse, error)
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,快照 \\当前磁盘支持的备份模式参考 [[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。请参考[[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 UHostDiskCustomBackup ¶ added in v0.21.38
type UHostDiskCustomBackup struct { }
UHostDiskCustomBackup 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 ¶
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