Documentation
¶
Overview ¶
Package uphost include resources of ucloud host product
See also
- API: https://docs.ucloud.cn/api/uphost-api/index
- Product: https://www.ucloud.cn/site/product/uphost.html
for detail.
Index ¶
- type CreatePHostRequest
- type CreatePHostResponse
- type DescribePHostImageRequest
- type DescribePHostImageResponse
- type DescribePHostRequest
- type DescribePHostResponse
- type DescribePHostTagsRequest
- type DescribePHostTagsResponse
- type GetPHostPriceRequest
- type GetPHostPriceResponse
- type ModifyPHostInfoRequest
- type ModifyPHostInfoResponse
- type PHostCPUSet
- type PHostDiskSet
- type PHostIPSet
- type PHostImageSet
- type PHostPriceSet
- type PHostSet
- type PHostTagSet
- type PoweroffPHostRequest
- type PoweroffPHostResponse
- type RebootPHostRequest
- type RebootPHostResponse
- type ReinstallPHostRequest
- type ReinstallPHostResponse
- type StartPHostRequest
- type StartPHostResponse
- type TerminatePHostRequest
- type TerminatePHostResponse
- type UPHostClient
- func (c *UPHostClient) CreatePHost(req *CreatePHostRequest) (*CreatePHostResponse, error)
- func (c *UPHostClient) DescribePHost(req *DescribePHostRequest) (*DescribePHostResponse, error)
- func (c *UPHostClient) DescribePHostImage(req *DescribePHostImageRequest) (*DescribePHostImageResponse, error)
- func (c *UPHostClient) DescribePHostTags(req *DescribePHostTagsRequest) (*DescribePHostTagsResponse, error)
- func (c *UPHostClient) GetPHostPrice(req *GetPHostPriceRequest) (*GetPHostPriceResponse, error)
- func (c *UPHostClient) ModifyPHostInfo(req *ModifyPHostInfoRequest) (*ModifyPHostInfoResponse, error)
- func (c *UPHostClient) NewCreatePHostRequest() *CreatePHostRequest
- func (c *UPHostClient) NewDescribePHostImageRequest() *DescribePHostImageRequest
- func (c *UPHostClient) NewDescribePHostRequest() *DescribePHostRequest
- func (c *UPHostClient) NewDescribePHostTagsRequest() *DescribePHostTagsRequest
- func (c *UPHostClient) NewGetPHostPriceRequest() *GetPHostPriceRequest
- func (c *UPHostClient) NewModifyPHostInfoRequest() *ModifyPHostInfoRequest
- func (c *UPHostClient) NewPoweroffPHostRequest() *PoweroffPHostRequest
- func (c *UPHostClient) NewRebootPHostRequest() *RebootPHostRequest
- func (c *UPHostClient) NewReinstallPHostRequest() *ReinstallPHostRequest
- func (c *UPHostClient) NewStartPHostRequest() *StartPHostRequest
- func (c *UPHostClient) NewTerminatePHostRequest() *TerminatePHostRequest
- func (c *UPHostClient) PoweroffPHost(req *PoweroffPHostRequest) (*PoweroffPHostResponse, error)
- func (c *UPHostClient) RebootPHost(req *RebootPHostRequest) (*RebootPHostResponse, error)
- func (c *UPHostClient) ReinstallPHost(req *ReinstallPHostRequest) (*ReinstallPHostResponse, error)
- func (c *UPHostClient) StartPHost(req *StartPHostRequest) (*StartPHostResponse, error)
- func (c *UPHostClient) TerminatePHost(req *TerminatePHostRequest) (*TerminatePHostResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreatePHostRequest ¶
type CreatePHostRequest struct {
request.CommonBase
// 镜像ID。 请通过 [DescribePHostImage]获取
ImageId *string `required:"true"`
// 密码(密码需使用base64进行编码)
Password *string `required:"true"`
// 物理机类型,默认为:db-2(基础型-SAS-V3)
Type *string `required:"false"`
// 物理机名称,默认为phost
Name *string `required:"false"`
// 物理机备注,默认为空
Remark *string `required:"false"`
// 业务组,默认为default
Tag *string `required:"false"`
// 计费模式,枚举值为:year, 按年付费; month,按月付费;dynamic,按需付费,(需开启权限) trial, 试用(需开启权限)。默认为按月付费
ChargeType *string `required:"false"`
// 购买时长,默认为1,范围[1-10]
Quantity *string `required:"false"`
// 购买数量,默认为1,(暂不支持)
Count *int `required:"false"`
// 防火墙Id,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeSecurityGroup](../unet-api/describe_security_group.html)
SecurityGroupId *string `required:"false"`
// Raid配置,默认Raid10 支持:Raid0、Raid1、Raid5、Raid10,NoRaid
Raid *string `required:"false"`
// 网络环境,可选千兆:1G ,万兆:10G, 默认1G
Cluster *string `required:"false"`
// VPC ID,不填为默认,VPC2.0下需要填写此字段。
VPCId *string `required:"false"`
// 子网ID,不填为默认,VPC2.0下需要填写此字段。
SubnetId *string `required:"false"`
// 代金券
CouponId *string `required:"false"`
}
CreatePHostRequest is request schema for CreatePHost action
type CreatePHostResponse ¶
type CreatePHostResponse struct {
response.CommonBase
// PHost的资源ID数组
PHostId []string
}
CreatePHostResponse is response schema for CreatePHost action
type DescribePHostImageRequest ¶
type DescribePHostImageRequest struct {
request.CommonBase
// 镜像类别,枚举为:Base,标准镜像;默认为标准镜像。
ImageType *string `required:"false"`
// 镜像ID
ImageId []string `required:"false"`
// 数据偏移量,默认为0
Offset *int `required:"false"`
// 返回数据长度,默认为20
Limit *int `required:"false"`
}
DescribePHostImageRequest is request schema for DescribePHostImage action
type DescribePHostImageResponse ¶
type DescribePHostImageResponse struct {
response.CommonBase
// 满足条件的镜像总数
TotalCount int
// 镜像列表 PHostImageSet
ImageSet []PHostImageSet
}
DescribePHostImageResponse is response schema for DescribePHostImage action
type DescribePHostRequest ¶
type DescribePHostRequest struct {
request.CommonBase
// PHost资源ID,若为空,则返回当前Region所有PHost。
PHostId []string `required:"false"`
// 数据偏移量,默认为0
Offset *int `required:"false"`
// 返回数据长度,默认为20
Limit *int `required:"false"`
}
DescribePHostRequest is request schema for DescribePHost action
type DescribePHostResponse ¶
type DescribePHostResponse struct {
response.CommonBase
// 满足条件的PHost总数
TotalCount int
// PHost资源列表,参见 PHostSet
PHostSet []PHostSet
}
DescribePHostResponse is response schema for DescribePHost action
type DescribePHostTagsRequest ¶
type DescribePHostTagsRequest struct {
request.CommonBase
}
DescribePHostTagsRequest is request schema for DescribePHostTags action
type DescribePHostTagsResponse ¶
type DescribePHostTagsResponse struct {
response.CommonBase
// Tag的个数
TotalCount int
// 具体参见 PHostTagSet
TagSet []PHostTagSet
}
DescribePHostTagsResponse is response schema for DescribePHostTags action
type GetPHostPriceRequest ¶
type GetPHostPriceRequest struct {
request.CommonBase
// 购买数量,范围[1-5]
Count *int `required:"true"`
// 计费模式,枚举值为: Year/Month/Trial/Dynamic
ChargeType *string `required:"true"`
// 购买时长,1-10个月或1-10年
Quantity *int `required:"true"`
// 默认为:DB(数据库型)
Type *string `required:"false"`
// 网络环境,可选千兆:1G ,万兆:10G
Cluster *string `required:"false"`
}
GetPHostPriceRequest is request schema for GetPHostPrice action
type GetPHostPriceResponse ¶
type GetPHostPriceResponse struct {
response.CommonBase
// 价格列表 见 PHostPriceSet
PriceSet []PHostPriceSet
}
GetPHostPriceResponse is response schema for GetPHostPrice action
type ModifyPHostInfoRequest ¶
type ModifyPHostInfoRequest struct {
request.CommonBase
// 物理机资源ID
PHostId *string `required:"true"`
// 物理机名称,默认不更改
Name *string `required:"false"`
// 物理机备注,默认不更改
Remark *string `required:"false"`
// 业务组,默认不更改
Tag *string `required:"false"`
}
ModifyPHostInfoRequest is request schema for ModifyPHostInfo action
type ModifyPHostInfoResponse ¶
type ModifyPHostInfoResponse struct {
response.CommonBase
// PHost 的资源ID
PHostId string
}
ModifyPHostInfoResponse is response schema for ModifyPHostInfo action
type PHostCPUSet ¶
type PHostCPUSet struct {
// CPU型号
Model string
// CPU主频
Frequence float64
// CPU个数
Count int
// CPU核数
CoreCount int
}
PHostCPUSet - DescribePHost
this model is auto created by ucloud code generater for open api, you can also see https://docs.ucloud.cn for detail.
type PHostDiskSet ¶
type PHostDiskSet struct {
// 单盘大小,单位GB
Space int
// 磁盘数量
Count int
// 磁盘属性
Type string
// 磁盘名称,sys/data
Name string
// 磁盘IO性能,单位MB/s(待废弃)
IOCap int
}
PHostDiskSet - GetPHostTypeInfo
this model is auto created by ucloud code generater for open api, you can also see https://docs.ucloud.cn for detail.
type PHostIPSet ¶
type PHostIPSet struct {
// 国际: Internation, BGP: BGP, 内网: Private
OperatorName string
// IP资源ID(内网IP无资源ID)(待废弃)
IPId string
// IP地址,
IPAddr string
// MAC地址
MACAddr string
// IP对应带宽,单位Mb,内网IP不显示带宽信息
Bandwidth int
// 子网ID
SubnetId string
// VPC ID
VPCId string
}
PHostIPSet - DescribePHost
this model is auto created by ucloud code generater for open api, you can also see https://docs.ucloud.cn for detail.
type PHostImageSet ¶
type PHostImageSet struct {
// 镜像ID
ImageId string
// 镜像名称
ImageName string
// 操作系统名称
OsName string
// 操作系统类型
OsType string
}
PHostImageSet - DescribePHostImage
this model is auto created by ucloud code generater for open api, you can also see https://docs.ucloud.cn for detail.
type PHostPriceSet ¶
type PHostPriceSet struct {
// Year/Month/Trial/Dynamic
ChargeType string
// 价格, 单位:元, 保留小数点后两位有效数字
Price float64
}
PHostPriceSet - GetPHostPrice
this model is auto created by ucloud code generater for open api, you can also see https://docs.ucloud.cn for detail.
type PHostSet ¶
type PHostSet struct {
// 可用区,参见 [可用区列表](../summary/regionlist.html)
Zone string
// PHost资源ID
PHostId string
// 物理机序列号
SN string
// 物理云主机状态。枚举值:\\ > 初始化:Initializing; \\ > 启动中:Starting; \\ > 运行中:Running;\\ > 关机中:Stopping; \\ > 安装失败:InstallFailed; \\ > 重启中:Rebooting;\\ > 关机:Stopped;
PMStatus string
// 物理机名称
Name string
// 物理机备注
Remark string
// 业务组
Tag string
// 镜像名称
ImageName string
// 操作系统名称
OSname string
// 创建时间
CreateTime int
// 到期时间
ExpireTime int
// 计费模式,枚举值为: Year,按年付费; Month,按月付费; Dynamic,按需付费(需开启权限); Trial,试用(需开启权限)默认为月付
ChargeType string
// 电源状态,on 或 off
PowerState string
// 物理机类型,参见DescribePHostMachineType返回值
PHostType string
// 内存大小,单位:MB
Memory int
// CPU信息,见 PHostCPUSet
CPUSet PHostCPUSet
// 磁盘信息,见 PHostDiskSet
DiskSet []PHostDiskSet
// IP信息,见 PHostIPSet
IPSet []PHostIPSet
// 网络环境。枚举值:千兆:1G ,万兆:10G
Cluster string
// 自动续费
AutoRenew string
// 是否支持紧急登录
IsSupportKVM string
// 操作系统类型
OSType string
// 组件信息(暂不支持)
Components string
// 是否支持Raid。枚举值:Yes:支持;No:不支持。
RaidSupported string
}
PHostSet - DescribePHost
this model is auto created by ucloud code generater for open api, you can also see https://docs.ucloud.cn for detail.
type PHostTagSet ¶
PHostTagSet - DescribePHostTags
this model is auto created by ucloud code generater for open api, you can also see https://docs.ucloud.cn for detail.
type PoweroffPHostRequest ¶
type PoweroffPHostRequest struct {
request.CommonBase
// PHost资源ID
PHostId *string `required:"true"`
}
PoweroffPHostRequest is request schema for PoweroffPHost action
type PoweroffPHostResponse ¶
type PoweroffPHostResponse struct {
response.CommonBase
// PHost 的资源ID
PHostId string
}
PoweroffPHostResponse is response schema for PoweroffPHost action
type RebootPHostRequest ¶
type RebootPHostRequest struct {
request.CommonBase
// PHost资源ID
PHostId *string `required:"true"`
}
RebootPHostRequest is request schema for RebootPHost action
type RebootPHostResponse ¶
type RebootPHostResponse struct {
response.CommonBase
// PHost 的资源ID
PHostId string
}
RebootPHostResponse is response schema for RebootPHost action
type ReinstallPHostRequest ¶
type ReinstallPHostRequest struct {
request.CommonBase
// PHost资源ID
PHostId *string `required:"true"`
// 密码
Password *string `required:"true"`
// 镜像Id,参考镜像列表,默认使用原镜像
ImageId *string `required:"false"`
// 物理机名称,默认不更改
Name *string `required:"false"`
// 物理机备注,默认为不更改。
Remark *string `required:"false"`
// 业务组,默认不更改。
Tag *string `required:"false"`
// 是否保留数据盘,保留:Yes,不报留:No, 默认:Yes
ReserveDisk *string `required:"false"`
// 不保留数据盘重装,可选Raid
Raid *string `required:"false"`
}
ReinstallPHostRequest is request schema for ReinstallPHost action
type ReinstallPHostResponse ¶
type ReinstallPHostResponse struct {
response.CommonBase
// PHost 的资源ID
PHostId string
}
ReinstallPHostResponse is response schema for ReinstallPHost action
type StartPHostRequest ¶
type StartPHostRequest struct {
request.CommonBase
// PHost资源ID
PHostId *string `required:"true"`
}
StartPHostRequest is request schema for StartPHost action
type StartPHostResponse ¶
type StartPHostResponse struct {
response.CommonBase
// PHost 的资源ID
PHostId string
}
StartPHostResponse is response schema for StartPHost action
type TerminatePHostRequest ¶
type TerminatePHostRequest struct {
request.CommonBase
// PHost资源ID
PHostId *string `required:"true"`
// 是否释放绑定的EIP。true: 解绑EIP后,并释放;其他值或不填:解绑EIP。
ReleaseEIP *bool `required:"false"`
}
TerminatePHostRequest is request schema for TerminatePHost action
type TerminatePHostResponse ¶
type TerminatePHostResponse struct {
response.CommonBase
// PHost 的资源ID
PHostId string
}
TerminatePHostResponse is response schema for TerminatePHost action
type UPHostClient ¶
UPHostClient is the client of UPHost
func NewClient ¶
func NewClient(config *ucloud.Config, credential *auth.Credential) *UPHostClient
NewClient will return a instance of UPHostClient
func (*UPHostClient) CreatePHost ¶
func (c *UPHostClient) CreatePHost(req *CreatePHostRequest) (*CreatePHostResponse, error)
CreatePHost - 指定数据中心,根据资源使用量创建指定数量的UPHost物理云主机实例。
func (*UPHostClient) DescribePHost ¶
func (c *UPHostClient) DescribePHost(req *DescribePHostRequest) (*DescribePHostResponse, error)
DescribePHost - 获取物理机详细信息
func (*UPHostClient) DescribePHostImage ¶
func (c *UPHostClient) DescribePHostImage(req *DescribePHostImageRequest) (*DescribePHostImageResponse, error)
DescribePHostImage - 获取物理云主机镜像列表
func (*UPHostClient) DescribePHostTags ¶
func (c *UPHostClient) DescribePHostTags(req *DescribePHostTagsRequest) (*DescribePHostTagsResponse, error)
DescribePHostTags - 获取物理机tag列表(业务组)
func (*UPHostClient) GetPHostPrice ¶
func (c *UPHostClient) GetPHostPrice(req *GetPHostPriceRequest) (*GetPHostPriceResponse, error)
GetPHostPrice - 获取物理机价格列表
func (*UPHostClient) ModifyPHostInfo ¶
func (c *UPHostClient) ModifyPHostInfo(req *ModifyPHostInfoRequest) (*ModifyPHostInfoResponse, error)
ModifyPHostInfo - 更改物理机信息
func (*UPHostClient) NewCreatePHostRequest ¶
func (c *UPHostClient) NewCreatePHostRequest() *CreatePHostRequest
NewCreatePHostRequest will create request of CreatePHost action.
func (*UPHostClient) NewDescribePHostImageRequest ¶
func (c *UPHostClient) NewDescribePHostImageRequest() *DescribePHostImageRequest
NewDescribePHostImageRequest will create request of DescribePHostImage action.
func (*UPHostClient) NewDescribePHostRequest ¶
func (c *UPHostClient) NewDescribePHostRequest() *DescribePHostRequest
NewDescribePHostRequest will create request of DescribePHost action.
func (*UPHostClient) NewDescribePHostTagsRequest ¶
func (c *UPHostClient) NewDescribePHostTagsRequest() *DescribePHostTagsRequest
NewDescribePHostTagsRequest will create request of DescribePHostTags action.
func (*UPHostClient) NewGetPHostPriceRequest ¶
func (c *UPHostClient) NewGetPHostPriceRequest() *GetPHostPriceRequest
NewGetPHostPriceRequest will create request of GetPHostPrice action.
func (*UPHostClient) NewModifyPHostInfoRequest ¶
func (c *UPHostClient) NewModifyPHostInfoRequest() *ModifyPHostInfoRequest
NewModifyPHostInfoRequest will create request of ModifyPHostInfo action.
func (*UPHostClient) NewPoweroffPHostRequest ¶
func (c *UPHostClient) NewPoweroffPHostRequest() *PoweroffPHostRequest
NewPoweroffPHostRequest will create request of PoweroffPHost action.
func (*UPHostClient) NewRebootPHostRequest ¶
func (c *UPHostClient) NewRebootPHostRequest() *RebootPHostRequest
NewRebootPHostRequest will create request of RebootPHost action.
func (*UPHostClient) NewReinstallPHostRequest ¶
func (c *UPHostClient) NewReinstallPHostRequest() *ReinstallPHostRequest
NewReinstallPHostRequest will create request of ReinstallPHost action.
func (*UPHostClient) NewStartPHostRequest ¶
func (c *UPHostClient) NewStartPHostRequest() *StartPHostRequest
NewStartPHostRequest will create request of StartPHost action.
func (*UPHostClient) NewTerminatePHostRequest ¶
func (c *UPHostClient) NewTerminatePHostRequest() *TerminatePHostRequest
NewTerminatePHostRequest will create request of TerminatePHost action.
func (*UPHostClient) PoweroffPHost ¶
func (c *UPHostClient) PoweroffPHost(req *PoweroffPHostRequest) (*PoweroffPHostResponse, error)
PoweroffPHost - 断电物理云主机
func (*UPHostClient) RebootPHost ¶
func (c *UPHostClient) RebootPHost(req *RebootPHostRequest) (*RebootPHostResponse, error)
RebootPHost - 重启物理机
func (*UPHostClient) ReinstallPHost ¶
func (c *UPHostClient) ReinstallPHost(req *ReinstallPHostRequest) (*ReinstallPHostResponse, error)
ReinstallPHost - 重装物理机操作系统
func (*UPHostClient) StartPHost ¶
func (c *UPHostClient) StartPHost(req *StartPHostRequest) (*StartPHostResponse, error)
StartPHost - 启动物理机
func (*UPHostClient) TerminatePHost ¶
func (c *UPHostClient) TerminatePHost(req *TerminatePHostRequest) (*TerminatePHostResponse, error)
TerminatePHost - 删除物理云主机
Source Files
¶
- client.go
- create_phost.go
- describe_phost.go
- describe_phost_image.go
- describe_phost_tags.go
- doc.go
- get_phost_price.go
- modify_phost_info.go
- poweroff_phost.go
- reboot_phost.go
- reinstall_phost.go
- start_phost.go
- terminate_phost.go
- types_phost_cpuset.go
- types_phost_disk_set.go
- types_phost_image_set.go
- types_phost_ipset.go
- types_phost_price_set.go
- types_phost_set.go
- types_phost_tag_set.go