models

package
v1.69.1 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: Apache-2.0 Imports: 2 Imported by: 17 modules, 53 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bind added in v1.10.0

type Bind struct {

	/* 云硬盘绑定的InstanceUuid (Optional) */
	ResourceId string `json:"resourceId"`
}

type ContactInfo added in v1.54.0

type ContactInfo struct {

	/* 是否发送短信。0:不发送 1:发送 (Optional) */
	Sms *int `json:"sms"`

	/* 是否发送短信。0:不发送 1:发送 (Optional) */
	Email *int `json:"email"`

	/* 联系人id,默认为空 (Optional) */
	PersonIds []int `json:"personIds"`

	/* 联系组id,默认为空 (Optional) */
	GroupIds []int `json:"groupIds"`
}

type Data added in v1.10.0

type Data struct {

	/* 云硬盘ID (Optional) */
	ResourceId string `json:"resourceId"`

	/* 云硬盘名称,只允许输入中文、数字、大小写字母、英文下划线“_”及中划线“-”,不允许为空且不超过32字符。 (Optional) */
	ResourceName string `json:"resourceName"`

	/* 云硬盘状态,取值为 creating、available、in-use、extending、restoring、deleting、deleted、error_create、error_delete、error_restore、error_extend 之一 (Optional) */
	Status string `json:"status"`

	/* 绑定资源列表 (Optional) */
	Bind []Bind `json:"bind"`
}

type DelSnapshot added in v1.19.0

type DelSnapshot struct {

	/* 云硬盘快照ID (Optional) */
	SnapshotId string `json:"snapshotId"`

	/* 是否成功 (Optional) */
	Success bool `json:"success"`

	/* 详细信息 (Optional) */
	Detail string `json:"detail"`
}

type DescSnapshotRelationsData added in v1.54.0

type DescSnapshotRelationsData struct {

	/* 云硬盘ID (Optional) */
	DiskId string `json:"diskId"`

	/* 云硬盘地域ID (Optional) */
	DiskRegion string `json:"diskRegion"`

	/* 快照策略ID (Optional) */
	PolicyId string `json:"policyId"`

	/* 绑定时间。格式`YYYY-MM-DDTHH:mm:ss+xx:xx`。如`2020-02-02T20:02:00+08:00` (Optional) */
	CreateTime string `json:"createTime"`
}

type Disk

type Disk struct {

	/* 云硬盘ID (Optional) */
	DiskId string `json:"diskId"`

	/* 云硬盘所属AZ (Optional) */
	Az string `json:"az"`

	/* 云硬盘名称,只允许输入中文、数字、大小写字母、英文下划线“_”及中划线“-”,不允许为空且不超过32字符。 (Optional) */
	Name string `json:"name"`

	/* 云硬盘描述,允许输入UTF-8编码下的全部字符,不超过256字符。 (Optional) */
	Description string `json:"description"`

	/* 云硬盘类型,取值为 ssd,premium-hdd,ssd.gp1,ssd.io1,hdd.std1 (Optional) */
	DiskType string `json:"diskType"`

	/* 云硬盘大小,单位为 GiB (Optional) */
	DiskSizeGB int `json:"diskSizeGB"`

	/* 该云硬盘实际应用的iops值 (Optional) */
	Iops int `json:"iops"`

	/* 该云硬盘实际应用的吞吐量的数值 (Optional) */
	Throughput int `json:"throughput"`

	/* 云硬盘状态,取值为 creating、available、in-use、extending、restoring、deleting、deleted、error_create、error_delete、error_restore、error_extend、in-recyclebin 之一 (Optional) */
	Status string `json:"status"`

	/* 挂载信息 (Optional) */
	Attachments []DiskAttachment `json:"attachments"`

	/* 创建该云硬盘的快照ID (Optional) */
	SnapshotId string `json:"snapshotId"`

	/* 云盘是否支持多挂载 (Optional) */
	MultiAttachable bool `json:"multiAttachable"`

	/* 云盘是否为加密盘 (Optional) */
	Encrypted bool `json:"encrypted"`

	/* 云盘是否被暂停(IOPS限制为极低) (Optional) */
	Enabled bool `json:"enabled"`

	/* 创建云硬盘时间 (Optional) */
	CreateTime string `json:"createTime"`

	/* 云硬盘计费配置信息 (Optional) */
	Charge charge.Charge `json:"charge"`

	/* null (Optional) */
	Tags []Tag `json:"tags"`

	/*  (Optional) */
	SnapshotPolicies []SnapshotPolicy `json:"snapshotPolicies"`

	/* 资源组ID (Optional) */
	ResourceGroupId string `json:"resourceGroupId"`

	/* 云盘是否可以加入回收站 (Optional) */
	CanPutInRecycleBin bool `json:"canPutInRecycleBin"`

	/* 加入回收站的时间 (Optional) */
	TrashTime string `json:"trashTime"`
}

