uhost

package
v0.21.13 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteSnapshotRequest

type DeleteSnapshotRequest struct {
	request.CommonBase

	// 快照Id
	SnapshotId *string `required:"true"`
}

DeleteSnapshotRequest is request schema for DeleteSnapshot action

type DeleteSnapshotResponse

type DeleteSnapshotResponse struct {
	response.CommonBase

	// 快照Id
	SnapshotId string
}

DeleteSnapshotResponse is response schema for DeleteSnapshot action

type DescribeSnapshotRequest

type DescribeSnapshotRequest struct {
	request.CommonBase

	// 快照的资源ID,例如SnapshotIds.0代表希望获取信息的快照1,SnapshotIds.2代表快照2。 如果不传,则返回当前Region所有符合条件的快照。
	SnapshotIds []string `required:"false"`

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

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

	// 若传,则返回该主机下的所有快照
	UHostId *string `required:"false"`

	// 磁盘id,若磁盘传入,对应的UHostId必须一同传入
	DiskId *string `required:"false"`
}

DescribeSnapshotRequest is request schema for DescribeSnapshot action

type DescribeSnapshotResponse

type DescribeSnapshotResponse struct {
	response.CommonBase

	// 满足条件的快照总数
	TotalCount int

	// 快照列表,每项参数可见下面SnapshotSet
	UHostSnapshotSet []SnapshotSet

	// 总配额数
	TotalQuota int

	// 已使用的配额数
	TotalUsed int

	// 每块磁盘的快照配额
	PerDiskQuota int

	// 每块磁盘已经使用的配额数。如果不传DiskId,则返回0.
	DiskUsed int
}

DescribeSnapshotResponse is response schema for DescribeSnapshot action

type RestoreUHostDiskRequest

type RestoreUHostDiskRequest struct {
	request.CommonBase

	// 快照所属主机.仅当网盘数据盘未挂载时才可以不传。
	UHostId *string `required:"false"`

	// 主机上要恢复的磁盘Id. 对于本地盘主机,支持单独恢复系统盘或数据盘,也可以同时恢复系统盘和数据盘;对于网盘主机,只能恢复系统盘。从数据方舟恢复磁盘时必传。
	DiskIds []string `required:"false"`

	// 恢复的盘的时间戳,顺序与DiskIds.n保持对应。从数据方舟恢复磁盘时必传。
	RestoreTimestamps []string `required:"false"`

	// 快照Id. 对于本地盘主机,支持单独恢复系统盘或数据盘,也可以同时恢复系统盘和数据盘;对于网盘主机,只能恢复系统盘。从快照恢复磁盘时必传。
	SnapshotIds []string `required:"false"`
}

RestoreUHostDiskRequest is request schema for RestoreUHostDisk action

type RestoreUHostDiskResponse

type RestoreUHostDiskResponse struct {
	response.CommonBase
}

RestoreUHostDiskResponse is response schema for RestoreUHostDisk action

type SnapshotSet

type SnapshotSet struct {

	// 快照Id
	SnapshotId string

	// 磁盘Id。仅当为网络盘时返回此id。
	DiskId string

	// 主机Id。若udisk没有挂载,则不返回。
	UHostId string

	// 磁盘类型,枚举值为:LocalBoot,本地系统盘;LocalData,本地数据盘;UDiskBoot,云系统盘;UDiskData,云数据盘
	DiskType string

	// 大小
	Size int

	// 快照状态,枚举值为:Normal,可用;Creating,制作中;Failed,制作失败
	State string

	// 快照名称
	SnapshotName string

	// 快照描述
	SnapshotDescription string

	// 创建成功时间,unix时间
	CreateTime int

	// 指定的制作快照时间,unix时间
	SnapshotTime int

	// 资源名字。本地盘对应主机名字,网络盘对应udisk名字
	ResourceName string

	// 配置文件所在的可用区
	Zone string
}

SnapshotSet - DescribeSnapshot

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

type UHostClient

type UHostClient struct {
	*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) DeleteSnapshot

func (c *UHostClient) DeleteSnapshot(req *DeleteSnapshotRequest) (*DeleteSnapshotResponse, error)

DeleteSnapshot - 删除快照

func (*UHostClient) DescribeSnapshot

func (c *UHostClient) DescribeSnapshot(req *DescribeSnapshotRequest) (*DescribeSnapshotResponse, error)

DescribeSnapshot - 拉取快照列表

func (*UHostClient) NewDeleteSnapshotRequest

func (c *UHostClient) NewDeleteSnapshotRequest() *DeleteSnapshotRequest

NewDeleteSnapshotRequest will create request of DeleteSnapshot action.

func (*UHostClient) NewDescribeSnapshotRequest

func (c *UHostClient) NewDescribeSnapshotRequest() *DescribeSnapshotRequest

NewDescribeSnapshotRequest will create request of DescribeSnapshot action.

func (*UHostClient) NewRestoreUHostDiskRequest

func (c *UHostClient) NewRestoreUHostDiskRequest() *RestoreUHostDiskRequest

NewRestoreUHostDiskRequest will create request of RestoreUHostDisk action.

func (*UHostClient) RestoreUHostDisk

func (c *UHostClient) RestoreUHostDisk(req *RestoreUHostDiskRequest) (*RestoreUHostDiskResponse, error)

RestoreUHostDisk - 从数据方舟或者快照,恢复主机的磁盘。必须在关机状态下进行。

Jump to

Keyboard shortcuts

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