type DiskAttachment

type DiskAttachment struct {

	/* 挂载ID (Optional) */
	AttachmentId string `json:"attachmentId"`

	/* 云硬盘ID (Optional) */
	DiskId string `json:"diskId"`

	/* 挂载实例的类型,取值为 vm、nc (Optional) */
	InstanceType string `json:"instanceType"`

	/* 挂载实例的ID (Optional) */
	InstanceId string `json:"instanceId"`

	/* 挂载状态,取值为 "attaching", "attached", "detaching", "detached" (Optional) */
	Status string `json:"status"`

	/* 挂载时间 (Optional) */
	AttachTime string `json:"attachTime"`
}

type DiskSpec

type DiskSpec struct {

	/* 云硬盘所属的可用区  */
	Az string `json:"az"`

	/* 云硬盘名称  */
	Name string `json:"name"`

	/* 云硬盘描述,默认为空 (Optional) */
	Description *string `json:"description"`

	/* 云硬盘类型,取值为ssd、premium-hdd、ssd.gp1、ssd.io1、hdd.std1、ssd.io2、ssd.gp2之一  */
	DiskType string `json:"diskType"`

	/* 云硬盘大小,单位为 GiB,ssd 类型取值范围[20,1000]GB,步长为10G,premium-hdd 类型取值范围[20,3000]GB,步长为10G, ssd.gp1, ssd.io1, hdd.std1 类型取值均是范围[20,16000]GB,步长为10G  */
	DiskSizeGB int `json:"diskSizeGB"`

	/* 云硬盘IOPS的大小,当且仅当云盘类型是ssd.io1型的云盘有效,步长是10.默认值为容量30,最大值为容量50 (Optional) */
	Iops *int `json:"iops"`

	/* 用于创建云硬盘的快照ID,默认为空 (Optional) */
	SnapshotId *string `json:"snapshotId"`

	/* 策略ID,默认为空;当策略Id为空时,reps结果返回中policyRelations为空 (Optional) */
	PolicyId *string `json:"policyId"`

	/* 计费配置;如不指定,默认计费类型是后付费-按使用时常付费 (Optional) */
	Charge *charge.ChargeSpec `json:"charge"`

	/* 云硬盘是否支持一盘多主机挂载,默认为false(不支持) (Optional) */
	MultiAttachable *bool `json:"multiAttachable"`

	/* 云硬盘是否加密,默认为false(不加密) (Optional) */
	Encrypt *bool `json:"encrypt"`
}

type DiskSpecification added in v1.4.0

type DiskSpecification struct {

	/* 云硬盘类型 (Optional) */
	DiskType string `json:"diskType"`

	/* 支持的最小尺寸,单位为 GiB (Optional) */
	MinSizeGB int `json:"minSizeGB"`

	/* 支持的最大尺寸,单位为 GiB (Optional) */
	MaxSizeGB int `json:"maxSizeGB"`

	/* 步长尺寸,单位为 GiB (Optional) */
	StepSizeGB int `json:"stepSizeGB"`

	/* 描述信息 (Optional) */
	Description string `json:"description"`

	/* 类型名称 (Optional) */
	DiskTypeName string `json:"diskTypeName"`

	/* 默认的iops数量(基础iops数量) (Optional) */
	DefaultIOPS int `json:"defaultIOPS"`

	/* iops步长增量 (Optional) */
	StepIOPS float32 `json:"stepIOPS"`

	/* 最大iops数量 (Optional) */
	MaxIOPS int `json:"maxIOPS"`

	/* 默认的吞吐量 (Optional) */
	DefaultThroughput int `json:"defaultThroughput"`

	/* 吞吐量步长增量 (Optional) */
	StepThroughput float32 `json:"stepThroughput"`

	/* 最大吞吐量 (Optional) */
	MaxThroughput int `json:"maxThroughput"`

	/* 是否开启IOPS可调整 (Optional) */
	ScalableIOPS bool `json:"scalableIOPS"`

	/* 最大iops步长 (Optional) */
	MaxStepIOPS int `json:"maxStepIOPS"`
}

type FilterGroups added in v1.54.0

type FilterGroups struct {

	/* policyId - 策略Id,精确匹配,支持多个
	status - 策略状态,精确匹配,支持多个
	name - 策略名称,模糊匹配,支持单个
	 (Optional) */
	Filters []common.Filter `json:"filters"`
}

type OrderItem added in v1.54.0

type OrderItem struct {

	/* 排序字段。 (Optional) */
	Name *string `json:"name"`

	/* 0:升序 1:降序 (Optional) */
	Direction *int `json:"direction"`
}

type PolicyDiskRelationOp added in v1.54.0

type PolicyDiskRelationOp struct {

	/* 磁盘ID  */
	DiskId string `json:"diskId"`

	/* 磁盘地域ID  */
	DiskRegion string `json:"diskRegion"`

	/* 快照策略ID  */
	PolicyId string `json:"policyId"`

	/* 联系组id  */
	Op int `json:"op"`
}

type PolicyDiskRelationOpResult added in v1.54.0

type PolicyDiskRelationOpResult struct {

	/* 状态码 (Optional) */
	Code int `json:"code"`

	/* 失败信息 (Optional) */
	Message string `json:"message"`

	/* 磁盘ID (Optional) */
	DiskId string `json:"diskId"`

	/* 磁盘地域ID (Optional) */
	DiskRegion string `json:"diskRegion"`

	/* 快照策略ID (Optional) */
	PolicyId string `json:"policyId"`

	/* 联系组id (Optional) */
	Op int `json:"op"`
}

type PolicyDiskRelationOps added in v1.54.0

type PolicyDiskRelationOps struct {

	/*  (Optional) */
	Items []PolicyDiskRelationOp `json:"items"`
}

type Quota added in v1.4.0

type Quota struct {

	/* 配额 (Optional) */
	Limit int `json:"limit"`

	/* 已使用的数目 (Optional) */
	Used int `json:"used"`
}

type ReportTask added in v1.56.0

type ReportTask struct {

	/* 任务ID (Optional) */
	TaskId string `json:"taskId"`

	/* 文件名 (Optional) */
	Filename string `json:"filename"`

	/* 状态。0:执行中;3:完成;4:失败 (Optional) */
	Status int `json:"status"`

	/* 创建时间 (Optional) */
	CreatedAt string `json:"createdAt"`

	/* 下载链接 (Optional) */
	DownloadUrl string `json:"downloadUrl"`
}

type ShareInfo added in v1.4.0

type ShareInfo struct {

	/* 被共享快照的用户的pin (Optional) */
	ShareTo string `json:"shareTo"`

	/* 共享时间 (Optional) */
	ShareTime string `json:"shareTime"`
}

type Snapshot

type Snapshot struct {

	/* 云硬盘快照ID (Optional) */
	SnapshotId string `json:"snapshotId"`

	/* 快照来源 可以有self,others两种来源 (Optional) */
	SnapshotSource string `json:"snapshotSource"`

	/* 创建快照的云硬盘ID(snapshotSource为others时不展示) (Optional) */
	DiskId string `json:"diskId"`

	/* 快照大小,单位为GiB (Optional) */
	SnapshotSizeGB int `json:"snapshotSizeGB"`

	/* 快照关联的所有镜像ID(snapshotSource为others时不展示) (Optional) */
	Images []string `json:"images"`

	/* 快照名称 (Optional) */
	Name string `json:"name"`

	/* 快照描述 (Optional) */
	Description string `json:"description"`

	/* 快照状态,取值为 creating、available、in-use、deleting、error_create、error_delete 之一 (Optional) */
	Status string `json:"status"`

	/* 创建时间 (Optional) */
	CreateTime string `json:"createTime"`

	/* 过期删除时间 (Optional) */
	ExpireTime string `json:"expireTime"`

	/* 共享信息(已废弃,使用shareInfo) (Optional) */
	SharInfo []ShareInfo `json:"sharInfo"`

	/* 共享信息 (Optional) */
	ShareInfo []ShareInfo `json:"shareInfo"`

	/* 快照是否为加密盘的快照 (Optional) */
	Encrypted bool `json:"encrypted"`
}

type SnapshotCapacity added in v1.54.0

type SnapshotCapacity struct {

	/* 区域ID (Optional) */
	Region string `json:"region"`

	/* 快照个数 (Optional) */
	SnapshotCount int `json:"snapshotCount"`

	/* 快照总大小,单位:MB (Optional) */
	TotalSize int `json:"totalSize"`
}

type SnapshotChain added in v1.54.0

type SnapshotChain struct {

	/* 快照链ID (Optional) */
	DiskId string `json:"diskId"`

	/* 快照链快照个数 (Optional) */
	SnapshotTotalCount int `json:"snapshotTotalCount"`

	/* 快照链快照总容量,单位Byte (Optional) */
	SnapshotChainSize int `json:"snapshotChainSize"`
}

type SnapshotPolicy added in v1.54.0

type SnapshotPolicy struct {

	/* 策略id (Optional) */
	Id string `json:"id"`

	/* 策略名称 (Optional) */
	Name string `json:"name"`

	/* 用户pin (Optional) */
	Pin string `json:"pin"`

	/* 策略执行间隔,单位:秒 (Optional) */
	Interval int `json:"interval"`

	/* 策略生效时间。格式`YYYY-MM-DDTHH:mm:ss+xx:xx`。如`2020-02-02T20:02:00+08:00` (Optional) */
	EffectiveTime string `json:"effectiveTime"`

	/* 策略上次执行时间。格式`YYYY-MM-DDTHH:mm:ss+xx:xx`。如`2020-02-02T20:02:00+08:00` (Optional) */
	LastTriggerTime string `json:"lastTriggerTime"`

	/* 策略下次执行时间。格式`YYYY-MM-DDTHH:mm:ss+xx:xx`。如`2020-02-02T20:02:00+08:00` (Optional) */
	NextTriggerTime string `json:"nextTriggerTime"`

	/* 快照保留时间。单位:秒。0:永久保留 (Optional) */
	SnapshotLifecycle int `json:"snapshotLifecycle"`

	/* 联系人信息 (Optional) */
	ContactInfo ContactInfo `json:"contactInfo"`

	/* 策略下次执行时间。格式`YYYY-MM-DDTHH:mm:ss+xx:xx`。如`2020-02-02T20:02:00+08:00` (Optional) */
	CreateTime string `json:"createTime"`

	/* 策略下次执行时间。格式`YYYY-MM-DDTHH:mm:ss+xx:xx`。如`2020-02-02T20:02:00+08:00` (Optional) */
	UpdateTime string `json:"updateTime"`

	/* 策略状态。1:启用 2:禁用 (Optional) */
	Status int `json:"status"`

	/* 策略绑定的disk数量 (Optional) */
	DiskCount int `json:"diskCount"`
}

type SnapshotSpec

type SnapshotSpec struct {

	/* 快照名称  */
	Name string `json:"name"`

	/* 快照描述,默认为空 (Optional) */
	Description *string `json:"description"`

	/* 用于创建快照的云盘ID  */
	DiskId string `json:"diskId"`
}

type Soldout added in v1.4.0

type Soldout struct {

	/* 云硬盘所属的可用区  */
	AzName string `json:"azName"`

	/* 云硬盘类型,取值为ssd、premium-hdd、ssd.gp1、ssd.io1、hdd.std1之一  */
	MediaType string `json:"mediaType"`

	/* 是否售罄  */
	IsSoldOut bool `json:"isSoldOut"`
}

type Sort added in v1.60.0

type Sort struct {

	/* 排序条件的名称 (Optional) */
	Name *string `json:"name"`

	/* 排序条件的方向 0:升序 1:降序 (Optional) */
	Direction *int `json:"direction"`
}

type Tag added in v1.0.4

type Tag struct {

	/* Tag键 (Optional) */
	Key *string `json:"key"`

	/* Tag值 (Optional) */
	Value *string `json:"value"`
}

type TagFilter added in v1.0.4

type TagFilter struct {

	/* Tag键  */
	Key string `json:"key"`

	/* Tag值  */
	Values []string `json:"values"`
}

Jump to

Keyboard shortcuts

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